Compliance Actions

List all compliance actions

Gets a list of existing compliance actions.

Required roles

See Authentication for complete details on ensuring that the credentials you use for basic authentication belong to a user with the necessary role for this API call.

 

Required Roles

Category: Compliance Policy Management

Role Description: View compliance policy

HTTP method

GET

Request URI

api/v2/compliance_action

Request parameters

Parameter

Description

Sample Value

adminDeviceSpaceId

Required

Parameter Type: Query

Data Type: Number

Device space ID of the administrator.

1

Response fields

Field

Description

results

 

        id

 

        name

 

        localCompliancefalse

 

        createdAt

 

        modifiedAt

 

        tiers

 

                delay

 

                complianceSettings

 

                    wipe

 

                    quarantine

 

                    block

 

                    alert

 

                quarantineSettings

 

                    removeWifi

 

                    removeConfigurations

 

                    excludeWifiOnly

 

                    removeApps

 

totalCount

 

resultCount

 

Sample request

curl -k -sS -u <userName>:<password> -XGET 'https://[Ivanti EPMM]/api/v2/compliance_action?adminDeviceSpaceId=1'

Sample response

{

    "results": [

        {

            "id": 2,

            "name": "Block Email, AppConnect apps, and Send Alert",

            "localCompliance": false,

            "createdAt": 0,

            "modifiedAt": 0,

            "tiers": [

                {

                    "delay": "PT0S",

                    "complianceSettings": {

                        "wipe": false,

                        "quarantine": false,

                        "block": true,

                        "alert": true

                    },

                    "quarantineSettings": {

                        "removeWifi": false,

                        "removeConfigurations": false,

                        "excludeWifiOnly": false,

                        "removeApps": false

                    }

                }

            ]

        },

        {

            "id": 1,

            "name": "Send Alert",

            "localCompliance": false,

            "createdAt": 0,

            "modifiedAt": 0,

            "tiers": [

                {

                    "delay": "PT0S",

                    "complianceSettings": {

                        "wipe": false,

                        "quarantine": false,

                        "block": false,

                        "alert": true

                    },

                    "quarantineSettings": {

                        "removeWifi": false,

                        "removeConfigurations": false,

                        "excludeWifiOnly": false,

                        "removeApps": false

                    }

                }

            ]

        }

    ],

    "totalCount": 2,

    "resultCount": 2

}

Create a compliance action

Creates a compliance action. With this call, you specify the name of the compliance action and then the data for the tiers, including any enforcement delays.

Required roles

See Authentication for complete details on ensuring that the credentials you use for basic authentication belong to a user with the necessary role for this API call.

 

Required Roles

Category: Compliance Policy Management

Roles Description: View compliance policy, Modify Compliance policy, Apply and remove compliance policy labels

HTTP method

POST

Request URI

api/v2/compliance_action

Request parameters

Parameter

Description

Sample Value

adminDeviceSpaceId

Required

Parameter Type: Query

Data Type: Number

Device space ID of the administrator.

1

name

Required

Parameter Type: Request body

Data Type: Text

Name of the tiered compliance action.

Three tiers 12 hour then 1 day delay

localCompliance

Parameter Type: Request body

Data Type: Boolean

Can be true or false. Specifies whether Ivanti EPMM enforces the first tier on the device if possible.

true

tiers

Required

Parameter Type: Request body

Data Type: Container for the tiers data.

n/a

    delay

Parameter Type: Request body

Data Type: text.

Specifies the delay time. Formatted as ISO8601 durations.

PT12H

    complianceSettings

Required

Parameter Type: Request body

Data Type: Container for the compliance settings data.

n/a

        quarantine

Parameter Type: Request body

Data Type: Boolean

Can be true or false.

true

        wipe

 

Parameter Type: Request body

Data Type: Boolean

Can be true or false.

Only for Android devices on which the custom ROM setting is enabled.

true

        block

 

Parameter Type: Request body

Data Type: Boolean

Can be true or false.

true

        alert

 

Parameter Type: Request body

Data Type: Boolean

Can be true or false.

true

    quarantineSettings

Parameter Type: Request body

Data Type: Container for the quarantine settings data.

n/a

        removeConfigurations

Parameter Type: Request body

Data Type: Boolean

Can be true or false.

true

        excludeWifiOnly

Parameter Type: Request body

Data Type: Boolean

Can be true or false.

true

        removeWifi

Parameter Type: Request body

Data Type: Boolean

Can be true or false.

true

        removeApps

Parameter Type: Request body

Data Type: Boolean

Can be true or false.

true

Response fields

Field

Description

results

Container for results

messages

Container for messages

        messageKey

Key for the returned message

        localizedMessage

Text of the returned message

totalCount

How many records found

resultCount

How many records displayed

Sample request

curl -k -sS -u <userName>:<password> -H "Content-Type: application/json" --data '{

    "name": "Three tiers 12 hour then 1 day delay",

    "localCompliance": false,

    "tiers": [

      {

        "complianceSettings": {

          "quarantine": false,

          "wipe": false,

          "block": false,

          "alert": true

        },

        "quarantineSettings": {

          "removeConfigurations": false,

          "excludeWifiOnly": false,

          "removeWifi": false,

          "removeApps": false

        }

      },

      {

        "delay": "PT12H",

        "complianceSettings": {

          "quarantine": false,

          "wipe": false,

          "block": true,

          "alert": false

        },

        "quarantineSettings": {

          "removeConfigurations": false,

          "excludeWifiOnly": false,

          "removeWifi": false,

          "removeApps": false

        }

      },

      {

        "delay": "P1D",

        "complianceSettings": {

          "quarantine": true,

          "wipe": false,

          "block": false,

          "alert": false

        },

        "quarantineSettings": {

          "removeConfigurations": true,

          "excludeWifiOnly": true,

          "removeWifi": true,

          "removeApps": false

        }

      }

    ]

  }' -XPOST 'https://[Ivanti EPMM]/api/v2/compliance_action?adminDeviceSpaceId=1'

Sample response

{

   "results":9,

   "messages":[

      {

         "type":"Info",

         "messageKey":"com.mobileiron.vsp.rest.controllers.ComplianceActionController.Messages.CREATE_SUCCESS",

         "localizedMessage":"Compliance action created successfully."

      }

   ],

   "totalCount":1,

   "resultCount":1

}

Update a compliance action

Updates a compliance action.

Required roles

See Authentication for complete details on ensuring that the credentials you use for basic authentication belong to a user with the necessary role for this API call.

 

Required Roles

Category: Compliance Policy Management

Roles Description: View compliance policy, Modify Compliance policy, Apply and remove compliance policy labels

HTTP method

PUT

Request URI

api/v2/compliance_action/id

Request parameters

Parameter

Description

Sample Value

adminDeviceSpaceId

Required

Parameter Type: Query

Data Type: Number

Device space ID of the administrator.

1

id

Required

Parameter Type: Query

Data Type: Number

ID of the compliance action to update.

9

name

Required

Parameter Type: Request body

Data Type: Text

Name of the tiered compliance action.

Three tiers 5 minute delays

localCompliance

Parameter Type: Request body

Data Type: Boolean

Can be true or false. Specifies whether Ivanti EPMM enforces the first tier on the device if possible.

true

tiers

Required

Parameter Type: Request body

Data Type: Container for the tiers data.

n/a

    delay

Parameter Type: Request body

Data Type: text.

Specifies the delay time. Formatted as ISO8601 durations.

You cannot set delay time as less than 4 hours or greater than ninety days without adding the "compliance.restrict.delay.values" property in the mifs.properties file. This values can be changed within the allowed interval in the user interface.

PT5M

    complianceSettings

Required

Parameter Type: Request body

Data Type: Container for the compliance settings data.

n/a

        quarantine

Parameter Type: Request body

Data Type: Boolean

Can be true or false.

true

        wipe

 

Parameter Type: Request body

Data Type: Boolean

Can be true or false.

Only for Android devices on which the custom ROM setting is enabled.

true

        block

 

Parameter Type: Request body

Data Type: Boolean

Can be true or false.

true

        alert

 

Parameter Type: Request body

Data Type: Boolean

Can be true or false.

true

    quarantineSettings

Parameter Type: Request body

Data Type: Container for the quarantine settings data.

n/a

        removeConfigurations

Parameter Type: Request body

Data Type: Boolean

Can be true or false.

true

        excludeWifiOnly

Parameter Type: Request body

Data Type: Boolean

Can be true or false.

true

        removeWifi

Parameter Type: Request body

Data Type: Boolean

Can be true or false.

true

        removeApps

Parameter Type: Request body

Data Type: Boolean

Can be true or false.

true

Response fields

Field

Description

results

Container for results

messages

Container for messages

        messageKey

Key for the returned message

        localizedMessage

Text of the returned message

totalCount

How many records found

resultCount

How many records displayed

Sample request

curl -k -sS -u <userName>:<password> -H "Content-Type: application/json" --data '{

    "name": "Three tiers 5 minute delays",

    "localCompliance": false,

    "tiers": [

      {

        "complianceSettings": {

          "quarantine": false,

          "wipe": false,

          "block": false,

          "alert": true

        },

        "quarantineSettings": {

          "removeConfigurations": false,

          "excludeWifiOnly": false,

          "removeWifi": false,

          "removeApps": false

        }

      },

      {

        "delay": "PT5M",

        "complianceSettings": {

          "quarantine": false,

          "wipe": false,

          "block": true,

          "alert": false

        },

        "quarantineSettings": {

          "removeConfigurations": false,

          "excludeWifiOnly": false,

          "removeWifi": false,

          "removeApps": false

        }

      },

      {

        "delay": "PT5M",

        "complianceSettings": {

          "quarantine": true,

          "wipe": false,

          "block": false,

          "alert": false

        },

        "quarantineSettings": {

          "removeConfigurations": true,

          "excludeWifiOnly": true,

          "removeWifi": true,

          "removeApps": false

        }

      }

    ]

}' -XPUT 'https://[Ivanti EPMM]/api/v2/compliance_action/9?adminDeviceSpaceId=1'

Sample response

{

   "results":9,

   "messages":[

      {

         "type":"Info",

         "messageKey":"com.mobileiron.vsp.rest.controllers.ComplianceActionController.Messages.UPDATE_SUCCESS",

         "localizedMessage":"Compliance action updated successfully."

      }

   ],

   "totalCount":1,

   "resultCount":1

}

Get information about a compliance action

Gets information about a specific compliance action.

Required roles

See Authentication for complete details on ensuring that the credentials you use for basic authentication belong to a user with the necessary role for this API call.

 

Required Roles

Category: Compliance Policy Management

Role Description: View compliance policy

HTTP method

GET

Request URI

api/v2/compliance_action/id

Request parameters

Parameter

Description

Sample Value

adminDeviceSpaceId

Required

Parameter Type: Query

Data Type: Number

Device space ID of the administrator.

1

id

Required

Parameter Type: Query

Data Type: Number

ID of the compliance action for which information needs to be fetched.

9

Response fields

Field

Description

results

 

        id

 

        name

 

        localCompliancefalse

 

        createdAt

 

        modifiedAt

 

        tiers

 

                delay

 

                complianceSettings

 

                    wipe

 

                    quarantine

 

                    block

 

                    alert

 

                quarantineSettings

 

                    removeWifi

 

                    removeConfigurations

 

                    excludeWifiOnly

 

                    removeApps

 

totalCount

 

resultCount

 

Sample request

curl -k -sS -u <userName>:<password> -XGET 'https://[Ivanti EPMM]/api/v2/compliance_action/1?adminDeviceSpaceId=1'

Sample response

{

   "results":{

      "id":1,

      "name":"Send Alert",

      "localCompliance":false,

      "createdAt":0,

      "modifiedAt":0,

      "tiers":[

         {

            "delay":"PT0S",

            "complianceSettings":{

               "wipe":false,

               "quarantine":false,

               "block":false,

               "alert":true

            },

            "quarantineSettings":{

               "removeWifi":false,

               "removeConfigurations":false,

               "excludeWifiOnly":false,

               "removeApps":false

            }

         }

      ]

   },

   "totalCount":1,

   "resultCount":1

}

Delete a compliance action

Deletes a compliance action.

Required roles

See Authentication for complete details on ensuring that the credentials you use for basic authentication belong to a user with the necessary role for this API call.

 

Required Roles

Category: Compliance Policy Management

Roles Description: View compliance policy, Modify Compliance policy, Apply and remove compliance policy labels

HTTP method

DELETE

Request URI

api/v2/compliance_action/id

Request parameters

Parameter

Description

Sample Value

adminDeviceSpaceId

Required

Parameter Type: Query

Data Type: Number

Device space ID of the administrator.

1

id

Required

Parameter Type: Query

Data Type: Number

ID of the compliance action to delete.

9

Response fields

Field

Description

results

 

        id

 

        name

 

        localCompliancefalse

 

        createdAt

 

        modifiedAt

 

        tiers

 

                delay

 

                complianceSettings

 

                    wipe

 

                    quarantine

 

                    block

 

                    alert

 

                quarantineSettings

 

                    removeWifi

 

                    removeConfigurations

 

                    excludeWifiOnly

 

                    removeApps

 

totalCount

 

resultCount

 

Sample request

curl -k -sS -u <username>:<password> -XDELETE 'https://[Ivanti EPMM]/api/v2/compliance_action/9?adminDeviceSpaceId=1'

Sample response

{

   "results":[

      9

   ],

   "messages":[

      {

         "type":"Info",

         "messageKey":"com.mobileiron.vsp.rest.controllers.ComplianceActionController.Messages.DELETE_SUCCESS",

         "localizedMessage":"Compliance action(s) deleted successfully."

      }

   ],

   "totalCount":1,

   "resultCount":1

}

 

Get substitution variables

This call gets the available substitution variables for use when creating a compliance action message as described in Create compliance action message.

Required roles

See Authentication for complete details on ensuring that the credentials you use for basic authentication belong to a user with the necessary role for this API call.

 

Required Roles

Category: Compliance Policy Management

Roles Description: View compliance policy, Modify Compliance policy, Apply and remove compliance policy labels

HTTP method

GET

Request URI

api/v2/substitution_variables?adminDeviceSpaceId=n

Request parameters

Parameter

Description

Sample Value

adminDeviceSpaceId

Required

Parameter Type: Query

Data Type: Number

Device space ID of the administrator.

1

Response fields

Field

Description

totalCount

 

resultCount

 

hasMore

 

results

 

        name

 

        description

 

Sample request

curl -X GET \

  'https://[Ivanti EPMM]/mifs/admin/rest/api/v2/substitution_variables?page=1&start=0&limit=50&adminDeviceSpaceId=1' \

  -H 'authorization: Basic 0000ZG1pbjpNaTRtYW4xMQ==' \

Sample response

{

    "totalCount": 40,

    "resultCount": 40,

    "hasMore": false,

    "results": [

        {

            "name": "$CN$",

            "description": "Built-in variable"

        },

        {

            "name": "$CONFIG_UUID$",

            "description": "Built-in variable"

        },

        {

            "name": "$DEVICE_CLIENT_ID$",

            "description": "Built-in variable"

        },

        {

            "name": "$DEVICE_ID$",

            "description": "Built-in variable"

        },

        {

            "name": "$DEVICE_IMEI$",

            "description": "Built-in variable"

        },

        {

            "name": "$DEVICE_IMSI$",

            "description": "Built-in variable"

        },

        {

            "name": "$DEVICE_MAC$",

            "description": "Built-in variable"

        },

        {

            "name": "$DEVICE_PIVD_ACTIVATION_LINK$",

            "description": "Built-in variable"

        },

        {

            "name": "$DEVICE_SN$",

            "description": "Built-in variable"

        },

        {

            "name": "$DEVICE_UDID$",

            "description": "Built-in variable"

        },

        {

            "name": "$DEVICE_UUID$",

            "description": "Built-in variable"

        },

        {

            "name": "$DEVICE_UUID_NO_DASHES$",

            "description": "Built-in variable"

        },

        {

            "name": "$DISPLAY_NAME$",

            "description": "Built-in variable"

        },

        {

            "name": "$EMAIL$",

            "description": "Built-in variable"

        },

        {

            "name": "$EMAIL_DOMAIN$",

            "description": "Built-in variable"

        },

        {

            "name": "$EMAIL_LOCAL$",

            "description": "Built-in variable"

        },

        {

            "name": "$FIRST_NAME$",

            "description": "Built-in variable"

        },

        {

            "name": "$GOOGLE_AUTOGEN_PASSWORD$",

            "description": "Built-in variable"

        },

        {

            "name": "$ICCID$",

            "description": "Built-in variable"

        },

        {

            "name": "$LAST_NAME$",

            "description": "Built-in variable"

        },

        {

            "name": "$MI_APPSTORE_URL$",

            "description": "Built-in variable"

        },

        {

            "name": "$MODEL$",

            "description": "Built-in variable"

        },

        {

            "name": "$NULL$",

            "description": "Built-in variable"

        },

        {

            "name": "$OU$",

            "description": "Built-in variable"

        },

        {

            "name": "$PASSWORD$",

            "description": "Built-in variable"

        },

        {

            "name": "$PHONE_NUMBER$",

            "description": "Built-in variable"

        },

        {

            "name": "$RANDOM_16$",

            "description": "Built-in variable"

        },

        {

            "name": "$RANDOM_32$",

            "description": "Built-in variable"

        },

        {

            "name": "$RANDOM_64$",

            "description": "Built-in variable"

        },

        {

            "name": "$REALM$",

            "description": "Built-in variable"

        },

        {

            "name": "$SAM_ACCOUNT_NAME$",

            "description": "Built-in variable"

        },

        {

            "name": "$TIMESTAMP_MS$",

            "description": "Built-in variable"

        },

        {

            "name": "$USER_CUSTOM1$",

            "description": "Built-in variable"

        },

        {

            "name": "$USER_CUSTOM2$",

            "description": "Built-in variable"

        },

        {

            "name": "$USER_CUSTOM3$",

            "description": "Built-in variable"

        },

        {

            "name": "$USER_CUSTOM4$",

            "description": "Built-in variable"

        },

        {

            "name": "$USER_DN$",

            "description": "Built-in variable"

        },

        {

            "name": "$USER_LOCALE$",

            "description": "Built-in variable"

        },

        {

            "name": "$USER_UPN$",

            "description": "Built-in variable"

        },

        {

            "name": "$USERID$",

            "description": "Built-in variable"

        }

    ]

}

Create compliance action message

This call creates a compliance action message. You can use the substitution variables described in Get substitution variables to contruct your message.

Required roles

See Authentication for complete details on ensuring that the credentials you use for basic authentication belong to a user with the necessary role for this API call.

 

Required Roles

Category: Compliance Policy Management

Roles Description: View compliance policy, Modify Compliance policy, Apply and remove compliance policy labels

HTTP method

POST

Request URI

api/v2/compliance_policy/rules/ruleId/messages?adminDeviceSpaceId=n

Request parameters

Parameter

Description

Sample Value

adminDeviceSpaceId

Required

Parameter Type: Query

Data Type: Number

Device space ID of the administrator.

1

ruleId

Required

Parameter Type: Query

Data Type: Number

ID of the compliance action for which to create a message.

2

Response fields

Field

Description

results

 

        ruleId

 

        languageId

 

        message

 

messages

 

        type

 

        messageKey

 

        localizedMessage

 

totalCount

 

resultCount

 

Sample request

curl 'https://[Ivanti EPMM]/mifs/admin/rest/api/v2/compliance_policy/rules/2/messages?adminDeviceSpaceId=1'  --data-binary '{"messages":{"0":"Dear $FIRST_NAME$, your device is in the USA."}}' --compressed

Sample response

{

    "results": [

        {

            "ruleId": 2,

            "languageId": 0,

            "message": "Dear $FIRST_NAME$, your device is in the USA."

        }

    ],

    "messages": [

        {

            "type": "Info",

            "messageKey": "com.mobileiron.vsp.rest.controllers.ComplianceRuleMessageController.Messages.REPLACE_MESSAGES_SUCCESS",

            "localizedMessage": "Compliance rule messages successfully replaced."

        }

    ],

    "totalCount": 1,

    "resultCount": 1

}