Skip to navigation

List queues in the project.

Response

datalist of objectsOptional
List of queues.

Response Example

Response
{
"links": {
"self": "string",
"first": "string",
"next": "string",
"prev": "string"
},
"data": [
{
"id": "aae131db-214c-46f5-88b6-92004f8467cf",
"project_id": "c6c4679b-716a-456a-9e41-a03821005005",
"friendly_name": "test",
"max_size": 5,
"current_size": 0,
"average_wait_time": 0,
"uri": "/api/relay/rest/queues/aae131db-214c-46f5-88b6-92004f8467cf",
"date_created": "2024-01-15T09:30:00Z",
"date_updated": "2024-01-15T09:30:00Z"
}
]
}

Example

import { RestClient } from "@signalwire/sdk";
const client = new RestClient({
project: "your-project-id",
token: "your-api-token",
host: "your-space.signalwire.com"
});
const result = await client.queues.list();
for (const q of result.data ?? []) {
console.log(q.friendly_name, q.current_size);
}