GET
/
v2
/
events

Request

cursor
string

By providing a cursor you can paginate through all of the events.

messageId
string

Filter events by message id.

state
string

Filter events by state

url
string

Filter events by url.

topicName
string

Filter events by URL Group (topic) name.

scheduleId
string

Filter events by schedule id.

queueName
string

Filter events by queue name.

fromDate
number

Filter events by starting date, in milliseconds (Unix timestamp). This is inclusive.

toDate
number

Filter events by ending date, in milliseconds (Unix timestamp). This is inclusive.

count
number

The number of events to return. Default and max is 1000.

order
string

The sorting order of events by timestamp. Valid values are “earliestFirst” and “latestFirst”. The default is “latestFirst”.

Response

cursor
string

A cursor which you can use in subsequent requests to paginate through all events. If no cursor is returned, you have reached the end of the events.

events
Array
time
int
required

Timestamp of this log entry, in milliseconds

messageId
string
required

The associated message id

header
Record<string, string[]>
required

The headers of the message.

body
string
required

Base64 encoded body of the message.

state
string
required

The current state of the message at this point in time.

ValueDescription
CREATEDThe message has been accepted and stored in QStash
ACTIVEThe task is currently being processed by a worker.
RETRYThe task has been scheduled to retry.
ERRORThe execution threw an error and the task is waiting to be retried or failed.
DELIVEREDThe message was successfully delivered.
FAILEDThe task has errored too many times or encountered an error that it cannot recover from.
CANCEL_REQUESTEDThe cancel request from the user is recorded.
CANCELLEDThe cancel request from the user is honored.
error
string

An explanation what went wrong

nextDeliveryTime
int

The next scheduled time of the message. (Unix timestamp in milliseconds)

url
string

The destination url

topicName
string

The name of the URL Group (topic) if this message was sent through a topic

endpointName
int

The name of the endpoint if this message was sent through a URL Group

scheduleId
string

The scheduleId of the message if the message is triggered by a schedule

queueName
string

The name of the queue if this message is enqueued on a queue