You are viewing an old version of this page. View the current version.
Compare with Current
View Page History
« Previous
Version 3
Next »
Operations are associated with unique human readable value to identify the each operation. This id can be taken from the operation object as activityId.
Description | Getting an operation by activity id. |
---|
Resource Path | /{id} |
---|
URL | /mdm-admin/operations/activity/{id} |
---|
HTTP Method | GET |
---|
Request/Response Format | application/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 .
Example: Retrieve operation details that corresponds 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":"DEVICE_INFO","type":"COMMAND","id":1,"receivedTimeStamp":"","createdTimeStamp":"2016-04-29 19:12:15.579","isEnabled":false,"activityId":"ACTIVITY_1"}
|
---|
Sample JSON Output Definition |
{
"code": "DEVICE_INFO",
"type": "COMMAND",
"id": 1,
"receivedTimeStamp": "2016-04-29 19:16:23.678",
"createdTimeStamp": "2016-04-29 19:12:15.579",
"isEnabled": false,
"activityId": "ACTIVITY_1"
}
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 identify the operation by unique human readable key. |
|
---|