---
title: "Get a Operations for a device"
method: GET
path: "/v0/devices/{deviceId}/operations/"
tags: ["device_DeviceOperations"]
---

# Get a Operations for a device

`GET /v0/devices/{deviceId}/operations/`

Retrieves the Dispatch operations that have targeted a specific device, giving a device-centric view of Converge, install, and uninstall activity.

Use this endpoint when you already have a device_id and want to see which fleet-wide dispatch operations it was included in, rather than starting from the operation and looking up its devices. Returns the same OperationWithStats objects used elsewhere in the Operations API, each including the operation's type, current state, and aggregate device counts.

**About Operations for a Device**

Operations, also called Dispatch commands, are Esper's mechanism for issuing large fleet actions such as Converge and group-level app installs and uninstalls to many devices in a single request. Every operation that includes this device appears in this list, regardless of when it was created or how many other devices it targeted. This is the reverse lookup of GET /v0/operations/{operationsId}/devices/, which starts from the operation instead of the device.

**Common Use Cases**

Auditing every dispatch operation a device has participated in

Troubleshooting a device that appears out of sync by checking whether a recent Converge operation reached it

Confirming whether a device was included in a bulk install or uninstall operation

**Best Practices**

Cross-reference the operation IDs returned here with GET /v0/operations/{operationId}/ for full operation-level context, including overall success and failure counts

Check the most recent entries first when troubleshooting a device that just failed to Converge

**Workflow**

Identify the device_id from a device listing endpoint

Call this endpoint with that device_id to list the operations that targeted it

Use the returned operation id with GET /v0/operations/{operationsId}/devices/{deviceId}/ to see this device's specific status within that operation

## Path parameters

- `deviceId` string, uuid, required

## Response `200`

Operations information for the Device

- object
  - `count` integer
  - `previous` string
  - `next` string
  - `results` DeviceOperationWithStats[]
    - `id` string, uuid
    - `operation` 'CONVERGE'
    - `state` 'CREATED' | 'RESOLVING' | 'RESOLVED' | 'DISPATCHING' | 'COMPLETED' | 'FAILED'
    - `schedule_type` 'IMMEDIATE' | 'WINDOW' — Following Schedule types are supported ``` * IMMEDIATE: Schedule the command to execcute Immediately * WINDOW: Schedule the command to execute within the given window
    - `schedule_args` DeviceScheduleArgs
      - `start_datetime` string, date-time — Start date and time in ISO 8601 format, including timezone (e.g., 2024-08-08T14:30:00Z or 2024-08-08T14:30:00+05:30).
      - `end_datetime` string, date-time — End date and time in ISO 8601 format, including timezone (e.g., 2024-08-08T15:30:00Z or 2024-08-08T15:30:00+05:30).
      - `time_type` 'console' | 'device' — The Time-Type argument, in Schedule args, is to indicate which timezone the Command Framework should utilize when scheduling the command. Following Schedule Args for Time-Type are supported: ``` * CONSOLE: Use the local timezone of the user creating the schedule. * DEVICE: Use the local timezone of the device, to which the command is issued, wherever it may be. ```
      - `window_start_time` string, date-time — It is automatically populated by the time field from the request's start_datetime and cannot be injected via the API request body.
      - `window_end_time` string, date-time — It is automatically populated by the time field from the request's end_datetime and cannot be injected via the API request body.
      - `days` integer[]
    - `operation_device_query` object
    - `arguments` object
      - `converge_with_provision` boolean
      - `sample_key` string
      - `geofence_ids` string[] — List of geofence UUIDs to apply (APPLY_GEO_FENCE).
    - `reason` string
    - `created_at` string, date-time
    - `created_by` string, uuid
    - `updated_at` string, date-time
    - `updated_by` string, uuid
    - `operation_activity` object[]
      - `operation_state` 'CREATED' | 'QUERY INITIATED' | 'QUERY RESOLVED' | 'DISPATCHING' | 'DISPATCHED' | 'PROCESSING' | 'PROCESSED' | 'SUCCESS' | 'FAILURE' | 'CANCELLED'
      - `created_at` string, date-time
    - `operation_stats` DeviceOperationStats
      - `device_operation_statuses_count` object
        - `resolved_device_count` integer
        - `dispatched_device_count` integer
        - `dispatch_failed_count` integer
        - `failed_device_count` integer
        - `success_device_count` integer
        - `cancelled_device_count` integer

---

[API](https://skmtc.net/esper/apis/esper-api-reference.md) · [All operations](https://skmtc.net/esper/apis/esper-api-reference/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/esper/esper-api-reference/revisions/e1f64cbb488e/schema)
