# Get Command Status

Launch stage: GA

`GET /api/1.2/commands/status`

Gets the status of and, if available, the results from a currently executing command.

 The command ID is obtained from a prior successful call to __execute__.

API scopes: command-execution

## Query parameters

- `clusterId` (string, optional)
- `contextId` (string, optional)
- `commandId` (string, optional)

## Returns

- `id` (string, optional)
- `status` (string, optional)
  Possible values: `COMMAND_STATUS_UNSPECIFIED`, `COMMAND_CANCELLED`, `COMMAND_CANCELLING`, `COMMAND_ERROR`, `COMMAND_FINISHED`, `COMMAND_QUEUED`, `COMMAND_RUNNING`
- `results` (object, optional)
  - `cause` (string, optional)
    The cause of the error
  - `data` (object, optional)
  - `fileName` (string, optional)
    The image data in one of the following formats:
    
     1. A Data URL with base64-encoded image data: `data:image/{type};base64,{base64-data}`.
        Example: `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUA...`
    
     2. A FileStore file path for large images: `/plots/{filename}.png`.
        Example: `/plots/b6a7ad70-fb2c-4353-8aed-3f1e015174a4.png`
  - `fileNames` (array of string, optional)
    List of image data for multiple images. Each element follows the same format as file_name.
  - `isJsonSchema` (boolean, optional)
    true if a JSON schema is returned instead of a string representation of the Hive type.
  - `pos` (int32, optional)
    internal field used by SDK
  - `resultType` (string, optional)
    Possible values: `RESULT_TYPE_UNSPECIFIED`, `ERROR_RESULT`, `IMAGE_RESULT`, `IMAGES_RESULT`, `TABLE_RESULT`, `TEXT_RESULT`
  - `schema` (array of object, optional)
    The table schema
  - `summary` (string, optional)
    The summary of the error
  - `truncated` (boolean, optional)
    true if partial results are returned.

## Response

```json
{
  "id": "1234ab56-7890-1cde-234f-5abcdef67890",
  "results": {
    "data": "Hello, World!",
    "resultType": "text"
  },
  "status": "Finished"
}
```

