---
search:
  exclude: true
---

# <a id="bitdrift.public.unary.workflows.v1.WorkflowDataService"></a>WorkflowDataService

**Source definition:** [`src/bitdrift/public/unary/workflows/v1/api.proto#L114-L118`](<https://github.com/bitdriftlabs/api/blob/main/src/bitdrift/public/unary/workflows/v1/api.proto#L114-L118>)

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

### <a id="FetchCapturedSessions"></a>FetchCapturedSessions

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

<section class="proto-service-table" markdown>

| Request | Response |
| - | - |
| <span class="proto-type proto-type-message">[<i class="proto-type-part">bitdrift</i><i class="proto-type-dot">.</i><i class="proto-type-part">public</i><i class="proto-type-dot">.</i><i class="proto-type-part">unary</i><i class="proto-type-dot">.</i><i class="proto-type-part">workflows</i><i class="proto-type-dot">.</i><i class="proto-type-part">v1</i><i class="proto-type-dot">.</i><i class="proto-type-part">FetchCapturedSessionsRequest</i>](bitdrift_public_unary_workflows_v1_FetchCapturedSessionsRequest.md "bitdrift.public.unary.workflows.v1.FetchCapturedSessionsRequest")</span> | <span class="proto-type proto-type-message">[<i class="proto-type-part">bitdrift</i><i class="proto-type-dot">.</i><i class="proto-type-part">public</i><i class="proto-type-dot">.</i><i class="proto-type-part">unary</i><i class="proto-type-dot">.</i><i class="proto-type-part">workflows</i><i class="proto-type-dot">.</i><i class="proto-type-part">v1</i><i class="proto-type-dot">.</i><i class="proto-type-part">FetchCapturedSessionsResponse</i>](bitdrift_public_unary_workflows_v1_FetchCapturedSessionsResponse.md "bitdrift.public.unary.workflows.v1.FetchCapturedSessionsResponse")</span> |

</section>

<p class="h4">Example Request</p>
**URL:** `https://api-public.bitdrift.io/bitdrift.public.unary.workflows.v1.WorkflowDataService/FetchCapturedSessions`

See [calling the API](../api-guide/calling-the-api.md) for authentication and request details.

```json
{
  "action_id": "fkQ1PfAZhdYvJexzY6DYuoYCZTEaWO0Y7spxwjr7akc",
  "page": 1,
  "per_page": 25,
  "time_range": {
    "relative_time_range": {
      "duration": "3600s",
      "offset": "3600s"
    }
  }
}
```

<p class="h4">Example Response</p>
```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
}
```

