# Execute

Launch stage: GA

`POST /api/1.2/commands/execute`

Runs a cluster command in the given execution context, using the provided language.

 If successful, it returns an ID for tracking the status of the command's execution.

API scopes: command-execution

## Request body

- `clusterId` (string, optional)
  Running cluster id
- `contextId` (string, optional)
  Running context id
- `language` (string, optional)
  Possible values: `LANGUAGE_UNSPECIFIED`, `PYTHON`, `SCALA`, `SQL`, `R`
- `command` (string, optional)
  Executable code

## Returns

- `id` (string, optional)

## Request

```json
{
  "clusterId": "1234-567890-span123",
  "command": "print('Hello, World!')",
  "contextId": "1234567890123456789",
  "language": "python"
}
```

## Response

```json
{
  "id": "1234ab56-7890-1cde-234f-5abcdef67890"
}
```

