Description | Getting an operation by activity idvalue 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 Method | GET |
---|
Request/Response Format | application/json |
---|
cURL command | Code Block |
---|
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 |
---|
corresponds correspond to ACTIVITY_1 . Code Block |
---|
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 | Code Block |
---|
> 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":" |
|
---|
DEVICE_INFOCOMMAND1receivedTimeStampstatus":"COMPLETED","createdTimeStamp":"2016- |
| 0429191215579":false":true,"payLoad":"{\"message\":\"Hi John, Please come to meeting room\"}","activityId":"ACTIVITY_ |
| 1"}
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"}]}
|
| Sample JSON Output Definition | |
---|
DEVICE_INFO COMMAND 17,
"status":"COMPLETED",
" |
| receivedTimeStamp 04-29 19:16:23.678",
"createdTimeStamp": "2016-04-29 19:12:15.579",
"isEnabled": false,
"activityId": "ACTIVITY_1"05-12 23:28:34.13",
"isEnabled":true,
"payLoad":"{\"message\":\"Hi John, Please come to the 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"
}
]
} |
Property | Definition |
---|
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: | id | The 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.
| receivedTimeStamp | The time WSO2 EMM received the response from the device. | createdTimeStamp | The time when the operation was requested to be carried out. | isEnabled | If 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
|
| Identifier which will The identifier used to identify the operation |
| by unique human readable keyuniquely. | responses | The response received by the device that contains the details of the operation you wished to get. |
|
|