Skip to content

Query streams with filtering options

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
eventStoreName
required

Event store name (automatically scoped to your organization)

string

Event store name (automatically scoped to your organization)

streamId
string
streamType
Any of:
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
Allowed values: streamPosition createdAt updatedAt streamId
sortDirection
string
Allowed values: asc desc
includeCount
string

Streams retrieved successfully

object
streams
required
Array<object>
object
streamId
required
string
streamPosition
required
number
streamType
required
string
streamMetadata
object
key
additional properties
nullable
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
}
}

Invalid query parameters

object
error
required
string
Allowed values: Invalid request body
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
Allowed values: UNAUTHORIZED
message
required
string
Allowed values: Unauthorized: Organization ID not found in authentication context
Examples
{
"error": "UNAUTHORIZED",
"message": "Unauthorized: Organization ID not found in authentication context"
}