com.atlassian.confluence.content.render.xhtml.migration.exceptions.UnknownMacroMigrationException: The macro 'next_previous_link3' is unknown.

Getting Pending Android Device Operations

Description

The Android agent communicates with the server to get the operations that are queued up at the server end for a given device using this REST API. While getting the pending operations the details of the operations executed at the device end is shared with the server. The following diagram will help you understand how the get pending operation API functions.

Resource Path/{id}
URL/mdm-android-agent/operation/{id}
HTTP MethodPUT
Request/Response Formatapplication/json
cURL command
curl -X PUT -H "Content-Type: application/json" -H "Authorization: Bearer <EMM_API_TOKEN>" -k -v https://<EMM_HOST>:<EMM_HTTPS_PORT>/mdm-android-agent/operation/{id}
  • For more information on how to generate the EMM API token, see Generating the OAuth 2.0 Access Token.
  • By default, <EMM_HOST> is localhost. However, if you are using a public IP, the respective IP address or domain needs to be specified.
  • By default, <EMM_HTTPS_PORT> has been set to 9443. However, if the port offset has been incremented by n, the default port value needs to be incremented by n.
  • Provide the device ID as the value for {id}. For more information on retrieving the device ID, see  Retrieving the ID of an Android device .

Example:

curl -X PUT -H "Content-Type: application/json" -H "Authorization: Bearer e56974e8bf5df15748f89c6c5da9835d" -k -v https://localhost:9443/mdm-android-agent/operation/185678093073333
 Sample output
> PUT /mdm-android-agent/operation/185678093073333 HTTP/1.1
> Host: localhost:9443
> User-Agent: curl/7.43.0
> Accept: */*
> Content-Type: application/json
> Authorization: Bearer e56974e8bf5df15748f89c6c5da9835d
< HTTP/1.1 200 OK
< Date: Sun, 20 Mar 2016 06:45:49 GMT
< Content-Type: application/json
< Content-Length: 1929
< Server: WSO2 Carbon Server
[{"code":"REBOOT","type":"COMMAND","id":5,"status":"COMPLETED","createdTimeStamp":"2016-03-07 00:30:02.152","isEnabled":false},{"code":"UPGRADE_FIRMWARE","type":"COMMAND","id":6,"status":"PENDING","createdTimeStamp":"2016-03-07 00:34:15.027","isEnabled":false},{"code":"APPLICATION_LIST","type":"COMMAND","id":7,"status":"PENDING","createdTimeStamp":"2016-03-11 14:21:42.771","isEnabled":false},{"code":"DEVICE_INFO","type":"COMMAND","id":8,"status":"COMPLETED","createdTimeStamp":"2016-03-11 14:21:42.78","isEnabled":false},{"code":"APPLICATION_LIST","type":"COMMAND","id":9,"status":"PENDING","createdTimeStamp":"2016-03-18 13:47:08.0","isEnabled":false},{"code":"DEVICE_INFO","type":"COMMAND","id":10,"status":"PENDING","createdTimeStamp":"2016-03-18 13:47:08.019","isEnabled":false},{"code":"DEVICE_LOCK","type":"COMMAND","id":11,"status":"PENDING","createdTimeStamp":"2016-03-18 13:48:20.663","isEnabled":false}}]
Sample JSON Definition 
{
  "code": "REBOOT",
  "type": "COMMAND",
  "id": 5,
  "status": "COMPLETED",
  "createdTimeStamp": "2016-03-07 00:30:02.152",
  "isEnabled": false
}

Property Value

Description

code

The code of the operation that you carried out. For example the code of the operation carried out to restart or reboot the device is REBOOT.

type

The operation type that was carried out on the device. The operations types can be one of the following:

  • COMMAND
  • PROFILE
idThe operations carried out on a device are recorded in a database table. The ID of the operation in the database table is given as the ID in the output.
status

The status of the operation that has been carried out on a device. The operation status can be any one of the following:

  • IN-PROGRESS - The operation is processing on the EMM server side and has not yet been delivered to the device.
  • PENDING - The operation is delivered to the device but the response from the device is pending.
  • COMPLETED - The operation is delivered to the device and the server has received a response back from the device.
  • ERROR - An error has occurred while carrying out the operation.
receivedTimeStampThe time WSO2 EMM received the response from the device.
createdTimeStampThe time when the operation was requested to be carried out.
isEnabledIf the assigned value is true it indicates that a policy is enforced on the device. If the assigned value is false it indicates that a policy is not enforced on a device.
com.atlassian.confluence.content.render.xhtml.migration.exceptions.UnknownMacroMigrationException: The macro 'next_previous_links2' is unknown.