Skip to content
View as Markdown

WorkflowDataService

Queries data collected by workflow actions, such as captured sessions.

FetchCapturedSessions

Fetches captured sessions matching the given criteria, optionally scoped to a specific action.

Request: bitdrift.public.unary.workflows.v1.FetchCapturedSessionsRequest

Response: bitdrift.public.unary.workflows.v1.FetchCapturedSessionsResponse

Example CURL

Bash
curl -X POST https://api-public.bitdrift.io/bitdrift.public.unary.workflows.v1.WorkflowDataService/FetchCapturedSessions \
  -H "x-bitdrift-api-key: <key>" \
  -H "Content-Type: application/json" \
  -d '{
  "action_id": "fkQ1PfAZhdYvJexzY6DYuoYCZTEaWO0Y7spxwjr7akc",
  "page": 1,
  "per_page": 25,
  "time_range": {
    "relative_time_range": {
      "duration": "3600s",
      "offset": "3600s"
    }
  }
}'

Example Response

JSON
{
  "captured_sessions": [
    {
      "count": 42,
      "fields": {
        "key": ""
      },
      "first_seen": "2024-01-15T09:30:00Z",
      "last_seen": "2024-01-15T09:30:00Z",
      "session_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
    }
  ],
  "full_count": 42
}