Queues API
List Queues
List all queues in your environment with pagination support.
GET
/
api
/
v1
/
queues
TypeScript
import { queues } from "@trigger.dev/sdk";
// List all queues
const allQueues = await queues.list();
// With pagination
const pagedQueues = await queues.list({
page: 1,
perPage: 20,
});curl --request GET \
--url https://api.trigger.dev/api/v1/queues \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.trigger.dev/api/v1/queues"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.trigger.dev/api/v1/queues', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.trigger.dev/api/v1/queues",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.trigger.dev/api/v1/queues"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.trigger.dev/api/v1/queues")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.trigger.dev/api/v1/queues")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "queue_1234",
"name": "my-task-id",
"type": "task",
"running": 5,
"queued": 10,
"paused": false,
"concurrencyLimit": 10,
"concurrency": {
"current": 10,
"base": 10,
"override": null,
"overriddenAt": null,
"overriddenBy": null
}
}
],
"pagination": {
"currentPage": 1,
"totalPages": 5,
"count": 50
}
}Authorizations
Use a named environment API key. It starts with tr_dev_sk_, tr_prod_sk_, tr_stg_sk_, etc.
Create a named API key in the API Keys section of your Trigger.dev project dashboard. Choose the narrowest access preset that supports your integration.
Our TypeScript SDK will default to using the value of the TRIGGER_SECRET_KEY environment variable if it is set. If you are using the SDK in a different environment, you can set the key using the configure function.
import { configure } from "@trigger.dev/sdk"; configure({ accessToken: "tr_dev_sk_1234" });
Query Parameters
Page number of the queue listing (1-based)
Number of queues per page
Was this page helpful?
⌘I
TypeScript
import { queues } from "@trigger.dev/sdk";
// List all queues
const allQueues = await queues.list();
// With pagination
const pagedQueues = await queues.list({
page: 1,
perPage: 20,
});curl --request GET \
--url https://api.trigger.dev/api/v1/queues \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.trigger.dev/api/v1/queues"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.trigger.dev/api/v1/queues', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.trigger.dev/api/v1/queues",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.trigger.dev/api/v1/queues"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.trigger.dev/api/v1/queues")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.trigger.dev/api/v1/queues")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "queue_1234",
"name": "my-task-id",
"type": "task",
"running": 5,
"queued": 10,
"paused": false,
"concurrencyLimit": 10,
"concurrency": {
"current": 10,
"base": 10,
"override": null,
"overriddenAt": null,
"overriddenBy": null
}
}
],
"pagination": {
"currentPage": 1,
"totalPages": 5,
"count": 50
}
}
