> ## Documentation Index
> Fetch the complete documentation index at: https://docs.canton.network/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> If you are building a Canton Network application, start from https://docs.canton.network/appdev/quickstart.md. To run only a local network for your own Daml code, without building the QuickStart demo, see https://docs.canton.network/sdks-tools/development-tools/localnet.md.

# GetCommandStatus

Ledger API

›

[gRPC API](https://docs.canton.network/reference/grpc-ledger-api-reference/overview.md)

›

[v2.admin](https://docs.canton.network/reference/grpc-ledger-api-reference/com-daml-ledger-api-v2-admin.md)

›

GetCommandStatus

com.daml.ledger.api.v2.admin

# GetCommandStatus

gRPC

RPC

`/com.daml.ledger.api.v2.admin.CommandInspectionService/GetCommandStatus`

## Protocol Details

Protocol
gRPC

Service
CommandInspectionService

RPC
GetCommandStatus

Client stream
No

Server stream
No

## Inputs

### GetCommandStatusRequest

Message
com.daml.ledger.api.v2.admin.GetCommandStatusRequest

Client stream
No

`command_id_prefix`
string

`state`
CommandState

`limit`
uint32

## Outputs

### GetCommandStatusResponse

Message
com.daml.ledger.api.v2.admin.GetCommandStatusResponse

Server stream
No

`command_status`
repeated CommandStatus

## Related Schemas

> [accordion] com.daml.ledger.api.v2.admin.GetCommandStatusRequest
>
> `command_id_prefix`
> string
>
> `state`
> CommandState
>
> `limit`
> uint32

> [accordion] com.daml.ledger.api.v2.admin.CommandState
>
> <ul>
>   <li>`COMMAND_STATE_UNSPECIFIED`</li>
>
>   <li>`COMMAND_STATE_PENDING`</li>
>
>   <li>`COMMAND_STATE_SUCCEEDED`</li>
>
>   <li>`COMMAND_STATE_FAILED`</li>
> </ul>

> [accordion] com.daml.ledger.api.v2.admin.GetCommandStatusResponse
>
> `command_status`
> repeated CommandStatus

> [accordion] com.daml.ledger.api.v2.admin.CommandStatus
>
> `started`
> Timestamp
>
> `completed`
> Timestamp
>
> `completion`
> Completion
>
> `state`
> CommandState
>
> `commands`
> repeated Command
>
> `request_statistics`
> RequestStatistics
>
> `updates`
> CommandUpdates
>
> `synchronizer_id`
> string
>
> `timings`
> repeated Timing

> [accordion] com.daml.ledger.api.v2.Completion
>
> `command_id`
> string
>
> `status`
> Status
>
> `update_id`
> string
>
> `user_id`
> string
>
> `act_as`
> repeated string
>
> `submission_id`
> string
>
> `deduplication_offset`
> int64
>
> `deduplication_duration`
> Duration
>
> `trace_context`
> TraceContext
>
> `offset`
> int64
>
> `synchronizer_time`
> SynchronizerTime
>
> `paid_traffic_cost`
> int64
>
> `transaction_hash`
> bytes

> [accordion] com.daml.ledger.api.v2.TraceContext
>
> `traceparent`
> string
>
> `tracestate`
> string

> [accordion] com.daml.ledger.api.v2.SynchronizerTime
>
> `synchronizer_id`
> string
>
> `record_time`
> Timestamp

> [accordion] com.daml.ledger.api.v2.Command
>
> `create`
> CreateCommand
>
> `exercise`
> ExerciseCommand
>
> `exercise_by_key`
> ExerciseByKeyCommand
>
> `create_and_exercise`
> CreateAndExerciseCommand

> [accordion] com.daml.ledger.api.v2.CreateCommand
>
> `template_id`
> Identifier
>
> `create_arguments`
> Record

> [accordion] com.daml.ledger.api.v2.Identifier
>
> `package_id`
> string
>
> `module_name`
> string
>
> `entity_name`
> string

> [accordion] com.daml.ledger.api.v2.Record
>
> `record_id`
> Identifier
>
> `fields`
> repeated RecordField

> [accordion] com.daml.ledger.api.v2.RecordField
>
> `label`
> string
>
> `value`
> Value

> [accordion] com.daml.ledger.api.v2.Value
>
> `unit`
> Empty
>
> `bool`
> bool
>
> `int64`
> sint64
>
> `date`
> int32
>
> `timestamp`
> sfixed64
>
> `numeric`
> string
>
> `party`
> string
>
> `text`
> string
>
> `contract_id`
> string
>
> `optional`
> Optional
>
> `list`
> List
>
> `text_map`
> TextMap
>
> `gen_map`
> GenMap
>
> `record`
> Record
>
> `variant`
> Variant
>
> `enum`
> Enum

> [accordion] com.daml.ledger.api.v2.Optional
>
> `value`
> Value

> [accordion] com.daml.ledger.api.v2.List
>
> `elements`
> repeated Value

> [accordion] com.daml.ledger.api.v2.TextMap
>
> `entries`
> repeated Entry

> [accordion] com.daml.ledger.api.v2.TextMap.Entry
>
> `key`
> string
>
> `value`
> Value

> [accordion] com.daml.ledger.api.v2.GenMap
>
> `entries`
> repeated Entry

> [accordion] com.daml.ledger.api.v2.GenMap.Entry
>
> `key`
> Value
>
> `value`
> Value

> [accordion] com.daml.ledger.api.v2.Variant
>
> `variant_id`
> Identifier
>
> `constructor`
> string
>
> `value`
> Value

> [accordion] com.daml.ledger.api.v2.Enum
>
> `enum_id`
> Identifier
>
> `constructor`
> string

> [accordion] com.daml.ledger.api.v2.ExerciseCommand
>
> `template_id`
> Identifier
>
> `contract_id`
> string
>
> `choice`
> string
>
> `choice_argument`
> Value

> [accordion] com.daml.ledger.api.v2.ExerciseByKeyCommand
>
> `template_id`
> Identifier
>
> `contract_key`
> Value
>
> `choice`
> string
>
> `choice_argument`
> Value

> [accordion] com.daml.ledger.api.v2.CreateAndExerciseCommand
>
> `template_id`
> Identifier
>
> `create_arguments`
> Record
>
> `choice`
> string
>
> `choice_argument`
> Value

> [accordion] com.daml.ledger.api.v2.admin.RequestStatistics
>
> `envelopes`
> uint32
>
> `request_size`
> uint32
>
> `recipients`
> uint32

> [accordion] com.daml.ledger.api.v2.admin.CommandUpdates
>
> `created`
> repeated Contract
>
> `archived`
> repeated Contract
>
> `exercised`
> uint32
>
> `fetched`
> uint32
>
> `looked_up_by_key`
> uint32

> [accordion] com.daml.ledger.api.v2.admin.Contract
>
> `template_id`
> Identifier
>
> `contract_id`
> string
>
> `contract_key`
> Value

> [accordion] com.daml.ledger.api.v2.admin.Timing
>
> `description`
> string
>
> `duration_ms`
> uint32

grpcurl

```bash grpcurl theme={"theme":{"light":"github-light","dark":"github-dark"}}
# Add -plaintext if the server is not using TLS.
grpcurl \
  -d @ \
  <HOST:PORT> \
  com.daml.ledger.api.v2.admin.CommandInspectionService/GetCommandStatus <<'EOF'
{
  "commandIdPrefix": "string",
  "state": "COMMAND_STATE_UNSPECIFIED",
  "limit": 0
}
EOF
```

OK

application/json

```json OK theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "commandStatus": [
    {
      "started": "string",
      "completed": "string",
      "completion": {
        "commandId": "string",
        "status": "string",
        "updateId": "string",
        "userId": "string",
        "actAs": [
          "string"
        ],
        "submissionId": "string",
        "deduplicationOffset": "0"
      },
      "state": "COMMAND_STATE_UNSPECIFIED",
      "commands": [
        {
          "create": {
            "templateId": {},
            "createArguments": {}
          }
        }
      ],
      "requestStatistics": {
        "envelopes": 0,
        "requestSize": 0,
        "recipients": 0
      },
      "updates": {
        "created": [
          {
            "templateId": {},
            "contractId": "string",
            "contractKey": {}
          }
        ],
        "archived": [
          {
            "templateId": {},
            "contractId": "string",
            "contractKey": {}
          }
        ],
        "exercised": 0,
        "fetched": 0,
        "lookedUpByKey": 0
      },
      "synchronizerId": "string"
    }
  ]
}
```
