Query streams with filtering options
GET /api/event-stores/{eventStoreName}/streams
GET
/api/event-stores/{eventStoreName}/streams
Retrieves streams with flexible filtering options.
Key Features:
- Filter streams by type, ID pattern, and creation timeframes
- Paginate results with limit and offset parameters
- Sort by different fields (stream_position, created_at, updated_at, stream_id)
- Get total count for pagination (when include_count=true)
This endpoint is particularly useful for:
- Discovering streams available in the event store
- Finding streams by type or naming pattern
- Monitoring stream creation and update activities
- Generating reports on stream usage and distribution
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ” eventStoreName
required
Event store name (automatically scoped to your organization)
string
Event store name (automatically scoped to your organization)
Query Parameters
Section titled “Query Parameters ” streamId
string
streamType
Any of:
string
Array<string>
streamIdPattern
string
minPosition
string
maxPosition
string
fromDate
string format: date-time
toDate
string format: date-time
includeArchived
string
includeMetadata
string
limit
string
offset
string
sortBy
string
sortDirection
string
includeCount
string
Responses
Section titled “ Responses ”Streams retrieved successfully
object
streams
required
Array<object>
object
streamId
required
string
streamPosition
required
number
streamType
required
string
streamMetadata
object
key
additional properties
isArchived
required
boolean
lastArchivedPosition
required
number
createdAt
required
ISO 8601 formatted timestamp in UTC
string
updatedAt
required
ISO 8601 formatted timestamp in UTC
string
pagination
required
object
limit
required
number
offset
required
number
total
number
hasMore
required
boolean
Examples
Basic query result for streams
Example of query results for all streams
{ "streams": [ { "streamId": "user-123", "streamPosition": 5, "streamType": "user", "streamMetadata": { "tenant": "example-tenant", "tags": [ "important", "customer" ] }, "isArchived": false, "lastArchivedPosition": 0, "createdAt": "2023-01-15T12:30:45Z", "updatedAt": "2023-01-16T09:15:30Z" }, { "streamId": "order-456", "streamPosition": 3, "streamType": "order", "streamMetadata": { "tenant": "example-tenant", "customer_id": "123" }, "isArchived": false, "lastArchivedPosition": 0, "createdAt": "2023-01-15T12:31:22Z", "updatedAt": "2023-01-15T12:35:18Z" } ], "pagination": { "limit": 100, "offset": 0, "total": 2, "hasMore": false }}Filtered query result by type
Example of filtered query for user streams
{ "streams": [ { "streamId": "user-123", "streamPosition": 5, "streamType": "user", "streamMetadata": { "tenant": "example-tenant", "tags": [ "important", "customer" ] }, "isArchived": false, "lastArchivedPosition": 0, "createdAt": "2023-01-15T12:30:45Z", "updatedAt": "2023-01-16T09:15:30Z" } ], "pagination": { "limit": 100, "offset": 0, "total": 1, "hasMore": false }}Invalid query parameters
object
error
required
string
details
required
Array<object>
object
code
required
string
message
required
string
path
required
Array
Unauthorized: Organization ID not found in authentication context
object
error
required
string
message
required
string
Examples
{ "error": "UNAUTHORIZED", "message": "Unauthorized: Organization ID not found in authentication context"}