---
title: "Get statistics for a specific command."
method: GET
path: "/rest/command/getcommandstats/{commandId}"
tags: ["Command APIs"]
---

# Get statistics for a specific command.

`GET /rest/command/getcommandstats/{commandId}`

## Request

- Base URL: `https://masonconsole.com`
- URL: `https://masonconsole.com/rest/command/getcommandstats/{commandId}`
- Auth: HTTP bearer

This API retrieves statistics for a specific command based on its ID.

## Path parameters

- `commandId` string, required

## Response `200`

Successful response

- CommandStats
  - `totalDevices` integer: Total number of devices associated with the command.
  - `success` integer: Number of successful executions of the command.
  - `ready` integer: Number of devices ready to receive the command.
  - `executed` integer: Number of times the command has been executed.
  - `fail` integer: Number of failed executions of the command.
  - `count` integer: Total count.
  - `readyArr` string[]: List of device IDs that are ready to receive the command.

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `403`: Forbidden
- `429`: Too Many Requests
- `500`: Internal server error
- `503`: Service Unavailable

---

[API](https://skmtc.dev/bymason/apis/mason-device-console-api-docs.md) - [All operations](https://skmtc.dev/bymason/apis/mason-device-console-api-docs/llms.txt) - [OpenAPI document](https://skmtc.dev/bymason/apis/mason-device-console-api-docs/revisions/d9cdcc14b7d1?raw)
