# getRunSnapshot

```graphql
query GetRunSnapshot($command: RunsGetRunSnapshotCommand!) {
  getRunSnapshot(command: $command) {
    afterEventId
    events {
      eventId
      eventType
      payload
      isError
      createdAt
      runId
      eventClass
      spanId
      parentSpanId
      turnId
      originEventType
      originCustomName
      unrecoverableFields
    }
  }
}
```

Read a run replay snapshot by canonical UUID; use event readers for targeted failure analysis.

## Arguments

| Name            | Type                       | Required | Description                                                                                                                                                                           |
| --------------- | -------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `command`       | RunsGetRunSnapshotCommand! | Yes      | Task and workflow snapshots capture a fixed event cutoff and allow up to 5000 events or 10 MiB. Larger histories return 400 RUN\_SNAPSHOT\_LIMIT\_EXCEEDED; use paginated run events. |
| `command.runId` | ID!                        | Yes      |                                                                                                                                                                                       |

## Variables

```json
{
  "command": {
    "runId": "string"
  }
}
```

## Responses

| Status | Description                               |
| ------ | ----------------------------------------- |
| 200    | The RunsSnapshot! in data.getRunSnapshot. |

## Call it

```bash
curl -X POST "https://api.veryfront.com/graphql" \
  -H "Authorization: Bearer $VERYFRONT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "query": "query GetRunSnapshot($command: RunsGetRunSnapshotCommand!) {\n  getRunSnapshot(command: $command) {\n    afterEventId\n    events {\n      eventId\n      eventType\n      payload\n      isError\n      createdAt\n      runId\n      eventClass\n      spanId\n      parentSpanId\n      turnId\n      originEventType\n      originCustomName\n      unrecoverableFields\n    }\n  }\n}",
  "variables": {
    "command": {
      "runId": "string"
    }
  }
}'
```

## Example response

```json
{
  "data": {
    "getRunSnapshot": {
      "afterEventId": 0,
      "events": [
        {
          "eventId": 0,
          "eventType": "string",
          "payload": {},
          "isError": false,
          "createdAt": "string",
          "runId": "string",
          "eventClass": "string",
          "spanId": "string",
          "parentSpanId": "string",
          "turnId": "string",
          "originEventType": "string",
          "originCustomName": "string",
          "unrecoverableFields": [
            "string"
          ]
        }
      ]
    }
  }
}
```
