Logs

List Logs

Paginate through logs of published messages

GET/v2/logs
cURL
curl --request GET \
  --url https://qstash-{region}.upstash.io/v2/logs \
  --header 'Authorization: Bearer <token>'
200Response
{
  "cursor": "<string>",
  "logs": [
    {
      "time": 123,
      "messageId": "<string>",
      "header": "<string>",
      "body": "<string>",
      "state": "CREATED",
      "error": "<string>",
      "nextDeliveryTime": 123,
      "url": "<string>",
      "topicName": "<string>",
      "endpointName": "<string>",
      "scheduleId": "<string>",
      "queueName": "<string>",
      "responseStatus": 123,
      "responseBody": "<string>",
      "responseHeaders": "<string>",
      "timeout": 123,
      "method": "<string>",
      "callback": "<string>",
      "callbackHeaders": "<string>",
      "failureCallback": "<string>",
      "failureCallbackHeaders": "<string>",
      "maxRetries": 123,
      "retryDelayExpression": "<string>",
      "label": "<string>",
      "labels": [
        "<string>"
      ]
    }
  ]
}

Authorization

Authorizationheaderstringrequired

Bearer authentication header of the form Bearer <token>.

Query parameters

cursorquerystring

By providing a cursor you can paginate through all of the logs

messageIdquerystring

Filter logs by message ID

statequeryenum<string>

Filter logs by message state

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.
IN_PROGRESSThe task is in one of ACTIVE, RETRY or ERROR state.
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.
Available options:CREATEDACTIVERETRYERRORIN_PROGRESSDELIVEREDCANCEL_REQUESTEDCANCELLED
urlquerystring

Filter logs by destination URL

topicNamequerystring

Filter logs by URL Group name

scheduleIdquerystring

Filter logs by schedule ID

queueNamequerystring

Filter logs by queue name

fromDatequeryinteger

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

toDatequeryinteger

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

countqueryintegerdefault: 100

The number of log entries to return.

labelquerystring[]

Filter logs by label. Supports multi-value filtering. You can pass multiple values to match messages with any of the given labels (OR logic).

Examples:

  • label=my_label
  • label=label_1&label=label_2

Response

200 — List of logs

cursorstring

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

logsobject[]
Loading search…