Favicon

You are here: Home > API Reference > Android > Commands > List AOS commands

GET /organizations/:organizationId/mdm/aosp/enterprise/devices/:aosDeviceId/commands

Required Permission: mdm.aosp.command.list

Get AOS commands for a device

GET
/v1/organizations/:organizationId/mdm/aosp/enterprise/devices/:aosDeviceId/commands
Copy to clipboard

List AOS commands

Required Permission: mdm.aosp.command.list

Get AOS commands for a device

Request

Add parameter in header authorization
Example: Authorization: Bearer <token>
organizationId string
required
Match pattern: ^(([a-fA-F0-9]{24})|([a-zA-Z0-9\\-]{3,}))$
aosDeviceId string
required
Match pattern: ^[a-fA-F0-9]{24}$
page integer
optional
Page number for paginated command results.
limit integer
optional
Maximum number of commands to return per page.
sort string
optional
Sort expression applied to the command list.
Match pattern: ^[\w.]*((:asc)|(:desc))?$

Responses

200 Response application/json
status boolean required
data object required
items array [object] required
id string required
Identifier of the AOSP command record.
Match pattern: ^[a-fA-F0-9]{24}$
organization string required
Identifier of the organization that owns the command.
Match pattern: ^[a-fA-F0-9]{24}$
aosEnterprise string required
Identifier of the AOSP enterprise associated with the target device.
Match pattern: ^[a-fA-F0-9]{24}$
aosDevice string required
Identifier of the target AOSP device.
Match pattern: ^[a-fA-F0-9]{24}$
mdmUser string optional
Optional identifier of the MDM user associated with the target device.
Match pattern: ^[a-fA-F0-9]{24}$
command string required
Command type that the backend asked the device to execute.
REBOOT LOCK CLEAR_APP_DATA RESET_PASSWORD DISENROLL
params object optional
Optional command-specific payload sent with the command.
pushId string optional
Pushy push identifier accepted for the command dispatch, when available.
≤ 256 characters
status string required
Current backend status of the command lifecycle.
PENDING RECEIVED DONE ERROR EXPIRED CANCEL
results array [object] optional
Execution history recorded for the command.
deliveryExpiresAt string optional
Timestamp when the command push should no longer be considered valid for delivery.
sentAt string optional
Timestamp when the backend accepted dispatch of the command push.
updatedAt string required
Timestamp when the command record was last updated.
createdAt string required
Timestamp when the command record was created.
totalDocs integer required
≥ -9007199254740991 · ≤ 9007199254740991
limit integer required
≥ -9007199254740991 · ≤ 9007199254740991
hasPrevPage boolean required
hasNextPage boolean required
page integer required
≥ -9007199254740991 · ≤ 9007199254740991
totalPages integer required
≥ -9007199254740991 · ≤ 9007199254740991
prevPage integer required
≥ -9007199254740991 · ≤ 9007199254740991
nextPage integer required
≥ -9007199254740991 · ≤ 9007199254740991
{
    "status": true,
    "data": {
        "items": [
            {
                "id": "string",
                "organization": "string",
                "aosEnterprise": "string",
                "aosDevice": "string",
                "mdmUser": "string",
                "command": "REBOOT",
                "params": {},
                "pushId": "string",
                "status": "PENDING",
                "results": [
                    {
                        "at": "string",
                        "data": {},
                        "errorMessage": "string",
                        "errorType": "string"
                    }
                ],
                "deliveryExpiresAt": "string",
                "sentAt": "string",
                "updatedAt": "string",
                "createdAt": "string"
            }
        ],
        "totalDocs": 0,
        "limit": 0,
        "hasPrevPage": true,
        "hasNextPage": true,
        "page": 0,
        "totalPages": 0,
        "prevPage": 0,
        "nextPage": 0
    }
}
401 Response application/json
status boolean optional
false
error object optional
code number optional
4004
message string optional
Invalid Token
{
    "status": false,
    "error": {
        "code": 4002,
        "message": "No auth token"
    }
}
404 Response application/json
status boolean optional
false
error object optional
code number optional
3001
message string optional
Entity not found
{
    "status": false,
    "error": {
        "code": 3001,
        "message": "Entity not found"
    }
}