---
title: "Get the commands the robot has queued up"
method: GET
path: "/v1/vehicles/{vehicleId}/command-queue"
tags: ["Vehicle Autonomy"]
---

# Get the commands the robot has queued up

`GET /v1/vehicles/{vehicleId}/command-queue`

## Request

- Base URL: `https://api.polymathrobotics.dev`
- URL: `https://api.polymathrobotics.dev/v1/vehicles/{vehicleId}/command-queue`
- Auth: HTTP bearer

Returns a snapshot of the live command queue in dispatch order, plus the id of the command currently being executed. The snapshot is refreshed once per cortex tick, so it may lag the live queue by one tick.

## Path parameters

- `vehicleId` string, required

## Response `200`

Queued command records, the active command id, and the number remaining.

- CommandQueueResponse
  - `status` string, required
  - `message` string, required
  - `data` CommandQueueData, required
    - `queued` CortexCommandRecordModel[]: Queued commands in dispatch order. The active command, if any, is the front entry and is reported with state ACTIVE.
      - `id` string, required: Cortex-assigned command id, in canonical UUID string form.
      - `summary` string: Short human-readable description of the command.
      - `state` unknown
      - `state_text` string: Name of the state, e.g. TERMINAL.
      - `outcome` unknown
      - `outcome_text` string: Name of the outcome, e.g. REJECTED.
      - `detail` string: Outcome context, e.g. the validation message for a rejection.
      - `queued_time` Stamp, required
        - `sec` integer
        - `nanosec` integer
      - `started_time` Stamp, required
        - `sec` integer
        - `nanosec` integer
      - `completed_time` Stamp, required
        - `sec` integer
        - `nanosec` integer
    - `active_command_id` string, required: Id of the currently active command, in canonical UUID string form. The nil UUID when nothing is active.
    - `number_commands_remaining` integer, required: Number of commands remaining in the queue.

## Other responses

- `500`: Internal server error

## Changes

- **2026-09-09** `7bb062ddb622`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/polymathrobotics/apis/polymath-api/changes/v1/vehicles/:vehicleId/command-queue/get.md)

---

[API](https://skmtc.dev/polymathrobotics/apis/polymath-api.md) - [All operations](https://skmtc.dev/polymathrobotics/apis/polymath-api/llms.txt) - [OpenAPI document](https://skmtc.dev/polymathrobotics/apis/polymath-api/revisions/3b5ff2f21338?raw)
