Device Action v3.0
| API version | 3.0 |
|---|---|
| Last Update | 06/28/2017 |
| Authentication | YES |
| HTTP Method | POST |
| Content Type | application/json |
| Rate limited | YES |
| Requests per rate limit | 10/min |
| Response Format | JSON |
| Change History | 04/10/2018: fixed a bug that the API returns HTTP 400 when group id doesn't exist on an account with assign to group action 05/23/2017: added one more action type (types parameter in request), re-identify 06/28/2017: added one more action type (types parameter in request), assign_to_group |
Use to do an action on multiple devices on your account
API URL
Request Parameters
| Key | Datatype | Parameter Type | Required | Description | Default |
|---|---|---|---|---|---|
| access_token | string | URL | Yes | access token which archived from OAuth authentication step | |
| types | string | Body | Yes | Action Type:
| |
| ids | array<string> | Body | Optional | HWIDs of devices to be applied the action. The request body must have ids parameter or macs parameter, but not both. | |
| macs | array<string> | Body | Optional | MAC addresses of devices to be applied the action The request body must have ids parameter or macs parameter, but not both. | |
| params | object | Body | Optional | Required parameters for a specific action. | |
| params.exempt_time | int | Body | Optional | Specify how long you want to exempt devices in hour. Value should be less than 65000 if this parameter equals 0, we will do exempt devices forever | 0 |
| params.group_id | string | Body | Optional | Specify which group (group id) you want to assign devices to This parameter should be specified when action type is assign_to_group | default |
Response HTTP Code
See APIs
Response Parameters
| Key | DataType | Description |
|---|---|---|
| <hwid> or <mac address> | int | Result for a device which has the given HWID/MAC address -1: not support 0: apply action failed 1: apply action successfully |
Example
Example Request: using Device ID
Example Response
History
| Action | Version | URL |
|---|---|---|
| Delete | 2.0 | Delete Devices v2.0 |
| Renew IP Exempt Unexempt | 2.0 | Devices Action v2.0 |
