Unknown macro: {next_previous_link3}
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 11 Next »

DescriptionEach operation is associated with a unique value or ID known as the activity ID. Using this, you are able to get the details of a preferred operation.
Resource Path/{id}
URL/mdm-admin/operations/activity/{id}
HTTP MethodGET
Request/Response Formatapplication/json
cURL command
curl -X GET -H "Content-Type: application/json" -H "Authorization: Bearer <EMM_API_TOKEN>" -k -v https://<EMM_HOST>:<EMM_HTTPS_PORT>/mdm-admin/operations/activity/{id}
  • For more information on how to generate the <EMM_API_TOKEN>, see Generating the EMM API 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 unique ID associated with the operation as the value for {id}. You can get the activity ID associated with the operation you wish to get details about by running the get device operation details REST API.

Example: Retrieve the operation details that correspond to ACTIVITY_1.

curl -X GET -H "Content-Type: application/json" -H "Authorization: Bearer 9a0dc4b7c4729e7200e0eec0b8ec7168" -k -v https://localhost:9443/mdm-admin/operations/activity/ACTIVITY_1
 Sample output
> GET /mdm-admin/operations/activity/ACTIVITY_1 HTTP/1.1
> User-Agent: curl/7.30.0
> Host: localhost:9443
> Accept: */*
> Content-Type: application/json
> Authorization: Bearer 9a0dc4b7c4729e7200e0eec0b8ec7168
> 
< HTTP/1.1 200 OK
< Cache-Control: private
< Expires: Thu, 01 Jan 1970 05:30:00 IST
< Date: Fri, 29 Apr 2016 13:48:02 GMT
< Content-Type: application/json
< Content-Length: 158
< Server: WSO2 Carbon Server
{"code":"APPLICATION_LIST","type":"COMMAND","id":1,"status": "COMPLETED","receivedTimeStamp":"","createdTimeStamp":"2016-05-12 22:19:35.379","isEnabled":false,"activityId":"ACTIVITY_1","responses":[{"response":"[{\"package\":\"jp.naver.line.android\",\"isSystemApp\":false,\"version\":15050801,\"name\":\"LINE\"},{\"package\":\"com.pa.dslrremotecontrol\",\"isSystemApp\":false,\"version\":8,\"name\":\"DSLR%20Remote%20Control\"}]","recievedTimeStamp":"2016-05-12 22:20:27.815"}]}




Sample JSON Output Definition 

{
   "code": "NOTIFICATION",
   "type": "PROFILE",
   "id": 7,
   "status": "COMPLETED",
   "createdTimeStamp": "2016-05-12 23:28:34.13",
   "isEnabled": true,
   "payLoad": "{\"message\":\"Hi John, Please come to meeting room\"}",
   "activityId": "ACTIVITY_7",
   "responses": [
      {
         "response": {
            "timestamp": "Thu May 12 23:27:52 GMT+05:30 2016",
            "status": "RECEIVED",
            "deviceState": "unlocked"
         },
         "recievedTimeStamp": "2016-05-12 23:29:03.663"
      },
      {
         "response": {
            "timestamp": "Thu May 12 23:29:08 GMT+05:30 2016",
            "status": "DISMISSED"
         },
         "recievedTimeStamp": "2016-05-12 23:30:32.161"
      }
   ]
}

PropertyDefinition
code

The code of the operation that you carried out. For example the code of the operation carried out to device info operation is DEVICE_INFO.

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 is 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.

activityId

The identifier used to identify the operation uniquely.
responsesResponses received for the above activity by the device
  • No labels