---
title: "Get device command history"
method: GET
path: "/devices/{deviceId}/commands/{commandName}"
---

# Get device command history

`GET /devices/{deviceId}/commands/{commandName}`

## Path parameters

- `deviceId` string, required
- `commandName` string, required

## Query parameters

- `api-version` string, required

## Response `200`

Success

- DeviceCommandCollection — The paged results of device command executions.
  - `value` DeviceCommand[], required — The collection of device command executions.
    - `id` string — The request ID of the device command execution.
    - `connectionTimeout` integer — Connection timeout in seconds to wait for a disconnected device to come online. Defaults to 0 seconds.
    - `responseTimeout` integer — Response timeout in seconds to wait for a command completion on a device. Defaults to 30 seconds.
    - `request` unknown
    - `response` unknown
    - `responseCode` integer — The status code of the device command response.
  - `nextLink` string — URL to get the next page of device command executions.

## Other responses

- `default` — An error response received from the IoT Central Service.

---

[API](https://skmtc.net/azure/apis/iotcentral-iotcentral.md) · [All operations](https://skmtc.net/azure/apis/iotcentral-iotcentral/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/azure/iotcentral-iotcentral/versions/565d8813cbd3/schema)
