# What a replay of a ticket can show

`GET /v1/tickets/{ticket_id}/replay`

Requires role member or higher.

The anchor, the window that can be loaded, whether history exists for it, the project's other tickets in reach and the lines stored with the ticket. `availability` is `not_enabled` until log history starts, on the date in the Data Retention Policy.

## Authentication

A session token: `Authorization: Bearer <session token>`, or the session cookie in the browser. Requires role `member` or higher.

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `ticket_id` | path | string | yes |  |

## Responses

### 200

What a replay of a ticket can show.

`application/json`

```json
{
  "additionalProperties": false,
  "description": "What a replay of a ticket can show.",
  "properties": {
    "anchor": {
      "description": "The moment the replay stops at.",
      "format": "date-time",
      "type": "string"
    },
    "availability": {
      "anyOf": [
        {
          "enum": [
            "not_enabled"
          ],
          "type": "string"
        },
        {
          "enum": [
            "context_only"
          ],
          "type": "string"
        },
        {
          "enum": [
            "partial"
          ],
          "type": "string"
        },
        {
          "enum": [
            "full"
          ],
          "type": "string"
        }
      ],
      "description": "`not_enabled`: log history is not available. `context_only`: nothing stored in reach, also when the project's history is off; read `context`. `partial`: history starts inside the opening 15 minutes. `full`: otherwise."
    },
    "context": {
      "additionalProperties": false,
      "properties": {
        "after": {
          "items": {
            "additionalProperties": false,
            "properties": {
              "level": {
                "type": "string"
              },
              "message": {
                "type": "string"
              },
              "ts": {
                "type": "string"
              }
            },
            "required": [
              "ts",
              "level",
              "message"
            ],
            "type": "object"
          },
          "type": "array"
        },
        "before": {
          "items": {
            "additionalProperties": false,
            "properties": {
              "level": {
                "type": "string"
              },
              "message": {
                "type": "string"
              },
              "ts": {
                "type": "string"
              }
            },
            "required": [
              "ts",
              "level",
              "message"
            ],
            "type": "object"
          },
          "type": "array"
        }
      },
      "required": [
        "before",
        "after"
      ],
      "type": "object"
    },
    "earliest": {
      "description": "The earliest time that can be loaded: 24 hours before the anchor, limited by the plan's retention.",
      "format": "date-time",
      "type": "string"
    },
    "environment": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "environments": {
      "description": "Environments with lines in the opening 15 minutes, and the ticket's own.",
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "history_starts_at": {
      "anyOf": [
        {
          "format": "date-time",
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "The project's oldest stored line; time before it was not stored, which is not the same as silence."
    },
    "latest": {
      "description": "The latest time that can be loaded: 5 minutes after the anchor.",
      "format": "date-time",
      "type": "string"
    },
    "other_tickets": {
      "description": "Other tickets of the project in reach, oldest first, at most 200.",
      "items": {
        "additionalProperties": false,
        "properties": {
          "anchor": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "pattern": "^tkt_[0-7][0-9a-hjkmnp-tv-z]{25}$",
            "type": "string"
          },
          "service": {
            "type": "string"
          },
          "severity": {
            "anyOf": [
              {
                "enum": [
                  "critical"
                ],
                "type": "string"
              },
              {
                "enum": [
                  "high"
                ],
                "type": "string"
              },
              {
                "enum": [
                  "medium"
                ],
                "type": "string"
              },
              {
                "enum": [
                  "low"
                ],
                "type": "string"
              }
            ]
          },
          "title": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "title",
          "severity",
          "service",
          "anchor"
        ],
        "type": "object"
      },
      "type": "array"
    },
    "service": {
      "description": "The ticket's service.",
      "type": "string"
    }
  },
  "required": [
    "anchor",
    "service",
    "environment",
    "earliest",
    "latest",
    "availability",
    "history_starts_at",
    "environments",
    "other_tickets",
    "context"
  ],
  "type": "object"
}
```

### 401

unauthorized: no valid session, or the email is not verified.

Problem type: [unauthorized](https://docs.dlogify.com/errors/unauthorized.md).

### 404

not-found: the resource does not exist, or the caller is not a member of its organization.

Problem type: [not-found](https://docs.dlogify.com/errors/not-found.md).

### 429

rate-limited: per-user management request limit.

Problem type: [rate-limited](https://docs.dlogify.com/errors/rate-limited.md).

## Example

```bash
curl -X GET "https://api.dlogify.com/v1/tickets/{ticket_id}/replay" \
  -H "Authorization: Bearer $DLOGIFY_SESSION"
```

Source: https://docs.dlogify.com/api/replay/getTicketReplay
