Documentation

Support

Triggers

Manage the dead letter queue with the REST API

List, replay, and discard dead letter queue events using the Triggers Admin API.
Read time 2 minutesLast updated 3 hours ago

You can use the Triggers Admin API to manage the dead letter queue (DLQ).

Using the API

The Triggers Admin API documentation contains a detailed description of DLQ operations, such as how to list events, get a single event by ID, replay events, and discard events. The API documentation includes authentication details, endpoints, request and response formats, and examples. You can download the API specification in OpenAPI format and use it to generate clients or set up automation. To use the API, authenticate with a Service Account that has either the Triggers DLQ Viewer role (to list and get events) or the Triggers DLQ Manager role (to also replay and discard events).

Authorization header

To authenticate the requests, use Basic Authentication. Create a service account and base64 encode the
<KEY_ID>:<SECRET_KEY>
and use it as the value of the
Authorization
header.
--header 'Authorization: Basic <SERVICE_ACCOUNT_CREDENTIALS_ENCODED>' \

List DLQ events

To list events in the dead letter queue for the project and environment, send the following request:
curl 'https://services.api.unity.com/triggers/v1/projects/<PROJECT_ID>/environments/<ENVIRONMENT_ID>/dlq/events' \--header 'Authorization: Basic <SERVICE_ACCOUNT_CREDENTIALS_ENCODED>'
You can add query parameters to filter by status, date range, or event ID, and to paginate results. Refer to the Triggers Admin API for the full list of parameters.

Get DLQ event

To fetch a single DLQ event by ID to inspect its payload and metadata, send the following request:
curl 'https://services.api.unity.com/triggers/v1/projects/<PROJECT_ID>/environments/<ENVIRONMENT_ID>/dlq/events/<EVENT_ID>' \--header 'Authorization: Basic <SERVICE_ACCOUNT_CREDENTIALS_ENCODED>'
Replace
<EVENT_ID>
with the event ID returned from the list response.
For the full response schema and an example DLQ event, refer to Dead letter queue – DLQ event structure.

Replay DLQ events

Replay places the event in a retry queue. The API returns immediately and a background worker republishes the event asynchronously. To replay a single pending event, send the following request:
curl -X POST 'https://services.api.unity.com/triggers/v1/projects/<PROJECT_ID>/environments/<ENVIRONMENT_ID>/dlq/events/<EVENT_ID>/replay' \--header 'Authorization: Basic <SERVICE_ACCOUNT_CREDENTIALS_ENCODED>'
To replay all pending events in the project and environment, send the following request:
curl -X POST 'https://services.api.unity.com/triggers/v1/projects/<PROJECT_ID>/environments/<ENVIRONMENT_ID>/dlq/events/replay-all' \--header 'Authorization: Basic <SERVICE_ACCOUNT_CREDENTIALS_ENCODED>'

Discard DLQ events

To discard a single pending event from the queue without reprocessing it, send the following request:
curl -X POST 'https://services.api.unity.com/triggers/v1/projects/<PROJECT_ID>/environments/<ENVIRONMENT_ID>/dlq/events/<EVENT_ID>/discard' \--header 'Authorization: Basic <SERVICE_ACCOUNT_CREDENTIALS_ENCODED>'
To discard all pending events in the project and environment, send the following request:
curl -X POST 'https://services.api.unity.com/triggers/v1/projects/<PROJECT_ID>/environments/<ENVIRONMENT_ID>/dlq/events/discard-all' \--header 'Authorization: Basic <SERVICE_ACCOUNT_CREDENTIALS_ENCODED>'

Additional resources