# Stored lines of a ticket's replay

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

Requires role member or higher.

Lines in time order, merged across objects. `direction=backward` reads what comes before a position, newest first. A page may hold fewer lines than `limit` with a `next_cursor`.

## 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 |
| --- | --- | --- | --- | --- |
| `from` | query | string | yes |  |
| `to` | query | string | yes |  |
| `environment` | query | string | no |  |
| `service` | query | string | no |  |
| `direction` | query |  | no |  |
| `cursor` | query | string | no |  |
| `limit` | query | integer | no |  |
| `ticket_id` | path | string | yes |  |

## Responses

### 200

Stored lines of a part of a ticket's replay window. Never filtered beyond what the request asks.

`application/json`

```json
{
  "additionalProperties": false,
  "description": "Stored lines of a part of a ticket's replay window. Never filtered beyond what the request asks.",
  "properties": {
    "lines": {
      "description": "In time order; newest first for `direction=backward`. A full page is not promised: read `next_cursor`.",
      "items": {
        "additionalProperties": false,
        "properties": {
          "environment": {
            "type": "string"
          },
          "level": {
            "type": "string"
          },
          "message": {
            "description": "Redacted, cut at 2 KiB.",
            "type": "string"
          },
          "service": {
            "type": "string"
          },
          "trace_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "ts": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "ts",
          "level",
          "service",
          "environment",
          "message",
          "trace_id"
        ],
        "type": "object"
      },
      "type": "array"
    },
    "next_cursor": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "required": [
    "lines",
    "next_cursor"
  ],
  "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).

### 422

validation-failed: the request does not match the schema.

Problem type: [validation-failed](https://docs.dlogify.com/errors/validation-failed.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/lines" \
  -H "Authorization: Bearer $DLOGIFY_SESSION"
```

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