You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add Queue Management API endpoints and SDK documentation (#3087)
Closes #<issue>
## ✅ Checklist
- [ ] I have followed every step in the [contributing
guide](https://github.com/triggerdotdev/trigger.dev/blob/main/CONTRIBUTING.md)
- [ ] The PR title follows the convention.
- [ ] I ran and tested the code works
---
## Testing
N/A - Documentation and OpenAPI schema updates only.
---
## Changelog
Added comprehensive Queue Management API support:
**OpenAPI Endpoints:**
- `GET /api/v1/queues` - List all queues with pagination support
- `GET /api/v1/queues/{queueParam}` - Retrieve a specific queue by ID,
task ID, or custom queue name
- `POST /api/v1/queues/{queueParam}/pause` - Pause or resume a queue
- `POST /api/v1/queues/{queueParam}/concurrency/override` - Override
queue concurrency limits
- `POST /api/v1/queues/{queueParam}/concurrency/reset` - Reset
concurrency limits to base values
**Schema Definitions:**
- `QueueObject` - Complete queue representation with concurrency details
- `ListQueuesResult` - Paginated queue listing response
**Documentation:**
- Updated `queue-concurrency.mdx` with SDK usage examples for queue
management
- Added 5 new management API documentation pages for each endpoint
- Updated `docs.json` navigation structure with new "Queues API" section
All endpoints support flexible queue identification (by ID, task ID, or
custom queue name) and include TypeScript code samples.
---
## Screenshots
N/A
💯
https://claude.ai/code/session_01LyrXwxHCbejvi34fykifPP
Co-authored-by: Claude <noreply@anthropic.com>
When the parent task reaches the `triggerAndWait` call, it checkpoints and transitions to the `WAITING` state, releasing its concurrency slot back to both its queue and the environment. Once the subtask completes, the parent task will resume and re-acquire a concurrency slot.
229
+
230
+
## Managing queues with the SDK
231
+
232
+
The SDK provides a `queues` namespace that allows you to manage queues programmatically. You can list, retrieve, pause, resume, and modify concurrency limits for queues.
233
+
234
+
<Note>
235
+
Import from `@trigger.dev/sdk`:
236
+
```ts
237
+
import { queues } from"@trigger.dev/sdk";
238
+
```
239
+
</Note>
240
+
241
+
### Listing queues
242
+
243
+
You can list all queues in your environment with pagination support:
244
+
245
+
```ts
246
+
import { queues } from"@trigger.dev/sdk";
247
+
248
+
// List all queues (returns paginated results)
249
+
const allQueues =awaitqueues.list();
250
+
251
+
// With pagination options
252
+
const pagedQueues =awaitqueues.list({
253
+
page: 1,
254
+
perPage: 20,
255
+
});
256
+
```
257
+
258
+
### Retrieving a queue
259
+
260
+
You can retrieve a specific queue by its ID, or by its type and name:
0 commit comments