Skip to content

Query streams of a specific type

GET
/api/event-stores/{eventStoreName}/stream-types/{streamType}/streams

Retrieves streams of a specific type with filtering options.

This endpoint provides a specialized query for streams of a particular type, making it easier to:

  • Find all streams of a specific entity type (e.g., all user streams, all order streams)
  • Monitor streams of a particular domain or business context
  • Generate reports on specific types of streams

The streams are returned with their metadata, positions, and timestamps for further analysis.

eventStoreName
required

Event store name (automatically scoped to your organization)

string

Event store name (automatically scoped to your organization)

streamType
required

The stream type to query (e.g., “user”, “order”, “cart”)

string

The stream type to query (e.g., “user”, “order”, “cart”)

streamId
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

Type-specific 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

User streams example

Example of query results 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"
},
{
"streamId": "user-456",
"streamPosition": 2,
"streamType": "user",
"streamMetadata": {
"tenant": "example-tenant"
},
"isArchived": false,
"lastArchivedPosition": 0,
"createdAt": "2023-01-17T10:22:15Z",
"updatedAt": "2023-01-17T10:25: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"
}