Favicon

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

List device commands

Required Permission: mdm.android.command.list

Retrieves a paginated list of commands issued to the specified Android Enterprise device.

GET
https://api.applivery.io/v1/organizations/{organizationId}/mdm/android/enterprise/devices/{emmDeviceId}/commands
curl -X GET "https://api.applivery.io/v1/organizations/{organizationId}/mdm/android/enterprise/devices/{emmDeviceId}/commands" \
  -H "Authorization: Bearer <YOUR_API_KEY>"
const response = await fetch("https://api.applivery.io/v1/organizations/{organizationId}/mdm/android/enterprise/devices/{emmDeviceId}/commands", {
  method: "GET",
  headers: {
    Authorization: "Bearer <YOUR_API_KEY>",
  },
});

const data = await response.json();
import requests

response = requests.get(
    "https://api.applivery.io/v1/organizations/{organizationId}/mdm/android/enterprise/devices/{emmDeviceId}/commands",
    headers={"Authorization": "Bearer <YOUR_API_KEY>"},
)

data = response.json()

Request

Send your API key in the request header authorization
Example: Authorization: Bearer <token>

organizationId string
required
Match pattern: ^(([a-fA-F0-9]{24})|([a-zA-Z0-9\\-]{3,}))$
emmDeviceId string
required
Also support serialNumber, IMEI or enrollmentSpecificId obtained with method getEnrollmentTokenId
Match pattern: ^(([a-fA-F0-9]{24})|(\w{1,}))$

Responses

200 Response application/json
status boolean optional
data object optional
items array [object] optional
id string optional
Unique identifier for the command record enabling tracking of individual device management operations across their full execution lifecycle.
Match pattern: ^[a-fA-F0-9]{24}$
organization string optional
Reference to the organization owning this command providing organizational context and access control boundaries for device management operations.
Match pattern: ^[a-fA-F0-9]{24}$
emmEnterprise string optional
Reference to the Android Enterprise configuration under which this command executes linking operations to Google Android Management API resources.
Match pattern: ^[a-fA-F0-9]{24}$
mdmUser string optional
Reference to the mobile device user associated with the target device enabling user-specific command tracking and attribution.
Match pattern: ^[a-fA-F0-9]{24}$
status string optional
Current execution state of the command indicating whether operation is queued, completed, or canceled affecting subsequent action availability.
DONE PENDING CANCEL
config object optional
Command configuration object containing Google Android Management API response data including metadata and execution details.
_config object optional
Raw command configuration object from Google Android Management API preserved for debugging and advanced troubleshooting by administrators.
updatedAt string optional
Timestamp recording the most recent command state modification enabling change tracking and execution progress monitoring.
Format: date-time
createdAt string optional
Timestamp marking command creation establishing audit trail foundation and enabling time-based filtering for operational analysis.
Format: date-time
totalDocs integer optional
limit integer optional
hasPrevPage boolean optional
hasNextPage boolean optional
page integer optional
totalPages integer optional
prevPage integer optional
nextPage integer optional
lean boolean optional
{
    "status": true,
    "data": {
        "items": [
            {
                "id": "507f1f77bcf86cd799439011",
                "organization": "507f1f77bcf86cd799439012",
                "emmEnterprise": "507f1f77bcf86cd799439013",
                "mdmUser": "507f1f77bcf86cd799439014",
                "status": "PENDING",
                "config": {
                    "metadata": {
                        "@type": "type.googleapis.com/google.apps.gmm.v1.Command",
                        "type": "LOCK",
                        "createTime": "2026-02-10T12: 00:00Z",
                        "duration": "3600s",
                        "userName": "[email protected]"
                    },
                    "done": true
                },
                "_config": {
                    "name": "enterprises/LC04z6vydu/devices/123456789/operations/abc123",
                    "metadata": {
                        "type": "LOCK"
                    }
                },
                "updatedAt": "2026-02-10T14: 30:00Z",
                "createdAt": "2026-02-10T12: 00:00Z"
            }
        ],
        "totalDocs": 0,
        "limit": 0,
        "hasPrevPage": true,
        "hasNextPage": true,
        "page": 0,
        "totalPages": 0,
        "prevPage": 0,
        "nextPage": 0,
        "lean": true
    }
}
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"
    }
}