Skip to content
View as Markdown

TimelineService

Provides access to session timeline data and hydration state.

GetHydrationStatus

Fetches the hydration status of a session.

Request: bitdrift.public.unary.timeline.v1.GetHydrationStatusRequest

Response: bitdrift.public.unary.timeline.v1.GetHydrationStatusResponse

Example CURL

Bash
curl -X POST https://api.bitdrift.io/bitdrift.public.unary.timeline.v1.TimelineService/GetHydrationStatus \
  -H "x-bitdrift-api-key: <key>" \
  -H "Content-Type: application/json" \
  -d '{
  "session_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}'

Example Response

JSON
{
  "status": {
    "created_at": "2024-01-15T09:30:00Z",
    "expiration_time": "2024-01-15T09:30:00Z",
    "finished_at": "2024-01-15T09:30:00Z",
    "hydration_status": "HYDRATING",
    "incremental": true,
    "started_at": "2024-01-15T09:30:00Z"
  }
}

GetSessionInfo

Fetches the session info for a session.

Request: bitdrift.public.unary.timeline.v1.GetSessionInfoRequest

Response: bitdrift.public.unary.timeline.v1.GetSessionInfoResponse

Example CURL

Bash
curl -X POST https://api.bitdrift.io/bitdrift.public.unary.timeline.v1.TimelineService/GetSessionInfo \
  -H "x-bitdrift-api-key: <key>" \
  -H "Content-Type: application/json" \
  -d '{
  "session_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}'

Example Response

JSON
{
  "end_time": "2024-01-15T09:30:00Z",
  "start_time": "2024-01-15T09:30:00Z"
}

GetSessionLogs

Fetches the logs for a session.

Request: bitdrift.public.unary.timeline.v1.GetSessionLogsRequest

Response: bitdrift.public.unary.timeline.v1.GetSessionLogsResponse

Example CURL

Bash
curl -X POST https://api.bitdrift.io/bitdrift.public.unary.timeline.v1.TimelineService/GetSessionLogs \
  -H "x-bitdrift-api-key: <key>" \
  -H "Content-Type: application/json" \
  -d '{
  "end_time": "2024-01-15T09:30:00Z",
  "log_type": {
    "screen_capture": {}
  },
  "page": 1,
  "per_page": 25,
  "session_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "start_time": "2024-01-15T09:30:00Z"
}'

Example Response

JSON
{
  "logs": [
    {
      "fields": {
        "fields": {
          "key": {}
        }
      },
      "listener_ids": [
        "abc-123-def"
      ],
      "log_level": "DEBUG",
      "log_type": "REPLAY",
      "message": "Example text",
      "timestamp": "2024-01-15T09:30:00Z"
    }
  ],
  "total_pages": 3
}

HydrateSession

Triggers the hydration of a session. Can be used to force a re-hydration of an already hydrated session.

Request: bitdrift.public.unary.timeline.v1.HydrateSessionRequest

Response: bitdrift.public.unary.timeline.v1.HydrateSessionResponse

Example CURL

Bash
curl -X POST https://api.bitdrift.io/bitdrift.public.unary.timeline.v1.TimelineService/HydrateSession \
  -H "x-bitdrift-api-key: <key>" \
  -H "Content-Type: application/json" \
  -d '{
  "force": true,
  "session_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}'

Example Response

JSON
{
  "ignored": false,
  "last_hydration_state": {
    "created_at": "2024-01-15T09:30:00Z",
    "expiration_time": "2024-01-15T09:30:00Z",
    "finished_at": "2024-01-15T09:30:00Z",
    "hydration_status": "HYDRATING",
    "incremental": true,
    "started_at": "2024-01-15T09:30:00Z"
  },
  "success": true
}