# Get a Genie tool execution

> One tool run of a conversation (a step's execution_log_id): how the tool was called and what came back.

Source: https://docs.stacksync.com/api-reference/genies/conversations/get_genie_tool_execution

`GET https://api.stacksync.com/v1/workspaces/{workspace_id}/genies/conversations/{genie_conversation_id}/tool-executions/{execution_log_id}`

- Operation: `get_genie_tool_execution`
- Resource: Genie conversations
- Access: read-only

## Authentication

- `Authorization: Bearer <key>`: A workspace API key (workspace_…, created by a workspace owner under Workspace settings > Stacksync API) acts with editor rights on that workspace only; a user API key (user_…, created under Profile > Stacksync API) acts as that user in every workspace they belong to. POST, PUT and PATCH requests must send Content-Type: application/json. Every authentication failure answers 403.

## Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `workspace_id` | integer | Yes | The workspace. List the ones your key can reach with GET /v1/workspaces. |
| `genie_conversation_id` | string (uuid) | Yes | The Genie conversation. |
| `execution_log_id` | string | Yes | The tool execution, a step's execution_log_id in the conversation. |

## Query parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `region` | string (besg \| usnv) | Yes | Region of the genie: besg (Europe) or usnv (United States) |

## Returns

### 200 OK

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `execution_log_id` | string | Yes |  |
| `execution_type` | string \| null | No |  |
| `status` | string \| null | No |  |
| `started_at` | string \| null | No |  |
| `finished_at` | string \| null | No |  |
| `duration_ms` | integer \| null | No |  |
| `request` | any | No |  |
| `response` | any | No |  |
| `module_runs` | array of object (GenieModuleRun) | No |  |
| `module_runs[].execution_log_id` | string | Yes |  |
| `module_runs[].execution_type` | string \| null | No |  |
| `module_runs[].status` | string \| null | No |  |
| `module_runs[].started_at` | string \| null | No |  |
| `module_runs[].finished_at` | string \| null | No |  |
| `module_runs[].duration_ms` | integer \| null | No |  |
| `module_runs[].request` | any | No |  |
| `module_runs[].response` | any | No |  |

## Example request

```bash
curl -X GET "https://api.stacksync.com/v1/workspaces/{workspace_id}/genies/conversations/{genie_conversation_id}/tool-executions/{execution_log_id}?region=besg" \
  -H "Authorization: Bearer $STACKSYNC_API_KEY"
```

## Example response (200)

```json
{
  "execution_log_id": "<execution_log_id>",
  "execution_type": "<execution_type>",
  "status": "<status>",
  "started_at": "<started_at>",
  "finished_at": "<finished_at>",
  "duration_ms": 0,
  "request": "<request>",
  "response": "<response>",
  "module_runs": [
    {
      "execution_log_id": "<execution_log_id>",
      "execution_type": "<execution_type>",
      "status": "<status>",
      "started_at": "<started_at>",
      "finished_at": "<finished_at>",
      "duration_ms": 0,
      "request": "<request>",
      "response": "<response>"
    }
  ]
}
```

## Errors

| Status | Meaning | Body |
| --- | --- | --- |
| 400 | Bad Request | `{ "error": string, "msg": string, "field": string \| null }` |
| 403 | Forbidden | `{ "error": string, "msg": string, "field": string \| null }` |
| 404 | Not Found | `{ "error": string, "msg": string, "field": string \| null }` |

## Related

- [API Reference overview](https://docs.stacksync.com/api-reference): base URLs, regions, pagination, idempotency and errors
- [Authentication](https://docs.stacksync.com/api-reference/authentication): API keys and the 403 answers
- OpenAPI document: https://docs.stacksync.com/openapi.json
- [List Genie conversations](https://docs.stacksync.com/api-reference/genies/conversations/list_genie_conversations)
- [Get a Genie conversation](https://docs.stacksync.com/api-reference/genies/conversations/get_genie_conversation)
- [Get a Genie browser session](https://docs.stacksync.com/api-reference/genies/conversations/get_genie_browser_session)