---
title: Device Management
slug: epmm/v2-api-guide/device-management
createdAt: 2026-10-06T08:06:40.613Z
---

## Search for devices

This call returns information about devices. There are three ways to get device information: filtered by a search query, filtered by label, or filtered by both a search query and a label. This call has a GDPR consideration. See [GDPR Consideration](docId\:hJ6Ul2Sz4DNsmnPJ-Fxl_).

### Required Role

See [Authentication](docId\:hJ6Ul2Sz4DNsmnPJ-Fxl_) 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 Role                                                                                          |
| ------------------------------------------------------------------------------------------------------ |
| **Category:** Device Management<br />**Role Description:** View dashboard, device page, device details |

### HTTP method

GET

### Request URI

api/v2/devices

### Request parameters

| Parameter          | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | Sample Value                                       |
| ------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------- |
| adminDeviceSpaceId | **Required**<br />**Parameter Type:** Query<br />**Data Type:** Number<br />Device space ID of the administrator.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         | 1                                                  |
| query              | **Required**: One of either the query or labelIed parameters is required, and you can use both in the same call, but not both with an advanced query. See [Supported queries](docId\:gHOR_tm-Xo7xBWWPI6WRw) for more information.<br />**Parameter Type:** Query<br />**Data Type:** String<br />**Min:** 0 character<br />**Max:** 255 characters<br />Search expression. An empty query returns everything. See [Query Operators and Search Fields](docId\:ZAiHpcon5EHTHJ0Gidh-F) for complete details on the query operators and search fields you can use to construct the query parameter statement. |                                                    |
| labelId            | **Required**: One of either the labelId or query parameter is required, and you can use both in the same call. See [Supported queries](docId\:gHOR_tm-Xo7xBWWPI6WRw) for more information.<br />**Parameter Type:** Query<br />**Data Type:** Number<br />The Label ID.                                                                                                                                                                                                                                                                                                                                   |                                                    |
| fields             | **Required**<br />**Parameter Type:** Query<br />**Data Type:** List of strings<br />**Min:** 1 field<br />**Max:** 512 fields<br />Comma-separated list of the names of fields to be returned; Each field should be no more than 320 characters long. See [Valid fields Parameter Values](docId\:fOs_16e3LEMDZlZHwsMFJ) for a list of valid values, and [Get the list of searchable device fields](docId\:gHOR_tm-Xo7xBWWPI6WRw) for how to query for the values. See [Supported queries](docId\:gHOR_tm-Xo7xBWWPI6WRw) for more information.                                                            | user.display\_name%2Ccommon.current\_phone\_number |
| limit              | **Parameter Type:** Query<br />**Data Type:** Number<br />**Min:** 0<br />Indicates the maximum number of entries to return. Must be at least 0 and no more than 200.                                                                                                                                                                                                                                                                                                                                                                                                                                     |                                                    |
| offset             | **Parameter Type:** Query<br />**Data Type:** Number<br />**Min:** 0<br />**Max:** 10,000,000<br />**Default:** 0<br />Indicates the index of the first entry to return.                                                                                                                                                                                                                                                                                                                                                                                                                                  |                                                    |
| sortField          | **Parameter Type:** Query<br />**Data Type:** String<br />**Min:** 1 character<br />**Max:** 320 characters<br />Name of the field to use for sorting.                                                                                                                                                                                                                                                                                                                                                                                                                                                    |                                                    |
| sortOrder          | **Parameter Type:** Query<br />**Data Type:** String<br />**Default:** ASC<br />Indicates the order in which entries are returned. Values can be "ASC" or "DESC".                                                                                                                                                                                                                                                                                                                                                                                                                                         | ASC                                                |

### Supported queries

The following table describes the supported and unsupported query formats. Any deviation from the query formats noted as “supported” is unsupported.

| API Call               | Supported?  | Sample Request                                                                                                                                                            | Sample Response                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| ---------------------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Only simple query      | Unsupported | https\://\[Ivanti EPMM]/api/v2/devices?adminDeviceSpaceId=1\&fields=common.os\_version,common.uuid\&query=test                                                            | <font color="#000000">\{</font><br /><font color="#000000">    "messages"\: \[</font><br /><font color="#000000">        \{</font><br /><font color="#000000">            "type"\: "Error",</font><br /><font color="#000000">            "messageKey"\: "com.mobileiron.vsp.messages.advancedsearch.parse.failure",</font><br /><font color="#000000">            "localizedMessage"\: "Unrecognized token '&lt;EOF&gt;' at position 4",</font><br /><font color="#000000">            "messageParameters"\: \[</font><br /><font color="#000000">                "&lt;EOF&gt;",</font><br /><font color="#000000">                4</font><br /><font color="#000000">            \]</font><br /><font color="#000000">        \}</font><br /><font color="#000000">    \]</font><br /><font color="#000000">\}</font> |
| Simple query & label   | Supported   | https\://\[Ivanti EPMM]/api/v2/devices?adminDeviceSpaceId=1\&fields=common.os\_version,common.uuid\&labelId=4\&query=test                                                 | <font color="#000000">\{</font><br /><font color="#000000">    "results"\: \[</font><br /><font color="#000000">        \{</font><br /><font color="#000000">            "common.os\_version"\: "12.1.2",</font><br /><font color="#000000">            "common.uuid"\: "c592e4f3-4e76-4148-a91e-c62da8464968"</font><br /><font color="#000000">        \}</font><br /><font color="#000000">    \],</font><br /><font color="#000000">    "totalCount"\: 1,</font><br /><font color="#000000">    "resultCount"\: 1,</font><br /><font color="#000000">    "searchTimeMillis"\: 11,</font><br /><font color="#000000">    "currentServerTimeMilliseconds"\: 1551852839417,</font><br /><font color="#000000">    "hasMore"\: false</font><br /><font color="#000000">\}</font>                                         |
| Advanced search        | Supported   | https\://\[Ivanti EPMM]/api/v2/devices?adminDeviceSpaceId=1\&fields=common.os\_version,common.uuid\&query="common.uuid"="c592e4f3-4e76-4148-a91e-c62da8464968"            | <font color="#000000">\{</font><br /><font color="#000000">    "results"\: \[</font><br /><font color="#000000">        \{</font><br /><font color="#000000">            "common.os\_version"\: "12.1.2",</font><br /><font color="#000000">            "common.uuid"\: "c592e4f3-4e76-4148-a91e-c62da8464968"</font><br /><font color="#000000">        \}</font><br /><font color="#000000">    \],</font><br /><font color="#000000">    "totalCount"\: 1,</font><br /><font color="#000000">    "resultCount"\: 1,</font><br /><font color="#000000">    "searchTimeMillis"\: 3,</font><br /><font color="#000000">    "currentServerTimeMilliseconds"\: 1551852943226,</font><br /><font color="#000000">    "hasMore"\: false</font><br /><font color="#000000">\}</font>                                          |
| Label & advanced query | Unsupported | https\://\[Ivanti EPMM]/api/v2/devices?adminDeviceSpaceId=1\&fields=common.os\_version,common.uuid\&labelId=4\&query="common.uuid"="c592e4f3-4e76-4148-a91e-c62da8464968" | <font color="#000000">\{</font><br /><font color="#000000">    "results"\: \[\],</font><br /><font color="#000000">    "totalCount"\: 0,</font><br /><font color="#000000">    "resultCount"\: 0,</font><br /><font color="#000000">    "searchTimeMillis"\: 133,</font><br /><font color="#000000">    "currentServerTimeMilliseconds"\: 1551853012054,</font><br /><font color="#000000">    "hasMore"\: false</font><br /><font color="#000000">\}</font>                                                                                                                                                                                                                                                                                                                                                             |
| Only label             | Supported   | https\://\[Ivanti EPMM]/api/v2/devices?adminDeviceSpaceId=1\&labelId=4\&fields=common.os\_version,common.uuid                                                             | <font color="#000000">\{</font><br /><font color="#000000">    "results"\: \[</font><br /><font color="#000000">        \{</font><br /><font color="#000000">            "common.os\_version"\: "12.1.2",</font><br /><font color="#000000">            "common.uuid"\: "c592e4f3-4e76-4148-a91e-c62da8464968"</font><br /><font color="#000000">        \}</font><br /><font color="#000000">    \],</font><br /><font color="#000000">    "totalCount"\: 1,</font><br /><font color="#000000">    "resultCount"\: 1,</font><br /><font color="#000000">    "searchTimeMillis"\: 3,</font><br /><font color="#000000">    "currentServerTimeMilliseconds"\: 1551853076127,</font><br /><font color="#000000">    "hasMore"\: false</font><br /><font color="#000000">\}</font>                                          |

### Response fields

| Field                                                                     | Description                                                                                                                                                                             |
| ------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| results                                                                   | An array of retrieved objects. Each object includes just the fields requested with the fields parameter.                                                                                |
| <font color="#000000">        </font>common.ip\_address                   | The device’s IP address, for example, 10.11.103.146.                                                                                                                                    |
| <font color="#000000">        </font>common.os\_version                   | The device’s OS version, for example, 4.4.                                                                                                                                              |
| <font color="#000000">        </font>common.platform\_name                | The device's platform name and OS version, for example, Android 4.4.                                                                                                                    |
| <font color="#000000">        </font>common.locale                        | The locale, for example, en-US.                                                                                                                                                         |
| <font color="#000000">        </font>common.storage\_capacity             | The device’s storage capacity in bytes, for example, 11766960000.                                                                                                                       |
| <font color="#000000">        </font>common.miclient\_last\_connected\_at | When the client last connected to Ivanti EPMM, for example, 2016-07-11T19:19:26.000Z.                                                                                                   |
| <font color="#000000">        </font>common.home\_operator\_name          | Operator of the device, for example, AT\&T.                                                                                                                                             |
| <font color="#000000">        </font>common.uuid                          | The device’s UUID, for example, a57dcd91-f9a4-428e-bd47-3dd96bb7e1f9. It is the internal identifier for the device.                                                                     |
| <font color="#000000">        </font>common.quarantined                   | Boolean. True or false, is the device quarantined.                                                                                                                                      |
| <font color="#000000">        </font>common.id                            | The internal ID number of the device in Ivanti EPMM.                                                                                                                                    |
| <font color="#000000">        </font>common.device\_space\_name           | The name of the device space to which the device belongs. “Global” is the name of the default main device space.                                                                        |
| <font color="#000000">        </font>common.ccm\_migration\_status        | Displays status of the device’s migration from Ivanti EPMM to Cloud.                                                                                                                    |
| <font color="#000000">        </font>common.imsi                          | The international mobile subscriber identity of the device, for example, 310410792173128. This is a unique number identifying a GSM subscriber.                                         |
| <font color="#000000">        </font>common.ccm\_migration\_status        | Displays status of the device’s migration from Ivanti EPMM to Cloud.                                                                                                                    |
| <font color="#000000">        </font>android.afw\_capable                 | Boolean. True or false, is the device Apps for Work capable.                                                                                                                            |
| <font color="#000000">        </font>common.storage\_free                 | How much free storage in bytes is there on the device, for example, 9754620000.                                                                                                         |
| <font color="#000000">        </font>common.device\_is\_compromised       | Boolean. True or false, is the device compromised.                                                                                                                                      |
| <font color="#000000">        </font>common.owner                         | The device owner, often the company that owns the device.                                                                                                                               |
| <font color="#000000">        </font>custom.device.attribute\_name        | Name of the custom value attribute and its corresponding value.                                                                                                                         |
| <font color="#000000">        </font>user.email\_address                  | Email address of the device’s user.                                                                                                                                                     |
| <font color="#000000">        </font>common.manufacturer                  | Device manufacturer, for example, Samsung.                                                                                                                                              |
| <font color="#000000">        </font>common.data\_protection\_enabled     | Boolean. True or false, is the device data protection enabled.                                                                                                                          |
| <font color="#000000">        </font>common.mdm\_managed                  | Boolean. True or false, is the device managed by a mobile device management system.                                                                                                     |
| <font color="#000000">        </font>common.memory\_free                  | How much free memory in bytes does the device have, for example, 615304396.                                                                                                             |
| <font color="#000000">        </font>common.model                         | The model name of the device, for example, SAMSUNG-SM-G900A.                                                                                                                            |
| <font color="#000000">        </font>common.memory\_capacity              | How much memory in bytes does the device have, for example, 1946943488.                                                                                                                 |
| <font color="#000000">        </font>common.client\_name                  | The bundle name of the client on the device, for example, com.mobileiron.                                                                                                               |
| <font color="#000000">        </font>common.status                        | Status of the device, for example, ACTIVE, PENDING, RETIRED.                                                                                                                            |
| <font color="#000000">        </font>common.current\_phone\_number        | Phone number of the device.                                                                                                                                                             |
| <font color="#000000">        </font>common.platform                      | Platform of the device, for example, Android.                                                                                                                                           |
| <font color="#000000">        </font>common.imei                          | International Mobile Station Equipment Identity of the device, for example, 354691065438150. Used to identify 3GPP and iDEN mobile phones, as well as some satellite phones.            |
| <font color="#000000">        </font>user.display\_name                   | Name of the user associated with the device.                                                                                                                                            |
| <font color="#000000">        </font>common.creation\_date                | Date the corresponding account was created, for example, 2016-07-11T19🔞13.000Z.                                                                                                        |
| <font color="#000000">        </font>android.attestation                  | The attestation status of the device, for example, UNKNOWN.                                                                                                                             |
| <font color="#000000">        </font>common.background\_status            | The background status of the device, for example, 0.                                                                                                                                    |
| <font color="#000000">        </font>common.last\_connected\_at           | The time and date of the last MDM checkin of the device, for example, 2016-07-11T19:19:26.000Z.                                                                                         |
| <font color="#000000">        </font>common.home\_country\_name           | Cellular home country of the device, for example, United States.                                                                                                                        |
| <font color="#000000">        </font>android.registration\_status         | Registration level of the device user, for example, Device Admin.                                                                                                                       |
| <font color="#000000">        </font>common.battery\_level                | Remaining power level of the device’s battery, for example, 100.                                                                                                                        |
| <font color="#000000">        </font>common.client\_version               | The version of the client app on the device, for example, 9.0.1.0.68D.                                                                                                                  |
| <font color="#000000">        </font>common.language                      | The device’s language, for example, English.                                                                                                                                            |
| <font color="#000000">        </font>user.user\_id                        | ID of the user associated with the device, for example, testuser2264.                                                                                                                   |
| <font color="#000000">        </font>common.compliant                     | Boolean. True or false, is the device compliant.                                                                                                                                        |
| <font color="#000000">        </font>common.registration\_date            | Date that the device registered with Ivanti EPMM, for example, 2016-07-11T19:19:26.000Z.                                                                                                |
| <font color="#000000">        </font>common.device\_admin\_enabled        | Boolean. True or false, is the device MDM managed. For Android, this means the client app is set as a Device Admin. For iOS, this means the MDM certificate is installed on the device. |
| totalCount                                                                | The total number of entries that the query matched.                                                                                                                                     |
| resultCount                                                               | The number of entries that are being returned.                                                                                                                                          |
| hasMore                                                                   | Indicates that there are more entries available.                                                                                                                                        |

### Sample request and response

### Request

Search for smart phones with “Samsung” in their name.

`{noformat}`

`curl 'https://[Ivanti EPMM]/admin/rest/api/v2/devices?count=50&offset=0&sortOrder=ASC&sortField=user.display_name&fields=user.display_name,common.current_phone_number,common.model,common.manufacturer,common.mdm_managed,common.platform_name,common.home_country_name,common.registration_date,common.last_connected_at,common.miclient_last_connected_at,common.owner,common.home_operator_name,common.language,common.creation_date,common.uuid,common.clientId,user.email_address,common.comment,user.user_id,common.storage_capacity,common.device_is_compromised,common.noncompliance_reasons,common.compliant,common.platform,common.quarantined,common.quarantined_reasons,common.id,android.attestation,ios.wakeup_status,common.status,common.device_space_name,common.background_status,common.data_protection_enabled,common.data_protection_reasons,common.device_admin_enabled,common.memory_capacity,common.memory_free,common.storage_capacity,common.storage_free,common.battery_level,common.client_name,common.client_version,ios.DataRoamingEnabled,common.locale,common.ethernet_mac,common.imei,common.imsi,common.ip_address,ios.iPhone ICCID,ios.iPhone MAC_ADDRESS_EN0,ios.iPhone UDID,ios.iPhone VERSION,ios.DeviceName,common.os_version,android.afw_capable,android.registration_status&labelId=-1&query=samsung&page=1&start=0&limit=50' -H 'authUserId: bWlhZG1pbg=='`

`{noformat}`

### Response

`{`

    `"results": [`

        `{`

            `"common.ip_address": "10.11.103.146",`

            `"common.os_version": "4.4",`

            `"common.platform_name": "Android 4.4",`

            `"common.locale": "en-US",`

            `"common.storage_capacity": 11766960000,`

            `"common.miclient_last_connected_at": "2016-07-11T19:19:26.000Z",`

            `"common.home_operator_name": "AT&T",`

            `"common.uuid": "a57dcd91-f9a4-428e-bd47-3dd96bb7e1f9",`

            `"common.quarantined": false,`

            `"common.id": 9,`

            `"common.device_space_name": "Global",`

            `"common.ccm_migration_status": "None",`

            `"common.imsi": "310410792173128",`

            `"android.afw_capable": false,`

            `"common.storage_free": 9754620000,`

            `"common.device_is_compromised": false,`

            `"common.owner": "COMPANY",`

            `"user.email_address": "testuser2264@auto8.mobileiron.com",`

            `"common.manufacturer": "samsung",`

            `"common.data_protection_enabled": true,`

            `"common.mdm_managed": false,`

            `"common.memory_free": 615304396,`

            `"common.model": "SAMSUNG-SM-G900A",`

            `"common.memory_capacity": 1946943488,`

            `"common.client_name": "com.mobileiron",`

            `"common.status": "ACTIVE",`

            `"common.current_phone_number": "PDA",`

            `"common.platform": "Android",`

            `"common.imei": "354691065438150",`

            `"user.display_name": "testuser2264",`

            `"common.creation_date": "2016-07-11T19:18:13.000Z",`

            `"android.attestation": "Unknown",`

            `"common.background_status": 0,`

            `"common.last_connected_at": "2016-07-11T19:19:26.000Z",`

            `"common.home_country_name": "United States",`

            `"android.registration_status": "Device Admin",`

            `"common.battery_level": 100,`

            `"common.client_version": "9.0.1.0.68D",`

            `"common.language": "English",`

            `"user.user_id": "testuser2264",`

            `"common.compliant": true,`

            `"common.registration_date": "2016-07-11T19:19:26.000Z",`

            `"common.device_admin_enabled": true`

        `}`

    `],`

    `"totalCount": 1,`

    `"resultCount": 1,`

    `"searchTimeMillis": 51,`

    `"currentServerTimeMilliseconds": 1468265055060,`

    `"hasMore": false`

`}`

## Self-register a device

This call enables a user to self-register a device on the user portal.

### Required Role

See [Authentication](docId\:hJ6Ul2Sz4DNsmnPJ-Fxl_) 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 Role                                                                         |
| ------------------------------------------------------------------------------------- |
| **Category:** Device Management<br />**Role Description:** Manage devices, restricted |

### HTTP method

POST

### Request URI

api/v2/users/register\_device

### Request parameters

| Parameter              | Description                                                                                                                           | Sample Value |
| ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------- | ------------ |
| countryCode            | **Required**<br />**Parameter Type:** Request body<br />**Data Type:** Integer<br />Country code of target device.                    | 1            |
| deviceLanguageId       | **Parameter Type:** Request body<br />**Data Type:** Long<br />Language of target device.                                             | 1            |
| isPhoneNumberAvailable | **Required**<br />**Parameter Type:** Request body<br />**Data Type:** Boolean<br />true or false.                                    | false        |
| isForceRegister        | **Parameter Type:** Request body<br />**Data Type:** Boolean<br />true or false. Specify whether to force registration.               | false        |
| notifyUser             | **Parameter Type:** Request body<br />**Data Type:** Boolean<br />Specify whether to notify the user. true or false. Default is true. | true         |
| operatorId             | **Required**<br />**Parameter Type:** Request body<br />**Data Type:** Long<br />Carrier ID.                                          | 269          |
| phoneNumber            | **Parameter Type:** Request body<br />**Data Type:** String<br />Device phone number                                                  | 5555555555   |
| platform               | **Required**<br />**Parameter Type:** Request body<br />**Data Type:** String<br />Device type                                        | I            |

### Response fields

| Field       | Description                 |
| ----------- | --------------------------- |
| results     | Container for results.      |
| passcode    | Device passcode.            |
| ttl         | Passcode expiration date.   |
| regLink     | Registration URL.           |
| email       | Email for device owner.     |
| totalCount  | Number of matching items.   |
| resultCount | Number of returned results. |

### Sample request

```javascript
curl -kv -u username:password -H "Content-Type: application/json" --data '{"countryCode": 1, "deviceLanguageId": 1, "isForceRegister": "false", "isPhoneNumberAvailable": "true", "notifyUser": "true", "operatorId": 269, "phoneNumber": "4083338888", "platform": "I"}' -XPOST 'https://[Ivanti EPMM]/api/v2/users/register_device';
```

### Sample response

```javascript
 {
	"results": [
		{
		"passcode": "600698",
		"ttl": "120",
		"regLink": "http://[Ivanti EPMM]:8080/mifs/c/d/ios.html",
		"email": "miadmin@mobileiron.com"
		}
	],
	"totalCount": 1,
	"resultCount": 1
}
```

## Act on a device

This call performs one of the following actions on a device:

- ENABLE\_VOICE\_ROAMING (iOS)
- DISABLE\_VOICE\_ROAMING (iOS)
- ENABLE\_DATA\_ROAMING (iOS)
- DISABLE\_DATA\_ROAMING (iOS)
- ENABLE\_PERSONAL\_HOTSPOT (iOS)
- DISABLE\_PERSONAL\_HOTSPOT (iOS)
- SEND\_MESSAGE (Android, iOS)
- UPDATE\_OS (iOS)
- UNLOCK\_APP\_CONNECT\_CONTAINER (Android)
- UNLOCK\_DEVICE\_ONLY (Android, iOS)

### Required Role

See [Authentication](docId\:hJ6Ul2Sz4DNsmnPJ-Fxl_) 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 Role                                                                         |
| ------------------------------------------------------------------------------------- |
| **Category:** Device Management<br />**Role Description:** Manage devices, restricted |

### HTTP method

POST

### Request URI

api/v2/devices/action

### Request parameters

| Parameter          | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            | Sample Value                         |
| ------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------ |
| adminDeviceSpaceId | **Required**<br />**Parameter Type:** Query<br />**Data Type:** Number<br />Device space ID of the administrator.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | 1                                    |
| actionType         | **Required**<br />**Parameter Type:** Query<br />**Data Type:** String<br />The action to perform.<br />One of:<br />- ENABLE\_VOICE\_ROAMING (iOS)<br />- DISABLE\_VOICE\_ROAMING (iOS)<br />- ENABLE\_DATA\_ROAMING (iOS)<br />- DISABLE\_DATA\_ROAMING (iOS)<br />- ENABLE\_PERSONAL\_HOTSPOT (iOS)<br />- DISABLE\_PERSONAL\_HOTSPOT (iOS)<br />- SEND\_MESSAGE (Android, iOS)<br />- UPDATE\_OS (iOS)<br />- UNLOCK\_APP\_CONNECT\_CONTAINER (Android)<br />- UNLOCK\_DEVICE\_ONLY (Android, iOS)<br />- AVAILABLE\_OS\_UPDATES (iOS and macOS)<br />- ENABLE\_BLUETOOTH\_ACTION (iOS and macOS)<br />- DISABLE\_BLUETOOTH\_ACTION (iOS and macOS)<br />- ENABLE\_REMOTE\_LOGGING (Android and iOS)<br />- DISABLE\_REMOTE\_LOGGING (Android and iOS)<br />- REFRESH\_ESIM\_CELLULAR\_PLAN (iOS)<br />- SET\_SHARED\_DEVICE\_CONFIGURATION (iOS)<br />- RESTART\_DEVICE (iOS Supervised)<br />- SHUTDOWN\_DEVICE (iOS Supervised) | ENABLE\_VOICE\_ROAMING               |
| deviceUuids        | **Required**<br />**Parameter Type:** Request body<br />**Data Type:** Array of UUID Strings<br />UUID Strings of the devices on which to perform the action.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | a2556e62-2ed0-4d42-98fd-a342eaf3e4e6 |
| note               | **Parameter Type:** Request body<br />**Data Type:** String<br />**Min:** 1 character<br />**Max:** 200 characters<br />Note describing the action.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | Turning off voice roaming.           |

### Additional request parameters for send\_message

| Parameter            | Description                                                                                                                                                                                | Sample Value                                                                                                                                       |
| -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------- |
| note                 | **Parameter Type:** Request body<br />**Data Type:** String<br />Note about the message being sent.                                                                                        | Alerting owner to policy violation.                                                                                                                |
| additionalParameters | **Required**<br />**Parameter Type:** Request body<br />**Data Type:** String<br />Container for the following additional parameters:<br />- message<br />- mode<br />- subject<br />- app | "additionalParameters" : \{"message" : "Your device is in policy violation.","mode" : "sms","subject":"Important message","app" : "Motorola MC75"} |
| message              | **Required**<br />**Parameter Type:** Request body<br />**Data Type:** String<br />Message to send.                                                                                        | Your device is in policy violation.                                                                                                                |
| mode                 | **Required**<br />**Parameter Type:** Request body<br />**Data Type:** String<br />Mode of transmission for the message.<br />Valid values:<br />- sms<br />- pns<br />- email             | sms                                                                                                                                                |
| subject              | **Required**<br />**Parameter Type:** Request body<br />**Data Type:** String<br />Subject of the message.                                                                                 | Important news about your device                                                                                                                   |

### Response fields

| Field         | Description                                                                                                                   |
| ------------- | ----------------------------------------------------------------------------------------------------------------------------- |
| actionType    | The action that was successful.                                                                                               |
| deviceResults | A map of "device-uuid":"status", where the status describes whether the action succeeded or why it failed.                    |
| successful    | Returns “true” if the action is successful on all devices, or “false” if the action is not successful on one or more devices. |

### Sample request and response

### Request

Enable data roaming.

curl -k -sS -u \<userName>:\<password> -v -XPOST 'https\://\[Ivanti EPMM]/api/v2/devices/action?adminDeviceSpaceId=1\&actionType=ENABLE\_VOICE\_ROAMING' -d '\{ "deviceUuids": \["a2556e62-2ed0-4d42-98fd-a342eaf3e4e6","aa0a05dc-14c9-4355-9640-406b5c219c06","d427879e-bdce-469a-810e-d38eef39bf8e"], "note" : "sample note" }' -H 'Content-Type\:application/json'

### Response

`{`

    `"actionType": "ENABLE_VOICE_ROAMING",`

    `"deviceResults": {`

        `"a68bb0cf-7a35-4d52-8259-c83398a41160": "Device Action Successful"`

    `},`

    `"successful": true`

`}`

### Request

Send message

curl -k -sS -u \<userName>:\<password> -v -XPOST 'https\://\[Ivanti EPMM]/api/v2/devices/action?adminDeviceSpaceId=1\&actionType=SEND\_MESSAGE' -d '\{ "deviceUuids": \["db46d2ca-df92-46d6-807e-8eb014e28a6f"], "note" : "Alerting owner to policy violation.", "additionalParameters" : \{"message" : "Your device is in policy violation","mode" : "sms","subject":"Important news about your device","app" : "Motorola MC75"} }' -H 'Content-Type\:application/json'

### Response

\{

"actionType"": ""SEND\_MESSAGE"

"deviceResults"": \{

"db46d2ca-df92-46d6-807e-8eb014e28a6f"": "Device Action Successful"

}-

"successful"": true

}

## Export devices

This call returns a CSV file for all devices found by the search. Use the fieldGroups parameter to specify a list of field groups to be returned in the CSV file.

### Required Role

See [Authentication](docId\:hJ6Ul2Sz4DNsmnPJ-Fxl_) 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 Role                                                                                          |
| ------------------------------------------------------------------------------------------------------ |
| **Category:** Device Management<br />**Role Description:** View dashboard, device page, device details |

### HTTP method

POST

### Request URI

api/v2/devices

### Request parameters

| Parameter          | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | Sample Value                           |
| ------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------- |
| adminDeviceSpaceId | **Required**<br />**Parameter Type:** Query<br />**Data Type:** Number<br />Device space ID of the administrator.                                                                                                                                                                                                                                                                                                                                                                        | 1                                      |
| query              | **Required**: One of either the query or labelId parameters is required, and you can use both in the same call.<br />**Parameter Type:** Query<br />**Data Type:** String<br />**Min:** 0 character<br />**Max:** 2000 characters<br />Search expression. An empty query returns everything. See [Query Operators and Search Fields](docId\:ZAiHpcon5EHTHJ0Gidh-F) for complete details on the query operators and search fields you can use to construct the query parameter statement. |                                        |
| labelId            | **Required**: One of either the labelId or query parameter is required, and you can use both in the same call.<br />**Parameter Type:** Query<br />**Data Type:** Number<br />The Label ID.                                                                                                                                                                                                                                                                                              |                                        |
| fieldGroups        | **Required**<br />**Parameter Type:** Query<br />**Data Type:** List of strings<br />**Min:** 1 field group<br />**Max:** 20 field groups<br />Comma-separated list of the names of field groups to be returned. Each field group should be no more than 20 characters long. May be any sequence of the following group names: "BASIC", "COMMON", "ANDROID", "IOS", "USER", "WINDOWS\_PHONE"                                                                                             | USER,COMMON,ANDROID,IOS,WINDOWS\_PHONE |
| limit              | **Parameter Type:** Query<br />**Data Type:** Number<br />**Min:** 0<br />**Max:** 2000<br />**Default:** 2000<br />Indicates the maximum number of entries to return.                                                                                                                                                                                                                                                                                                                   |                                        |
| offset             | **Parameter Type:** Query<br />**Data Type:** Number<br />**Min:** 0<br />**Max:** 10,000,000<br />**Default:** 0<br />Indicates the index of the first entry to return.                                                                                                                                                                                                                                                                                                                 |                                        |
| sortField          | **Parameter Type:** Query<br />**Data Type:** String<br />**Min:** 1 character<br />**Max:** 320 characters<br />Name of the field to use for sorting.                                                                                                                                                                                                                                                                                                                                   |                                        |
| sortOrder          | **Parameter Type:** Query<br />**Data Type:** String<br />**Default:** ASC<br />Indicates the order in which entries are returned. Values can be "ASC" or "DESC".                                                                                                                                                                                                                                                                                                                        | ASC                                    |

### Response values

**Content-Type:** text/csv

**Content-Disposition:** attachment; filename= DeviceSearchResult.csv

### Sample request and response

### Request

`curl "https://`\[Ivanti EPMM]`/api/v2/devices?fieldGroups=USER"%"2CCOMMON"%"2CANDROID"%"2CIOS"%"2CWINDOWS_PHONE&labelId=-10&query=" -H "Content-type: application/json" --data "authUserId=bWlhZG1pbg"%"3D"%"3D"`

### Response

Response is a CSV file containing the retrieved values.

## Delete devices

### 1. API Call

This call deletes retired iOS, OS X, Win 8, or Android devices that have not been modified in the last day.

### Required Role

| Required Role                                                                               |
| ------------------------------------------------------------------------------------------- |
| **Category:** Device Management<br />**Role Description:** Delete retired device (API only) |

### HTTP method

DELETE

### Request URI

api/v2/devices

### Request parameters

| Parameter          | Description                                                                                                                                                                                                                                          | Sample Value                         |
| ------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------ |
| adminDeviceSpaceId | **Required**<br />**Parameter Type:** Query<br />**Data Type:** Number<br />Device space ID of the administrator.                                                                                                                                    |                                      |
| deviceUuids        | **Parameter Type:** Request body<br />**Data Type:** Array of strings<br />**Min:&#x20;**&#x31; deviceUuid<br />**Max:** 512 deviceUuids<br />Comma-separated list of device uuids to delete if retired and is of platform iOS, OS X, Win8, Android. | 10c43352-15b2-413b-a3e0-4daf3977711a |
| wifiMacs           | **Parameter Type:** Request body<br />**Data Type:** Array of strings<br />**Min:&#x20;**&#x31; wifiMacs<br />**Max:** 512 wifiMacs<br />Comma-separated list of wifiMacs to delete if retired and is of platform iOS, OS X, Win8, Android.          | 2a393b114f7c                         |
| principals         | **Parameter Type:** Request body<br />**Data Type:** Array of strings<br />**Min:&#x20;**&#x31; principals<br />**Max:** 512 principals<br />Comma-separated list of principals to delete if retired and is of platform iOS, OS X, Win8, Android.    |                                      |

### Response object

A JSON object containing the following fields:

| Field     | Description                                                                                                      |
| --------- | ---------------------------------------------------------------------------------------------------------------- |
| (unnamed} | An array of the UUIDs of those devices that were eligible to be deleted. An empty list means no devices deleted. |

### Sample request and response

### Request

`curl -k -sS -u username:password -XDELETE -H "Content-Type: application/json" 'https://`\[Ivanti EPMM]`/api/v2/devices?adminDeviceSpaceId=1' -d '{ "deviceUuids" : [ "10c43352-15b2-413b-a3e0-4daf3977711a", "B0BAB9BA-388E-4612-B579-43A40411670C" ] }'`

### Response

Only the first UUID was returned because it met the criteria for deletion. The second UUID was not deleted, either because it was not retired, it had been modified within the last day, or it was not of the correct platform.

`[`

    `"10c43352-15b2-413b-a3e0-4daf3977711a"`

`]`

### 2. Manual Deletion

This call deletes iOS, macOS, Windows, or Android devices which are in **Wipe-Pending**, **Retire-Pending**, **Unknown**, **Wiped** and **Retired** states. The deletion can be tracked in Audit logs.

### Required Role

| Required Role                                                                    |
| -------------------------------------------------------------------------------- |
| **Category:** Device Management<br />**Role Description:** Delete retired device |

### HTTP method

DELETE

### Request URI

api/v2/devices

### Request parameters

| Parameter        | Description                                                                                                                                                                                             | Sample Value                         |
| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------ |
| requestingSource | **Parameter Type:** Request body<br />**Data Type:** String<br />This api call is considered to be manual deletion only if this param’s value is<br />“Admin Portal Manual Deletion”                    | Admin Portal Manual Deletion         |
| deviceUuids      | **Parameter Type:** Request body<br />**Data Type:** Array of strings<br />**Min:&#x20;**&#x31; deviceUuid<br />**Max:** 512 deviceUuids<br />Comma-separated list of valid device uuids to be deleted. | 10c43352-15b2-413b-a3e0-4daf3977711a |
| action           | **Parameter Type:** Request body<br />**Data Type:** String<br />This must be "d" for deletion.                                                                                                         | d                                    |
| adminNote        | **Parameter Type:** Request body<br />**Data Type:** String<br />This is the admin's note(reason for deletion or other)                                                                                 | deleting unwanted devices            |

### Response object

A JSON object which has a message - **Delete devices initiated. Please check audit logs for status.**

### Sample request and response

### Request

curl -k -sS -u username\:password -XDELETE -H "Content-Type: application/json" 'https\:// \[Ivanti EPMM]/api/v2/devices?adminDeviceSpaceId=1' -d

'\{

"deviceUuids":\["3eb984c8-1016-43e8-b241-3149bb415816","810af170-f971-49d9-8794-81b465f533c0"],

"action":"d",

"adminNote":"deleting unwanted devices",

"requestingSource":"Admin Portal Manual Deletion"

}'

### Response

\{

"results": \[],

"messages": \[

\{

"localizedMessage": "Delete devices initiated. Please check audit logs for status."

}

],

"totalCount": 0,

"resultCount": 0

}

## Reboot devices

This call reboots multiple Android devices.

### Required Role

See [Authentication](docId\:hJ6Ul2Sz4DNsmnPJ-Fxl_) 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 Role                                                             |
| ------------------------------------------------------------------------- |
| **Category:** Device Management<br />**Role Description:** Manage devices |

### HTTP method

POST

### Request URI

api/v2/devices/reboot

### Request parameters

| Parameter          | Description                                                                                                                        | Sample Value                         |
| ------------------ | ---------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------ |
| adminDeviceSpaceId | **Required**<br />**Parameter Type:** Query<br />**Data Type:** Number<br />Device space ID of the administrator.                  | adminDeviceSpaceId=1                 |
| deviceUuids        | **Required**<br />**Parameter Type:** Request body<br />**Data Type:** Array of strings<br />Comma separated list of device uuids. | 8dd8912e-d604-442d-8c9d-82414e72017e |

### Response fields

| Field   | Description                                      |
| ------- | ------------------------------------------------ |
| results | Indicates the outcome for the action per device. |

### Sample request and response

### Request

```bash
curl --location '[Ivanti EPMM]/api/v2/devices/reboot?adminDeviceSpaceId=1' \
-H 'Authorization: Basic <token>' \
-H 'Content-Type: application/json' \
--data '{
"deviceUuids": [
"8dd8912e-d604-442d-8c9d-82414e72017e",
"1881ffde-fcf4-4f9f-98ee-dd37df16070e",
"27d0e754-19a4-4b10-bb21-020800134108"
]
}'
```

### Response

```bash
"results" :[
{
"resultId": "114",
"resultMessage": null,
"records": [
"1a76d347-ebb8-49d3-ad9c-ce8876c1133f"
]
},
{
"resultId": "111",
"resultMessage": null,
"records": [
"miaadmin:Android:+15551234567- Mobile platform not supported"
]
}
],
"resultCount": 2,
"actionType": "REBOOT",
"deviceResults":{
"1881ffde-fcf4-4f9f-98ee-dd37df16070e": "Unsupported Platform for Device Action",
"1a76d347-ebb8-49d3-ad9c-ce8876c1133f": "Device Action Successful"
```

## Count devices

This call returns the count of devices that match the specified query.

### Required Role

See [Authentication](docId\:hJ6Ul2Sz4DNsmnPJ-Fxl_) 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 Role                                                                                          |
| ------------------------------------------------------------------------------------------------------ |
| **Category:** Device Management<br />**Role Description:** View dashboard, device page, device details |

### HTTP method

GET

### Request URI

api/v2/devices/count

### Request parameters

| Parameter          | Description                                                                                                                                                                                                                                                                                                                                                                                          | Sample Value                                   |
| ------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------- |
| adminDeviceSpaceId | **Required**<br />**Parameter Type:** Query<br />**Data Type:** Number<br />Device space ID of the administrator.                                                                                                                                                                                                                                                                                    | adminDeviceSpaceId=1                           |
| query              | **Required**<br />**Parameter Type:** Query<br />**Data Type:** Number<br />**Min:** 0 characters<br />**Max:** 2000 characters<br />Search expression. An empty query returns the count of all devices. See [Query Operators and Search Fields](docId\:ZAiHpcon5EHTHJ0Gidh-F) for complete details on the query operators and search fields you can use to construct the query parameter statement. | query="common.manufacturer" starts with "Appl" |

### Response fields

| Field      | Description                                         |
| ---------- | --------------------------------------------------- |
| totalCount | The total number of entries that the query matched. |

### Sample request and response

### Request

Count all devices that are manufactured by Apple.

curl -X GET -H "Authorization: Basic \<token>" https\://\[Ivanti EPMM]]/api/v2/devices/count?adminDeviceSpaceId=1\&query="common.manufacturer" starts with "Appl"

### Response

\{

    "totalCount": 117

}

## Test an advanced search query

This call tests that the device-search query parses correctly.

### Required Role

See [Authentication](docId\:hJ6Ul2Sz4DNsmnPJ-Fxl_) 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 Role                                                                                          |
| ------------------------------------------------------------------------------------------------------ |
| **Category:** Device Management<br />**Role Description:** View dashboard, device page, device details |

### HTTP method

GET

### Request URI

api/v2/devices/query\_test

### Request parameters

| Parameter          | Description                                                                                                                                                                                                                                                                                                                                                                  | Sample Value                        |
| ------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------- |
| adminDeviceSpaceId | **Required**<br />**Parameter Type:** Query<br />**Data Type:** Number<br />Device space ID of the administrator.                                                                                                                                                                                                                                                            | adminDeviceSpaceId=1                |
| query              | **Required**<br />**Parameter Type:** Query<br />**Data Type:** Number<br />**Min:** 0 characters<br />**Max:** 2000 characters<br />Search expression. An empty query is valid. See [Query Operators and Search Fields](docId\:ZAiHpcon5EHTHJ0Gidh-F) for complete details on the query operators and search fields you can use to construct the query parameter statement. | query=manufacturer contains "Apple" |

### Response fields

| Field    | Description                                                                                                                             |
| -------- | --------------------------------------------------------------------------------------------------------------------------------------- |
| valid    | True if the query was valid; false otherwise.                                                                                           |
| token    | Represents the offending token if the query was invalid; the empty string otherwise.                                                    |
| position | The index of the first character of the offending token relative to the beginning of the line in which it occurs, 0..n-1; -1 otherwise. |

### Sample request and response

### Request

Validate the query.

curl -G -k -sS -u *username\:password* 'https\://\[Ivanti EPMM]/api/v2/device/query\_test' --data 'query%3Dmanufacturer%20contains%20%22blargle%22'

### Response

\{

    "valid": false,

    "token": "blargle",

    "position": 21

}

## Get the list of searchable device fields

This call gets the name and type of device, details, and LDAP fields. You can use this information to find values for the fields parameter for any of the API calls that allow specification of search fields, such as [Search for devices](docId\:gHOR_tm-Xo7xBWWPI6WRw).

### Required Role

See [Authentication](docId\:hJ6Ul2Sz4DNsmnPJ-Fxl_) 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 Role                                                                                          |
| ------------------------------------------------------------------------------------------------------ |
| **Category:** Device Management<br />**Role Description:** View dashboard, device page, device details |

### HTTP method

GET

### Request URI

api/v2/devices/search\_fields

### Request parameters

| Parameter          | Description                                                                                                       | Sample Value |
| ------------------ | ----------------------------------------------------------------------------------------------------------------- | ------------ |
| adminDeviceSpaceId | **Required**<br />**Parameter Type:** Query<br />**Data Type:** Number<br />Device space ID of the administrator. |              |

### Response fields

An array of field-name-to-data-type objects:

| Field | Description                                                                                                                                            |
| ----- | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
| name  | The name of the field, which may be prefixed with the group to which the field belongs. For example, "detail.APNS Capable" or "ldap.user.first\_name". |
| type  | The data type of the field, which could be "STRING", "NUMBER", or "DATE".                                                                              |

### Sample request and response

### Request

Get the fields.

curl -G -k -sS -u *username\:password* 'https\://\[Ivanti EPMM]/api/v2/device/search\_fields'

### Response

\[

        \{ "name" : "uuid", "type" : "STRING" },

        \{ "name" : "block\_reason", "type" : "NUMBER" },

        \{ "name" : "last\_connected\_at", "type" : "DATE" },

        \{ "name" : "details.APNS Capable", "type" : "STRING" },

        \{ "name" : "ldap.user.baseDn", "type" : "STRING" }

]

## Get device details

This call gets device details for a specific device.

### Required Role

See [Authentication](docId\:hJ6Ul2Sz4DNsmnPJ-Fxl_) 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 Role                                                                                          |
| ------------------------------------------------------------------------------------------------------ |
| **Category:** Device Management<br />**Role Description:** View dashboard, device page, device details |

### HTTP method

GET

### Request URI

api/v2/devices/\<deviceId>/details

### Request parameters

| Parameter          | Description                                                                                                       | Sample Value                         |
| ------------------ | ----------------------------------------------------------------------------------------------------------------- | ------------------------------------ |
| adminDeviceSpaceId | **Required**<br />**Parameter Type:** Query<br />**Data Type:** Number<br />Device space ID of the administrator. |                                      |
| deviceId           | **Required**<br />**Parameter Type:** Path<br />**Data Type:** String<br />The deviceId is the device UUID.       | 2e33329d-fed5-4f56-a2b7-65caa5ef0cfe |

### Response fields

| Field       | Description                                         |
| ----------- | --------------------------------------------------- |
| results     | Container for the array of detail objects returned. |
| totalCount  | The total number of entries that the query matched. |
| resultCount | The number of entries that are being returned.      |

### Sample request and response

### Request

curl "https\://\[Ivanti EPMM]/api/v2/devices/2e33329d-fed5-4f56-a2b7-65caa5ef0cfe/details -H "authUserId: username" -H "Accept: application/json"

### Response

\{

    results: \[

        \{

            name: "ios.ProductName",

            value: null

        },

        \{

            name: "common.current\_operator\_name",

            value: null

        },

        \{

            name: "ios.security\_reason\_code",

            value: "0x00000008"

        },

        \{

            name: "common.registration\_imsi",

            value: "310410"

        },

       ... \{

            name: "ios.BluetoothMAC",

            value: null

        },

        \{

            name: "ios.IsDeviceLocatorServiceEnabled",

            value: false

        }

    ],

    totalCount: 84,

    resultCount: 84

}

## Get OS update date

This call pulls the device OS update date after upgrading the device.

### Required Role

See [Authentication](docId\:hJ6Ul2Sz4DNsmnPJ-Fxl_) 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 Role                                                                  |
| ------------------------------------------------------------------------------ |
| **Category:** Device Management<br />**Role Description:** View OS update date |

### HTTP method

GET

### Request URI

/api/v2/devices/getosupdatedate

### Request parameters

| Parameter          | Description                                                                                                       | Sample Value                         |
| ------------------ | ----------------------------------------------------------------------------------------------------------------- | ------------------------------------ |
| adminDeviceSpaceId | **Required**<br />**Parameter Type:** Query<br />**Data Type:** Number<br />Device space ID of the administrator. | 1                                    |
| deviceUuids        | **Parameter Type**: Query<br />**Data Type**: Array of strings<br />Comma separated list of device uuids.         | 47d2eb63-4f20-4a5a-a7b1-aee467553f2c |

### Response fields

| Field        | Description                                  |
| ------------ | -------------------------------------------- |
| results      | Container for the results array shown below. |
| osUpdateDate | Provides the OS update date.                 |
| osVersion    |                                              |
| deviceUuid   |                                              |
| model        |                                              |
| platformType |                                              |
| name         |                                              |
| status       |                                              |
| registeredAt |                                              |

### Sample request and response

### Request

curl --location --request GET 'https\://\[Ivanti EPMM]/api/v2/devices/getosupdatedate?clientId=1073741854\&deviceUUID=47d2eb63-4f20-4a5a-a7b1-aee467553f2c\&adminDeviceSpaceId=1

### Response

```bash
{
"results": {
"osUpdateDate": "2024-04-23 09:04:49",
"osVersion": "iOS 17.4.1 (21E236)",
"deviceId": "CB3A1959-08AE-49EB-84EC-2BC5E64B88BA",
"model": "iPhone 12 mini",
"platformType": "iPhone",
"name": "testuser:iOS 17.4:PDA 3",
"status": "MDM_RETIRED",
"registeredAt": "Mon Apr 22 15:59:16 UTC 2024"
}
}
```

## Include battery health information in Android device details

This call includes battery health information in Android device details.

Additional battery health statistics per-device includes:

- Android Battery Charging Status
- Android Battery Health Status
- Battery Charge Cycles (OEM)\*
- Battery Health Percentage (OEM)\*
- Battery Manufacture Date (OEM)\*

\*The OEM fields only populate if the device is a Zebra device.

### Required Role

See [Authentication](docId\:hJ6Ul2Sz4DNsmnPJ-Fxl_) 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 Role                                                                                          |
| ------------------------------------------------------------------------------------------------------ |
| **Category:** Device Management<br />**Role Description:** View dashboard, device page, device details |

### HTTP method

GET

### Request URI

api/v2/devices/\<deviceId>/details?command=deviceDetail\&deviceId=\<deviceId>\&os=\<os version>\&isBatteryStatsRequired=\[true|false]

### Request parameters

| Parameter              | Description                                                                                                                                | Sample Value                         |
| ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------ |
| adminDeviceSpaceId     | **Required**<br />**Parameter Type:** Query<br />**Data Type:** Number<br />Device space ID of the administrator.                          |                                      |
| deviceId               | **Required**<br />**Parameter Type:** Path<br />**Data Type:** String<br />The deviceId is the device UUID.                                | 9af85060-4775-4f52-967c-bfb4979bd19d |
| command                | **Required**<br />**Parameter Type:** Query<br />**Data Type:** String<br />Command to evaluate. Use deviceDetail.                         | command=deviceDetail                 |
| os                     | **Required**<br />**Parameter Type:** Query<br />**Data Type:** String<br />OS to evaluate, for example, os=Android%2012L for Android 12L. | os=Android%2012L                     |
| isBatteryStatsRequired | **Parameter Type:** Query<br />**Data Type:** boolean<br />use true to include battery information.                                        | 9af85060-4775-4f52-967c-bfb4979bd19d |

### Response fields

| Field       | Description                                         |
| ----------- | --------------------------------------------------- |
| results     | Container for the array of detail objects returned. |
| totalCount  | The total number of entries that the query matched. |
| resultCount | The number of entries that are being returned.      |

### Sample request and response

### Request

https\://\[Ivanti EPMM]/api/v2/devices/9af85060-4775-4f52-967c-bfb4979bd19d/details?command=deviceDetail\&deviceId=9af85060-4775-4f52-967c-bfb4979bd19d\&os=Android%2012L\&isBatteryStatsRequired=true

### Response

\{ "results": \[ \{ "name": "android.wifi\_inventory\_mac\_addr", "value": null }, \{ "name": "common.locale", "value": "en-US" }, \{ "name": "android.zebra\_build\_id", "value": null }, \{ "name": "common.sd\_card\_encrypted", "value": false }, \{ "name": "common.client\_id", "value": 1073741834 }, \{ "name": "android.battery\_zebra\_total\_cumulative\_charge", "value": null }, \{ "name": "android.battery\_zebra\_bkvoltage", "value": null }, \{ "name": "android.battery\_zebra\_seconds\_since\_first\_use", "value": null }, \{ "name": "common.imsi", "value": "" }, \{ "name": "android.afw\_capable", "value": true }, \{ "name": "android.admin\_activated", "value": true }, \{ "name": "common.mdm\_managed", "value": false }, \{ "name": "android.secure\_apps\_encryption\_enabled", "value": false }, \{ "name": "android.platform\_flags", "value": "0x143" }, \{ "name": "android.battery\_zebra\_health\_percentage", "value": null }, \{ "name": "common.creation\_date", "value": "2022-07-05T07:34:05.000Z" }, \{ "name": "common.background\_status", "value": 0 }, \{ "name": "common.EnhancedLoggingEnabled", "value": false }, \{ "name": "android.android\_automated\_enrollment", "value": "Unknown" }, \{ "name": "common.last\_connected\_at", "value": "2022-07-05T07:45:27.000Z" }, \{ "name": "android.battery\_zebra\_partnumber", "value": null }, \{ "name": "android.battery\_health", "value": null }, \{ "name": "android.mdm\_enabled", "value": true }, \{ "name": "android.battery\_zebra\_time\_to\_full", "value": null }, \{ "name": "android.codename", "value": null }, \{ "name": "common.client\_version", "value": "11.6.0.1.1R" }, \{ "name": "common.ethernet\_mac", "value": null }, \{ "name": "common.mtd\_status", "value": "N/A" }, \{ "name": "android.battery\_zebra\_ratedcapacity", "value": null }, \{ "name": "android.prv\_enable\_network\_slicing", "value": false }, \{ "name": "android.os\_build\_number", "value": "SQ3A.220605.009.B1" }, \{ "name": "android.security\_detail", "value": "0" }, \{ "name": "android.multi\_mdm", "value": false }, \{ "name": "common.device\_admin\_enabled", "value": true }, \{ "name": "common.location\_last\_captured\_at", "value": null }, \{ "name": "common.os\_version", "value": "12L" }, \{ "name": "common.intune\_compliance\_azure\_tenant\_id", "value": null }, \{ "name": "common.mdm\_tos\_accepted\_date", "value": null }, \{ "name": "android.safety\_net\_status", "value": "None" }, \{ "name": "common.uuid", "value": "9af85060-4775-4f52-967c-bfb4979bd19d" }, \{ "name": "android.samsung\_carrier\_code", "value": null }, \{ "name": "android.secure\_apps\_encryption\_mode", "value": null }, \{ "name": "common.display\_size", "value": "2240X1080" }, \{ "name": "android.aosp\_device", "value": "no" }, \{ "name": "android.iccid", "value": "" }, \{ "name": "common.device\_is\_compromised", "value": false }, \{ "name": "user.email\_address", "value": null }, \{ "name": "android.safety\_net\_timestamp", "value": null }, \{ "name": "android.dualdar\_enabled", "value": false }, \{ "name": "android.brand", "value": "google" }, \{ "name": "android.battery\_status", "value": null }, \{ "name": "common.client\_name", "value": "com.mobileiron" }, \{ "name": "common.imei", "value": "" }, \{ "name": "android.os\_update\_status", "value": null }, \{ "name": "user.last\_name", "value": null }, \{ "name": "user.display\_name", "value": "miadmin" }, \{ "name": "android.zebra\_patch\_version", "value": null }, \{ "name": "android.file\_encryption", "value": true }, \{ "name": "android.developer\_mode", "value": false }, \{ "name": "android.safety\_net\_result\_exception", "value": "" }, \{ "name": "android.zebra\_artifact\_fingerprint", "value": null }, \{ "name": "common.registration\_imsi", "value": null }, \{ "name": "android.manufacturer\_os\_version", "value": "12" }, \{ "name": "android.battery\_zebra\_time\_to\_empty", "value": null }, \{ "name": "user.uuid", "value": "bc4202db-ae47-4963-b207-24157b3a5df8" }, \{ "name": "android.battery\_zebra\_present\_capacity", "value": null }, \{ "name": "android.usb\_debugging", "value": false }, \{ "name": "android.battery\_zebra\_decommission", "value": null }, \{ "name": "common.mdm\_tos\_accepted", "value": false }, \{ "name": "common.ip\_address", "value": "192.168.0.8" }, \{ "name": "android.media\_card\_capacity", "value": null }, \{ "name": "android.screenlock\_pin\_change\_prompt", "value": "false" }, \{ "name": "common.mtd\_anti\_phishing\_status", "value": "N/A" }, \{ "name": "common.client\_build\_date", "value": "2022-04-07T21:31:41.000Z" }, \{ "name": "android.security\_patch\_date", "value": "2022-06-05T00:00:00.000Z" }, \{ "name": "user.first\_name", "value": null }, \{ "name": "common.intune\_compliance\_azure\_device\_compliance\_status", "value": null }, \{ "name": "common.current\_operator\_name", "value": null }, \{ "name": "android.battery\_zebra\_base\_cumulative\_charge", "value": null }, \{ "name": "android.samsung\_model\_number", "value": null }, \{ "name": "android.device", "value": "oriole" }, \{ "name": "android.battery\_zebra\_serialnumber", "value": null }, \{ "name": "common.wifi\_mac\_address", "value": "6a:02:39\:cb:58:13" }, \{ "name": "user.sam\_account\_name", "value": null }, \{ "name": "common.mtd\_anti\_phishing\_vpn\_status", "value": "N/A" }, \{ "name": "common.intune\_compliance\_azure\_client\_status\_code", "value": "Not supported" }, \{ "name": "android.bulk\_enrollment\_profile", "value": null }, \{ "name": "common.intune\_compliance\_azure\_device\_report\_time", "value": null }, \{ "name": "common.device\_encrypted", "value": true }, \{ "name": "android.zebra\_ota\_capable", "value": false }, \{ "name": "android.dualdar\_version", "value": null }, \{ "name": "android.security\_patch", "value": "2022-06-05" }, \{ "name": "common.location", "value": null }, \{ "name": "android.battery\_zebra\_mfd", "value": null }, \{ "name": "common.memory\_capacity", "value": 7775075696 }, \{ "name": "common.security\_state", "value": "Ok" }, \{ "name": "common.intune\_compliance\_azure\_device\_id", "value": null }, \{ "name": "android.attestation", "value": "Unknown" }, \{ "name": "common.registration\_uuid", "value": "7ca11b9157a5ac80" }, \{ "name": "common.appconnect\_tos\_accepted", "value": null }, \{ "name": "android.registration\_status", "value": "Work Profile" }, \{ "name": "android.incremental", "value": "8650216" }, \{ "name": "android.dpm\_encryption\_status", "value": "ACTIVE PER USER" }, \{ "name": "common.model\_name", "value": null }, \{ "name": "android.media\_card\_free", "value": null }, \{ "name": "android.zebra\_system\_update\_information", "value": null }, \{ "name": "android.safety\_net\_enabled", "value": false }, \{ "name": "android.samsung\_dm", "value": null }, \{ "name": "android.battery\_zebra\_usage\_numb", "value": null }, \{ "name": "android.kiosk\_enabled", "value": false }, \{ "name": "common.registration\_date", "value": "2022-07-05T07:34:05.000Z" }, \{ "name": "android.Client\_version\_code", "value": 652 }, \{ "name": "android.secure\_apps\_enabled", "value": false }, \{ "name": "android.prv\_password\_expiration\_timeout", "value": 0 }, \{ "name": "common.storage\_capacity", "value": 128000000000 }, \{ "name": "android.security\_reason", "value": "" }, \{ "name": "common.miclient\_last\_connected\_at", "value": "2022-07-05T07:45:27.000Z" }, \{ "name": "android.gcmToken", "value": true }, \{ "name": "android.os\_update\_path", "value": null }, \{ "name": "android.knox\_version", "value": "" }, \{ "name": "android.c2dmToken", "value": null }, \{ "name": "android.efota\_capable", "value": false }, \{ "name": "common.storage\_free", "value": 111821280000 }, \{ "name": "common.intune\_compliance\_azure\_device\_compliance\_report\_status", "value": null }, \{ "name": "android.battery\_zebra\_present\_charge", "value": null }, \{ "name": "common.manufacturer", "value": "Google" }, \{ "name": "android.device\_roaming\_flag", "value": "Not Available" }, \{ "name": "common.roaming", "value": false }, \{ "name": "common.memory\_free", "value": 3813408768 }, \{ "name": "common.model", "value": "Pixel 6" }, \{ "name": "android.watch\_app\_installed", "value": false }, \{ "name": "common.apns\_capable", "value": false }, \{ "name": "android.wear\_paired", "value": false }, \{ "name": "common.cellular\_technology", "value": "none" }, \{ "name": "common.battery\_level", "value": 95 }, \{ "name": "common.enrollment\_id", "value": "DFIQ-TWHE-GHZ7-5MOIN-LL3P-AHPO-T" }, \{ "name": "common.auth\_only", "value": false }, \{ "name": "android.device\_up\_time", "value": 18 }, \{ "name": "android.google\_device\_account", "value": false }, \{ "name": "common.SerialNumber", "value": null }, \{ "name": "common.appconnect\_tos\_accepted\_date", "value": null }, \{ "name": "common.processor\_architecture", "value": null }, \{ "name": "user.user\_id", "value": "miadmin" } ], "totalCount": 143, "resultCount": 143 }

## Get Embedded Identity Document (EID) details

This call gets the EID information for the built-in Subscriber Identity Modules/Subscriber Identification Modules (SIMs) of iOS 14 and later devices.<font color="#000000">  </font>

### Required Role

See [Authentication](docId\:hJ6Ul2Sz4DNsmnPJ-Fxl_) 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 Role                                                                                          |
| ------------------------------------------------------------------------------------------------------ |
| **Category:** Device Management<br />**Role Description:** View dashboard, device page, device details |

### HTTP method

GET

### Request URI

/api/v2/devices/simdetails/\{*deviceId*}?adminDeviceSpaceId=\{*adminDeviceSpaceId}*

### Request parameters

| Parameter          | Description                                                                                                       | Sample Value                         |
| ------------------ | ----------------------------------------------------------------------------------------------------------------- | ------------------------------------ |
| adminDeviceSpaceId | **Required**<br />**Parameter Type:** Query<br />**Data Type:** Number<br />Device space ID of the administrator. | adminDeviceSpaceId=1                 |
| deviceId           | **Required**<br />**Parameter Type:** Path<br />**Data Type:** String<br />The deviceId is the device UUID.       | dd8adade-4d26-4aad-96cc-0cc317692aeb |

### Response fields

| Field                         | Description                               |
| ----------------------------- | ----------------------------------------- |
| results                       | Container for results.                    |
|         eid                   | The EID identifier.                       |
|         phoneNumber           | The associated phone number.              |
|         carrierSettingVersion | Version of the carrier settings software. |
|         carrierNetwork        | The carrier, for example, Verizon.        |
|         slot                  | Slot position of associated EID.          |
|         simLabel              | Label of EID.                             |
| totalCount                    | Total EID arrays returned.                |
| resultCount                   | Total result records returned.            |

### Sample request and response

### Request

curl --location --request GET 'https\://\[Ivanti EPMM]/api/v2/devices/simdetails/dd8adade-4d26-4aad-96cc-0cc317692aeb?adminDeviceSpaceId=1' \\

\--header 'Accept: application/json, text/plain, \*/\*' \\

\--header 'Content-Type: application/json' \\

\--header 'Authorization: Basic \<token>' \\

### Response

\{

    "results": \[

        \{

            "eid": "N/A",

            "phoneNumber": "N/A",

            "carrierSettingVersion": "N/A",

            "carrierNetwork": "N/A",

            "slot": "CTSubscriptionSlotOne",

            "simLabel": "N/A"

        },

        \{

            "eid": "89049032005008882600048285696082",

            "phoneNumber": "+14089660949",

            "carrierSettingVersion": "41.7.70",

            "carrierNetwork": "Verizon ",

            "slot": "CTSubscriptionSlotTwo",

            "simLabel": "Secondary"

        }

    ],

    "totalCount": 2,

    "resultCount": 2

}

## Get Last Sync Time and State of ActiveSync Devices

This call gets the sync time and state of ActiveSync devices. The CSV output of this call is a helpful reference for operators who retire devices from Ivanti EPMM and need to remove the same devices from the ActiveSync profile on Microsoft Exchange. For example, an admin could create PowerShell scripts to read the response of this call and delete devices from the ActiveSync profile on Microsoft Exchange that have not synced in a week.

### Required Role

See [Authentication](docId\:hJ6Ul2Sz4DNsmnPJ-Fxl_) 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 Role                                                                       |
| ----------------------------------------------------------------------------------- |
| **Category:** Device Management<br />**Role Description:** Manage ActiveSync device |

### HTTP method

GET

### Request URI

api/V2/activesync/devicereport?daysIdle=0\&state=a

### Request parameters

| Parameter | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | Sample Value |
| --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------ |
| daysIdle  | **Required**<br />**Parameter Type:** Query<br />**Data Type:** Integer<br />Enter a value corresponding the number of days idle devices should be to be returned by the call. For example, to find devices that have been idle for one day, use 1 (one). Use 0 (zero) to find devices regardless of the last session time.                                                                                                                                                                                                                                                                                              | 0            |
| state     | **Parameter Type:** Query<br />**Data Type:** String<br />Valid values:<br />- a<br />Searches for allowed devices<br />- b<br />Searches for blocked devices<br />- w<br />Searches for wiped devices<br />- q<br />Searches for allowed quarantined devices<br />- r<br />Searches for retired devices<br /><br />For ease of use, the call accepts the entire word. For example, instead of "state=r", the call would accept "state=retired".<br />Note: except for **retired**, all values correspond to ActiveSyncStatus enumeration. "retired" corresponds to eas\_device entries with the trash flag set to true. | a            |

### Response fields

This call returns information about ActiveSync devices matching search criteria in the HTTP response body in CSV format. The first line is the CSV column header line, followed by the actual ActiceSync device data, one row per ActiveSync device.

| Field        | Description                                                                                   |
| ------------ | --------------------------------------------------------------------------------------------- |
| DeviceId     | ActiveSync Device ID                                                                          |
| MailboxId    | Mailbox ID                                                                                    |
| Status       | This is the device status.<br />One of:<br />- Registered<br />- Unregistered                 |
| SyncStatus   | ActiveSync status.<br />One of:<br />- Allowed<br />- Blocked<br />- Wiped<br />- Quarantined |
| Retired      | One of:<br />- true<br />- false                                                              |
| LastSyncTime | Last session time, formatted in GMT. The format is always `yyyy-MM-dd hh:mm:ss z`.            |
| SentryType   | Standalone                                                                                    |

### Sample request and response

### Request

`curl -X GET -H "Authorization: Basic <token>" https://[Ivanti EPMM]/api/v2/activesync/devicereport/?daysIdle=0&state=A`

### Response

DeviceId,MailboxId,Status,SyncStatus,Retired,LastSyncTime,SentryType

DeviceID-1,someone\@company.com,Unregistered,Allowed,false,2015-03-30 03:14:57 GMT,Standalone

## Get app control compliance information for a device

This call gets app control compliance information for a device.

### Required Roles

See [Authentication](docId\:hJ6Ul2Sz4DNsmnPJ-Fxl_) 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:** Device Management<br />**Role Description:** View dashboard, device page, device details<br />- **Category:** Other Roles<br />**Role Description:** Mobile App |

### HTTP method

GET

### Request URI

api/v2/devices/\<deviceUuid>/appcompliance

### Request parameters

| Parameter          | Description                                                                                                       | Sample Value                         |
| ------------------ | ----------------------------------------------------------------------------------------------------------------- | ------------------------------------ |
| adminDeviceSpaceId | **Required**<br />**Parameter Type:** Query<br />**Data Type:** Number<br />Device space ID of the administrator. | 1                                    |
| deviceUuid         | **Required**<br />**Parameter Type:** Path<br />**Data Type:** String<br />The device UUID.                       | 7b3ad194-3bc0-4229-b30f-26f6bb277dd7 |

### Response fields

| Field                                                   | Description                                  |
| ------------------------------------------------------- | -------------------------------------------- |
| results                                                 | Container for the results array shown below. |
| <font color="#000000">    </font>deviceUuid             |                                              |
| <font color="#000000">    </font>appViolationsByType    |                                              |
| <font color="#000000">        </font>Disallowed         |                                              |
| <font color="#000000">                </font>type       |                                              |
| <font color="#000000">                </font>appName    |                                              |
| <font color="#000000">                </font>appVersion |                                              |
| <font color="#000000">        </font>Required           |                                              |
| <font color="#000000">                </font>type       |                                              |
| <font color="#000000">                </font>appName    |                                              |
| <font color="#000000">                </font>appVersion |                                              |

### Sample request and response

### Request

`curl -k -sS -u <userName>:<password> -XGET 'https://[Ivanti EPMM]/api/v2/devices/7b3ad194-3bc0-4229-b30f-26f6bb277dd7/appcompliance?adminDeviceSpaceId=1'`

### Response

\{

    "results": \{

        "deviceUuid": "7b3ad194-3bc0-4229-b30f-26f6bb277dd7",

        "appViolationsByType": \{

            "Disallowed": \[

                \{

                    "type": "Disallowed",

                    "appName": "Sudoku",

                    "appVersion": "4.6"

                }

            ],

            "Required": \[

                \{

                    "type": "Required",

                    "appName": "Evernote",

                    "appVersion": null

                },

                \{

                    "type": "Required",

                    "appName": "Waze",

                    "appVersion": null

                }

            ]

        }

    }

}

## Wake up a device

This call wakes up a device by requiring it to check in.

### Required Role

See [Authentication](docId\:hJ6Ul2Sz4DNsmnPJ-Fxl_) 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 Role                                                                    |
| -------------------------------------------------------------------------------- |
| **Category:** Device Management<br />**Role Description:** Force device check-in |

### HTTP method

PUT

### Request URI

api/v2/devices/wakeup

### Request parameters

| Parameter          | Description                                                                                                                                                            | Sample Value                         |
| ------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------ |
| adminDeviceSpaceId | **Required**<br />**Parameter Type:** Query<br />**Data Type:** Number<br />Device space ID of the administrator.                                                      | 1                                    |
| deviceUuids        | **Required**<br />**Parameter Type:** Request body<br />**Data Type:** String<br />The device UUIDs of the devices to wake up. Use commas to separate multiple values. | af0cea8b-f56c-49f5-b615-76cc34936b2f |
| note               | **Parameter Type:** Request body<br />**Data Type:** String<br />Note clarifying the wake up/check-in request.                                                         | Please check in your device.         |

### Response fields

| Field         | Description                                              |
| ------------- | -------------------------------------------------------- |
| actionType    | Describes the action type, in this case, WAKEUP\_DEVICE. |
| deviceResults | Indicates the outcome for the action per device.         |
| successful    | Indicates success, true or false.                        |

### Sample request and response

### Request

`curl --user <username>:<password> --header 'Content-Type: application/json' --request PUT 'https://[Ivanti EPMM]/api/v2/devices/wakeup?adminDeviceSpaceId=1' --data '{"deviceUuids": ["af0cea8b-f56c-49f5-b615-76cc34936b2f"], "note": "something"}'`

### Response

\{

    "actionType": "WAKEUP\_DEVICE",

    "deviceResults": \{

        "af0cea8b-f56c-49f5-b615-76cc34936b2f": "Device Action Successful"

    },

    "successful": true

}

## Send message

This call sends a message to devices with the specified deviceUuids.

### Required Role

See [Authentication](docId\:hJ6Ul2Sz4DNsmnPJ-Fxl_) 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 Role                                                                     |
| --------------------------------------------------------------------------------- |
| **Category:** Device Management<br />**Role Description:** Send message to device |

### HTTP method

PUT

### Request URI

api/v2/devices/sendmessage

### Request parameters

| Parameter            | Description                                                                                                                                                                              | Sample Value                                                                                                                                                                                                          |
| -------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| adminDeviceSpaceId   | **Required**<br />**Parameter Type:** Query<br />**Data Type:** Number<br />Device space ID of the administrator.                                                                        | 1                                                                                                                                                                                                                     |
| deviceUuids          | **Required**<br />**Parameter Type:** Request body<br />**Data Type:** String<br />The device UUIDs of the devices to which to send the message. Use commas to separate multiple values. | 30b8b722-2954-42ab-bda8-700facfa249a                                                                                                                                                                                  |
| note                 | **Parameter Type:** Request body<br />**Data Type:** String<br />Note clarifying the wake up/check-in request.                                                                           | Alerting to data roaming expense.                                                                                                                                                                                     |
| additionalParameters | **Parameter Type:** Request body<br />**Data Type:** String<br />Container for message and mode parameters.                                                                              | \{<br /><font color="#000000">    </font>"message": "Data roaming is expensive.",<br /><font color="#000000">    </font>"mode": "email",<br /><font color="#000000">    </font>"subject": "About data roaming"<br />} |
| message              | **Parameter Type:** Request body<br />**Data Type:** String<br />Message to send to the specified devices.                                                                               | Data roaming is expensive                                                                                                                                                                                             |
| mode                 | **Parameter Type:** Request body<br />**Data Type:** String<br />Mode of the message:<br />- pns (push notifications)<br />- sms<br />- email (email takes the subject parameter, too)   | email                                                                                                                                                                                                                 |
| subject              | **Parameter Type:** Request body<br />**Data Type:** String<br />Provide if desired when the message mode is email.                                                                      | About data roaming                                                                                                                                                                                                    |

### Response fields

| Field                                          | Description                                             |
| ---------------------------------------------- | ------------------------------------------------------- |
| results                                        | Container for the results.                              |
| <font color="#000000">    </font>resultId      | ID of the result.                                       |
| <font color="#000000">    </font>resultMessage | Message associated with the resultID.                   |
| <font color="#000000">    </font>records       | List of affected device UUIDs.                          |
| resultCount                                    | Count of affected devices.                              |
| actionType                                     | Describes the action type, in this case, SEND\_MESSAGE. |
| deviceResults                                  | Indicates success or failure for each device.           |
| successful                                     | Indicates success, true or false.                       |

### Sample request and response

### Request

`curl --user <username>:<password> --header 'Content-Type: application/json' --request PUT 'https://[Ivanti EPMM]/api/v2/devices/sendmessage?adminDeviceSpaceId=1' --data '{"deviceUuids": ["30b8b722-2954-42ab-bda8-700facfa249a"], "note": "Alerting to data roaming expense.", "additionalParameters": {"message" : "Data roaming is expensive.", "mode": "email", "subject" : "About data roaming”} }'`

### Response

\{

    "results": \[

        \{

            "resultId": "114",

            "resultMessage": null,

            "records": \[

                "30b8b722-2954-42ab-bda8-700facfa249a"

            ]

        }

    ],

    "resultCount": 1,

    "actionType": "SEND\_MESSAGE",

    "deviceResults": \{

        "30b8b722-2954-42ab-bda8-700facfa249a": "Device Action Successful"

    },

    "successful": true

}

## Apply labels to devices

This call applies labels to devices.

### Required Role

See [Authentication](docId\:hJ6Ul2Sz4DNsmnPJ-Fxl_) 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 Role                                                                            |
| ---------------------------------------------------------------------------------------- |
| **Category:** Device Management<br />**Role Description:** Apply and remove device label |

### HTTP method

PUT

### Request URI

api/v2/devices/labels/*label1,label2*/add

### Request parameters

| Parameter          | Description                                                                                                                                                                              | Sample Value                         |
| ------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------ |
| adminDeviceSpaceId | **Required**<br />**Parameter Type:** Query<br />**Data Type:** Number<br />Device space ID of the administrator.                                                                        | 1                                    |
| *label1,label2*    | **Required**<br />**Parameter Type:** Query<br />**Data Type:** String<br />Labels to apply to the devices.                                                                              | ios,company-owned                    |
| deviceUuids        | **Required**<br />**Parameter Type:** Request body<br />**Data Type:** String<br />The device UUIDs of the devices to which to apply the labels. Use commas to separate multiple values. | 9a56d1e5-ca74-4776-868c-389c849348b2 |

### Response fields

| Field                                          | Description                                                                                                                                                                      |
| ---------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| results                                        | Container for the results.                                                                                                                                                       |
| <font color="#000000">    </font>resultId      | ID of the result.                                                                                                                                                                |
| <font color="#000000">    </font>resultMessage | Message associated with the resultID.                                                                                                                                            |
| <font color="#000000">    </font>records       | An array of values for each label applied:<br />- uuid<br />- id<br />- principal<br />- deviceSpaceId<br />- deviceSpacePath<br />- label<br />- device                         |
| resultCount                                    | Count of affected devices.                                                                                                                                                       |
| actionType                                     | Describes the action type, in this case, APPLY\_LABEL\_TO\_DEVICES".                                                                                                             |
| deviceResults                                  | Contain failure reasons, for example "Device not found," or "Invalid request. Label not found for Label with ID".<br />The successful records can be found in "records" section. |
| successful                                     | Indicates success, true or false.                                                                                                                                                |

### Sample request and response

### Request

`ccurl`  `--user <username>:<password> --header 'Content-Type: application/json' --request PUT 'https://[Ivanti EPMM]/api/v2/devices/labels/ios,company-owned/add?adminDeviceSpaceId=1' --data '{"deviceUuids": ["af0cea8b-f56c-49f5-b615-76cc34936b2f"]}'`

### Response

\{

    "results": \[

        \{

            "resultId": "114",

            "resultMessage": null,

            "records": \[

                \{

                    "uuid": null,

                    "id": null,

                    "principal": null,

                    "deviceSpaceId": 1,

                    "deviceSpacePath": "/1/",

                    "label": "ios",

                    "device": \[

                        \{

                            "uuid": "9a56d1e5-ca74-4776-868c-389c849348b2"

                        }

                    ]

                },

                \{

                    "uuid": null,

                    "id": null,

                    "principal": null,

                    "deviceSpaceId": 1,

                    "deviceSpacePath": "/1/",

                    "label": "company-owned",

                    "device": \[

                        \{

                            "uuid": "9a56d1e5-ca74-4776-868c-389c849348b2"

                        }

                    ]

                }

            ]

        }

    ],

    "resultCount": 1,

    "actionType": "APPLY\_LABEL\_TO\_DEVICES",

    "deviceResults": \{ },

    "successful": true

}

## Remove labels from devices

This call removes labels from devices.

### Required Role

See [Authentication](docId\:hJ6Ul2Sz4DNsmnPJ-Fxl_) 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 Role                                                                            |
| ---------------------------------------------------------------------------------------- |
| **Category:** Device Management<br />**Role Description:** Apply and remove device label |

### HTTP method

PUT

### Request URI

api/v2/devices/labels/*label1,label2*/remove

### Request parameters

| Parameter          | Description                                                                                                                                                                                 | Sample Value                         |
| ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------ |
| adminDeviceSpaceId | **Required**<br />**Parameter Type:** Query<br />**Data Type:** Number<br />Device space ID of the administrator.                                                                           | 1                                    |
| *label1,label2*    | **Required**<br />**Parameter Type:** Query<br />**Data Type:** String<br />Labels to remove from the devices.                                                                              | ios,company-owned                    |
| deviceUuids        | **Required**<br />**Parameter Type:** Request body<br />**Data Type:** String<br />The device UUIDs of the devices from which to remove the labels. Use commas to separate multiple values. | af0cea8b-f56c-49f5-b615-76cc34936b2f |

### Response fields

| Field                                          | Description                                                                                                                                              |
| ---------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
| results                                        | Container for the results.                                                                                                                               |
| <font color="#000000">    </font>resultId      | ID of the result.                                                                                                                                        |
| <font color="#000000">    </font>resultMessage | Message associated with the resultID.                                                                                                                    |
| <font color="#000000">    </font>records       | An array of values for each label applied:<br />- uuid<br />- id<br />- principal<br />- deviceSpaceId<br />- deviceSpacePath<br />- label<br />- device |
| resultCount                                    | Count of affected devices.                                                                                                                               |
| actionType                                     | Describes the action type, in this case, REMOVE\_LABEL\_FROM\_DEVICES.                                                                                   |
| deviceResults                                  | Indicates success or failure for each device.                                                                                                            |
| successful                                     | Indicates success, true or false.                                                                                                                        |

### Sample request and response

### Request

`curl --user <username>:<password> --header 'Content-Type: application/json' --request PUT 'https://[Ivanti EPMM]/api/v2/devices/labels/ios,company-owned/remove?adminDeviceSpaceId=1' --data '{"deviceUuids": ["af0cea8b-f56c-49f5-b615-76cc34936b2f"]}'`

### Response

\{

    "results": \[

        \{

            "resultId": "114",

            "resultMessage": null,

            "records": \[

                \{

                    "uuid": null,

                    "id": null,

                    "principal": null,

                    "deviceSpaceId": 1,

                    "deviceSpacePath": "/1/",

                    "label": "ios",

                    "device": \[

                        \{

                            "uuid": "9a56d1e5-ca74-4776-868c-389c849348b2"

                        }

                    ]

                },

                \{

                    "uuid": null,

                    "id": null,

                    "principal": null,

                    "deviceSpaceId": 1,

                    "deviceSpacePath": "/1/",

                    "label": "company-owned",

                    "device": \[

                        \{

                            "uuid": "9a56d1e5-ca74-4776-868c-389c849348b2"

                        }

                    ]

                }

            ]

        }

    ],

    "resultCount": 1,

    "actionType": "REMOVE\_LABEL\_FROM\_DEVICES",

    "deviceResults": \{ },

    "successful": true

}

## Wipe devices

This call wipes devices.

### Required Role

See [Authentication](docId\:hJ6Ul2Sz4DNsmnPJ-Fxl_) 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 Role                                                          |
| ---------------------------------------------------------------------- |
| **Category:** Device Management<br />**Role Description:** Wipe device |

### HTTP method

PUT

### Request URI

api/v2/devices/wipe

### Request parameters

| Parameter            | Description                                                                                                                                                                                                                                                                             | Sample Value                                                                                                                                                                                                                                                  |
| -------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| adminDeviceSpaceId   | **Required**<br />**Parameter Type:** Query<br />**Data Type:** Number<br />Device space ID of the administrator.                                                                                                                                                                       | 1                                                                                                                                                                                                                                                             |
| deviceUuids          | **Required**<br />**Parameter Type:** Request body<br />**Data Type:** String<br />The device UUIDs of the devices to wipe.                                                                                                                                                             | <br />`{`<br />`    "deviceUuids": [`<br />`        "cb1bcc55-bba3-41df-9efa-a3496b065bf9"`<br />`     ],  `<br />`    "additionalParameters": {`<br />`        "preserveDataPlan": "true"`<br />`     "sendWipeNotification": "false"`<br />`    }`<br />`}` |
| note                 | **Parameter Type:** Request body<br />**Data Type:** String<br />Note clarifying the wipe request.                                                                                                                                                                                      |                                                                                                                                                                                                                                                               |
| additionalParameters | **Parameter Type:** Request body<br />**Data Type:** String<br />Container for additional parameters. Currently, the additional supported parameter is:<br />preserveDataPlan<br />If true, preserves the data plan upon wiping the device.<br />Valid values:<br />- true<br />- false |                                                                                                                                                                                                                                                               |

### Response fields

| Field                 | Description                                      |
| --------------------- | ------------------------------------------------ |
| results               | Container for results.                           |
|         resultId      | ID of the result.                                |
|         resultMessage | Message for the result.                          |
|         records       | List of devices affected.                        |
| resultCount           | Count of devices affected.                       |
| actionType            | Describes the action type, in this case, WIPE.   |
| deviceResults         | Indicates the outcome for the action per device. |
| successful            | Indicates success, true or false.                |

### Sample request and response

### Request

`curl --location --request PUT 'https://[Ivanti EPMM]/api/v2/devices/wipe?adminDeviceSpaceId=1' \ --header 'Content-Type: application/json' \ --header 'Authorization: Basic <token>' \ --data '{"deviceUuids": ["cb1bcc55-bba3-41df-9efa-a3496b065bf9"], "note": "Employee left company.", "additionalParameters": {"preserveDataPlan": "true"}}'`

### Response

\{ "results": \[ \{ "resultId": "114", "resultMessage": null, "records": \[ "cb1bcc55-bba3-41df-9efa-a3496b065bf9" ] } ], "resultCount": 1, "actionType": "WIPE", "deviceResults": \{ "cb1bcc55-bba3-41df-9efa-a3496b065bf9": "Device Action Successful" }, "successful": true }

## Lock devices

This call locks devices.

### Required Role

See [Authentication](docId\:hJ6Ul2Sz4DNsmnPJ-Fxl_) 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 Role                                                                   |
| ------------------------------------------------------------------------------- |
| **Category:** Device Management<br />**Role Description:** Lock & unlock device |

### HTTP method

PUT

### Request URI

api/v2/devices/lock

### Request parameters

| Parameter          | Description                                                                                                                 | Sample Value                         |
| ------------------ | --------------------------------------------------------------------------------------------------------------------------- | ------------------------------------ |
| adminDeviceSpaceId | **Required**<br />**Parameter Type:** Query<br />**Data Type:** Number<br />Device space ID of the administrator.           | 1                                    |
| deviceUuids        | **Required**<br />**Parameter Type:** Request body<br />**Data Type:** String<br />The device UUIDs of the devices to lock. | af0cea8b-f56c-49f5-b615-76cc34936b2f |
| note               | **Parameter Type:** Request body<br />**Data Type:** String<br />Note clarifying the lock request.                          | Employee left company.               |

### Response fields

| Field         | Description                                      |
| ------------- | ------------------------------------------------ |
| actionType    | Describes the action type, in this case, LOCK.   |
| deviceResults | Indicates the outcome for the action per device. |
| successful    | Indicates success, true or false.                |

### Sample request and response

### Request

`curl --user <username>:<password> --header 'Content-Type: application/json' --request PUT 'https://[Ivanti EPMM]/api/v2/devices/lock?adminDeviceSpaceId=1' --data '{"deviceUuids": ["af0cea8b-f56c-49f5-b615-76cc34936b2f"], "note": "Employee left company."}'`

### Response

\{

    "actionType": "LOCK",

    "deviceResults": \{

        "af0cea8b-f56c-49f5-b615-76cc34936b2f": "Device Action Successful"

    },

    "successful": true

}

## Unlock devices

This call unlocks devices.

### Required Role

See [Authentication](docId\:hJ6Ul2Sz4DNsmnPJ-Fxl_) 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 Role                                                                   |
| ------------------------------------------------------------------------------- |
| **Category:** Device Management<br />**Role Description:** Lock & unlock device |

### HTTP method

PUT

### Request URI

api/v2/devices/unlock

### Request parameters

| Parameter                | Description                                                                                                                                                                                                    | Sample Value                         |
| ------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------ |
| adminDeviceSpaceId       | **Required**<br />**Parameter Type:** Query<br />**Data Type:** Number<br />Device space ID of the administrator.                                                                                              | 1                                    |
| unlockPin (Android only) | **Optional**<br />**Parameter Type:** Query<br />**Data Type:** String<br />The pin/password to unlock the devices.<br />If not sent, then the Android device will be unlocked with default pin, ‘0000’.<br /> | 936142                               |
| deviceUuids              | **Required**<br />**Parameter Type:** Request body<br />**Data Type:** String<br />The device UUIDs of the devices to unlock.                                                                                  | af0cea8b-f56c-49f5-b615-76cc34936b2f |
| note                     | **Parameter Type:** Request body<br />**Data Type:** String<br />Note clarifying the unlock request.                                                                                                           | Virus scan successful.               |

### Response fields

| Field         | Description                                                          |
| ------------- | -------------------------------------------------------------------- |
| results       | Contains the device summaries for which unlock action is successful. |
| resultCount   | Indicates the success count.                                         |
| actionType    | Describes the action type, in this case, UNLOCK.                     |
| deviceResults | Indicates the outcome for the action per device.                     |
| successful    | Indicates success, true or false.                                    |

### Sample request and response

### Request

`curl --user <username>:<password> --header 'Content-Type: application/json' --request PUT 'https://[Ivanti EPMM]/api/v2/devices/unlock?adminDeviceSpaceId=1&unlockPin=J149XZ_' --data '{"deviceUuids": [ "3915fde2-00b5-4788-9252-5ef0102c0607", "8083003b-1644-408a-a89a-0e0cbdd02f8e" ], "note" : "unlocking my devices" }'`

### Response

\{

    "results": \[

    \{

        "uuid": "3915fde2-00b5-4788-9252-5ef0102c0607",

        "id": null,

        "principal": null,

        "deviceSpaceId": 1,

        "deviceSpacePath": "/1/",

        "name": "miadmin\:Android\:PDA 3",

        "value": "Q",

        "platforms": \[],

        "description": null,

        "isEsLabel": null,

        "query": null

    },

    \{

        "uuid": "8083003b-1644-408a-a89a-0e0cbdd02f8e",

        "id": null,

        "principal": null,

        "deviceSpaceId": 1,

        "deviceSpacePath": "/1/",

        "name": "ankit\:Android\:PDA",

        "value": "Q",

        "platforms": \[],

        "description": null,

        "isEsLabel": null,

        "query": null

    }

    ],

        "resultCount": 2,

        "actionType": "UNLOCK",

        "deviceResults": \{

        "8083003b-1644-408a-a89a-0e0cbdd02f8e": "Device Action Successful",

        "3915fde2-00b5-4788-9252-5ef0102c0607": "Device Action Successful"

        },

        "successful": true

}

## Retire devices

This call retires devices.

### Required Role

See [Authentication](docId\:hJ6Ul2Sz4DNsmnPJ-Fxl_) 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 Role                                                            |
| ------------------------------------------------------------------------ |
| **Category:** Device Management<br />**Role Description:** Retire device |

### HTTP method

PUT

### Request URI

api/v2/devices/retire

### Request parameters

| Parameter                                         | Description                                                                                                                                                       | Sample Value                                                                  |
| ------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------- |
| adminDeviceSpaceId                                | **Required**<br />**Parameter Type:** Query<br />**Data Type:** Number<br />Device space ID of the administrator.                                                 | 1                                                                             |
| deviceUuids                                       | **Required**<br />**Parameter Type:** Request body<br />**Data Type:** String<br />The device UUIDs of the devices to retire.                                     | "e4dd5f15-0349-49a9-9cc7-0e6d121ff229","7f2f9390-4593-4351-b065-6409016026be" |
| note                                              | **Parameter Type:** Request body<br />**Data Type:** String<br />Note clarifying the retire request.                                                              | New phone issued.                                                             |
| additionalParameters: isActionForced\:true\|false | **Parameter Type:** Request body<br />**Data Type:** Boolean<br />Used to force retirement of devices in the RETIRE PENDING state. To force retirement, use true. | "additionalParameters":\{"isActionForced"\:true}                              |

### Response fields

| Field         | Description                                      |
| ------------- | ------------------------------------------------ |
| actionType    | Describes the action type, in this case, RETIRE. |
| deviceResults | Indicates the outcome for the action per device. |
| successful    | Indicates success, true or false.                |

### Sample request and response

### Request

`curl --user miadmin:<password> --header 'Content-Type: application/json' --request PUT 'https://[Ivanti EPMM]/api/v2/devices/retire?adminDeviceSpaceId=1' --data '{"deviceUuids": ["e4dd5f15-0349-49a9-9cc7-0e6d121ff229","7f2f9390-4593-4351-b065-6409016026be"], "note": "New phone issued", "additionalParameters":{"isActionForced":true}}'`

### Response

```javascript
{
    "results": [
        {
            "resultId": "114", 
            "resultMessage": null, 
            "records": [
                "754ee0ba-a2f3-4f45-814e-fcfe230665f7"
            ]
        }
    ], 
    "resultCount": 1, 
    "actionType": "RETIRE", 
    "deviceResults": {
        "754ee0ba-a2f3-4f45-814e-fcfe230665f7": "Device Action Successful"
    }, 
    "successful": true
}
```

## Open TeamViewer session

This call opens a TeamViewer session for an Android or iOS device. The support engineer opens the supporter link in the return in a browser to initiate the Remote Display session.

### Required Role

See [Authentication](docId\:hJ6Ul2Sz4DNsmnPJ-Fxl_) 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 Role                                                             |
| ------------------------------------------------------------------------- |
| **Category:** Device Management<br />**Role Description:** Manage devices |

### HTTP method

POST

### Request URI

msa/v2/remote/\[create\_teamviewer\_session\_android|create\_teamviewer\_session\_ios]

### Request parameters

| Parameter                                                                          | Description                                                                                                                                                                                                                                                                | Sample Value                         |
| ---------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------ |
| create\_teamviewer\_session\_android<br />or<br />create\_teamviewer\_session\_ios | **Required**. One of the following is required:<br />- create\_teamviewer\_session\_android<br />- create\_teamviewer\_session\_ios<br />**Parameter Type:&#x20;**&#x50;ath<br />**Data Type:** String<br />The type of device for which to create the TeamViewer session. | create\_teamviewer\_session\_android |
| adminDeviceSpaceId                                                                 | **Required**<br />**Parameter Type:&#x20;**&#x52;equest body<br />**Data Type:** Number<br />Device space ID of the administrator.                                                                                                                                         | 1                                    |
| deviceUuid                                                                         | **Required**<br />**Parameter Type:&#x20;**&#x52;equest body<br />**Data Type:** String<br />The device UUID of the device for which to open a TeamViewer session.                                                                                                         | af0cea8b-f56c-49f5-b615-76cc34936b2f |

### Response fields

| Field                                | Description                                                                                            |
| ------------------------------------ | ------------------------------------------------------------------------------------------------------ |
| <font color="#000000">results</font> |                                                                                                        |
|     httpStatus                       |                                                                                                        |
|     error                            |                                                                                                        |
|     error\_description               |                                                                                                        |
|     error\_code                      |                                                                                                        |
|     error\_signature                 |                                                                                                        |
|     code                             |                                                                                                        |
|     state                            |                                                                                                        |
|     groupid                          |                                                                                                        |
|     end\_customer                    |                                                                                                        |
|     description                      |                                                                                                        |
|     assigned\_userid                 |                                                                                                        |
|     end\_customer\_link              |                                                                                                        |
|     supporter\_link                  | This is the link the support engineer opens in a browser to initiate the Remote Display session.<br /> |
|     valid\_until                     |                                                                                                        |
| messages                             |                                                                                                        |
|         type                         |                                                                                                        |
|         messageKey                   |                                                                                                        |
|         localizedMessage             |                                                                                                        |

### Sample requests and response

### Requests

**Android**

`curl -v -H "Content-Type: application/x-www-form-urlencoded" -H "Authorization: Basic <token>" -X POST https://[Ivanti EPMM]/msa/v2/remote/create_teamviewer_session_android -d "adminDeviceSpaceId=1&deviceUUID=2493c9a5-a9c8-43cb-af4c-9475dac8ba69"`

**iOS**

`curl -v -H "Content-Type: application/x-www-form-urlencoded" -H "Authorization: Basic <token>" -X POST https://[Ivanti EPMM]/msa/v2/remote/create_teamviewer_session_ios -d "adminDeviceSpaceId=1&deviceUUID=8af2f758-15c4-4394-ac67-3729e3dfe2d0"`

### Response

\{

    "results": \{

        "httpStatus": "OK",

        "error": null,

        "error\_description": null,

        "error\_code": null,

        "error\_signature": null,

        "code": "s35-924-946",

        "state": "Open",

        "groupid": "g86972161",

        "end\_customer": null,

        "description": null,

        "assigned\_userid": "u75347768",

        "end\_customer\_link": "https\://get.teamviewer.com/s35924946",

        "supporter\_link": "\[https\://get.teamviewer.com/s35924946-9c0G78d8rMMZ]",

        "valid\_until": "2019-04-10T01:46:06Z"

    },

    "messages": \[

        \{

            "type": "Info",

            "messageKey": "com.mobileiron.vsp.messages.teamviewer.create.session",

            "localizedMessage": "Created TeamViewer session code"

        }

    ]

}

## Check device compliance

This call checks device compliance for selected or all devices.

### Required Role

See [Authentication](docId\:hJ6Ul2Sz4DNsmnPJ-Fxl_) 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 Role                                                                                                                                                              |
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Category:** Device Management<br />**Role Description:** Manage devices<br />or<br />**Category:** Policy Management<br />**Role Description:** Manage compliance action |

### HTTP method

PUT

### Request URI

api/v2/devices/checkcompliance

### Request parameters

| Parameter          | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | Sample Value                                                |
| ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------- |
| adminDeviceSpaceId | **Required**<br />**Parameter Type:&#x20;**&#x51;uery<br />**Data Type:** Number<br />Device space ID of the administrator.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | 1                                                           |
| allDevices         | **Required**<br />**Parameter Type:** Query<br />**Data Type:** Boolean<br />Specifies whether to return compliance information for all devices, or only for the devices indicated in the request body.<br />Valid values:<br />- true<br />- false<br />If true, then you must send \{} in the request body as raw JSON (application/json) text. If false, then you must send a list of deviceUuids in the request body. See the [Requests](docId\:gHOR_tm-Xo7xBWWPI6WRw).                                                                                                                                                                                                                                                                                               | true                                                        |
| deviceUuids        | **Parameter Type:** Request body<br />**Data Type:** String<br />The device UUIDs of the devices for which to check device compliance.<br />If the value of the allDevices parameter is true, then send \{} in the request body as raw JSON (application/json) text.<br />If the value of the allDevices parameter is false, then send the list of device UUIDs in the request body as raw JSON (application/json) text, like this, for example:<br /><font color="#000000">`{`</font><br /><font color="#000000">    `"deviceUuids": [`</font><br /><font color="#000000">        `"ca7e632e-1c64-4ef3-8ed4-92480cb30a6f"`</font><br /><font color="#000000">    `]`</font><br /><font color="#000000">`}`</font><br />See the [Requests](docId\:gHOR_tm-Xo7xBWWPI6WRw). | \{"deviceUuids": \["ca7e632e-1c64-4ef3-8ed4-92480cb30a6f"]} |

### Response fields

| Field                                              | Description       |
| -------------------------------------------------- | ----------------- |
| results                                            |                   |
| <font color="#000000">        </font>resultId      |                   |
| <font color="#000000">        </font>resultMessage |                   |
| <font color="#000000">        </font>records       |                   |
| resultCount                                        |                   |
| actionType                                         | CHECK\_COMPLIANCE |
| deviceResults                                      |                   |
| successful                                         | true or false.    |

### Sample requests and response

### Requests

**Check Compliance for specific devices**

curl --user \<username>:\<password> --header 'Content-Type: application/json' --request PUT 'https\://`[Ivanti EPMM]`/api/v2/devices/checkcompliance?adminDeviceSpaceId=1\&allDevices=false' --data '\{"deviceUuids": \["af0cea8b-f56c-49f5-b615-76cc34936b2f"]}'

**Check Compliance for all devices**

curl --user \<username>:\<password> --header 'Content-Type: application/json' --request PUT 'https\://`[Ivanti EPMM]`/api/v2/devices/checkcompliance?adminDeviceSpaceId=1\&allDevices=true' --data '\{}'

### Response

\{

    "results": \[

        \{

            "resultId": "114",

            "resultMessage": null,

            "records": \[

                "af0cea8b-f56c-49f5-b615-76cc34936b2f"

            ]

        }

    ],

    "resultCount": 1,

    "actionType": "CHECK\_COMPLIANCE",

    "deviceResults": \{},

    "successful": true

}

## Get device compliance and reason for non compliance

This call checks device compliance for the device specified with the deviceUuid parameter, and returns reasons for non-compliance, if present.

### Required Role

See [Authentication](docId\:hJ6Ul2Sz4DNsmnPJ-Fxl_) 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 Role                                                             |
| ------------------------------------------------------------------------- |
| **Category:** Device Management<br />**Role Description:** Manage devices |

### HTTP method

GET

### Request URI

/api/v2/devices//rulecompliance

### Request parameters

| Parameter          | Description                                                                                                                                     | Sample Value                         |
| ------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------ |
| adminDeviceSpaceId | **Required**<br />**Parameter Type:&#x20;**&#x51;uery<br />**Data Type:** Number<br />Device space ID of the administrator.                     | 1                                    |
| deviceUuid         | **Parameter Type:** Path<br />**Data Type:** String<br />The UUID of the devices for which to get compliance status and non-compliance reasons. | 9c311225-a7e1-486b-8682-96f96bfb38be |

### Response fields

| Field                                | Description |
| ------------------------------------ | ----------- |
| <font color="#000000">results</font> |             |
|         id                           |             |
|         deviceUuid                   |             |
|         ruleId                       |             |
|         complianceAction             |             |
|         quarantineAction             |             |
|         createdAt                    |             |
|         userDisplayName              |             |
|         userId                       |             |
|         platformName                 |             |
|         model                        |             |
|         actionName                   |             |
|         ruleName                     |             |
|         complianceActionNames        |             |
| totalCount                           |             |
| resultCount                          |             |

### Sample request

curl -X GET -u \<username>:\<password> -H 'Content-Type: application/json' 'https\://`[Ivanti EPMM]`/api/v2/devices/9c311225-a7e1-486b-8682-96f96bfb38be/rulecompliance?adminDeviceSpaceId=1'

### Sample response

\{

    "results": \[

        \{

            "id": 1,

            "deviceUuid": "9c311225-a7e1-486b-8682-96f96bfb38be",

            "ruleId": 1,

            "complianceAction": 1,

            "quarantineAction": 0,

            "createdAt": 1558738202000,

            "userDisplayName": "miadmin",

            "userId": "miadmin",

            "platformName": "iOS 11.2",

            "model": "iPhone 6s",

            "actionName": "Send Alert",

            "ruleName": "test2",

            "complianceActionNames": \[

                "ALERT"

            ]

        }

    ],

    "totalCount": 1,

    "resultCount": 1

}

## Enable kiosk

This is call is used to enable KIOSK on device.

### Required Role

See [Authentication](docId\:hJ6Ul2Sz4DNsmnPJ-Fxl_) 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 Role                                                           |
| ----------------------------------------------------------------------- |
| **Category:** Device Management<br />**Role Description:** Enable Kiosk |

### HTTP method

PUT

### Request URI

api/v2/devices/enablekiosk

### Request parameters

| Parameter          | Description                                                                                                                                     | Sample Value                         |
| ------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------ |
| adminDeviceSpaceId | **Required**<br />**Parameter Type:&#x20;**&#x51;uery<br />**Data Type:** Number<br />Device space ID of the administrator.                     | 1                                    |
| deviceUuid         | **Parameter Type:** Path<br />**Data Type:** String<br />The UUID of the devices for which to get compliance status and non-compliance reasons. | 9c311225-a7e1-486b-8682-96f96bfb38be |
| note               | **Parameter Type**: Request body<br />**Data Type**: String<br />Note clarifying the cancel retire request.                                     | "note": "alert(\\"Test\”)”           |

### Response fields

| Field         | **Description**                                       |
| ------------- | ----------------------------------------------------- |
| result        | Container for results.                                |
| resultId      | ID of the result.                                     |
| resultMessage | Message for the result.                               |
| records       | List of devices affected.                             |
| resultCount   | Count of devices affected.                            |
| actionType    | Describes the action type, in this case, ENABLE KIOSK |
| deviceResults | Indicates the outcome for the action per device.      |
| successful    | Indicates success, true or false.                     |

### Sample request

curl --location --request PUT 'https\://\[Ivanti EPMM]/api/v2/devices/enablekiosk?adminDeviceSpaceId=1'\\

\--header 'Content-Type: application/json'\\

\--data ' \{"deviceUuids": \["3d394988-f5a0-45b6-9958-2d30c8e21ccd"], "note": "alert(\\"Test\\")"}'

### Sample response

\{

    "results": \[

        \{

            "resultId": "114",

            "resultMessage": null,

            "records": \[

            "3d394988-f5a0-45b6-9958-2d30c8e21ccd"

            ]

        }

    ],

    "resultCount": 1,

    "actionType": "ENABLE\_KIOSK",

    "deviceResults": \{

            "3d394988-f5a0-45b6-9958-2d30c8e21ccd":

   "Device Action Successful"

        },

   "successful": true

}
