list

View as MarkdownOpen in Claude

List queues in the project.

Response

datalist of objectsOptional
List of queues.

Response Example

Response
1{
2 "links": {
3 "self": "string",
4 "first": "string",
5 "next": "string",
6 "prev": "string"
7 },
8 "data": [
9 {
10 "id": "aae131db-214c-46f5-88b6-92004f8467cf",
11 "project_id": "c6c4679b-716a-456a-9e41-a03821005005",
12 "friendly_name": "test",
13 "max_size": 5,
14 "current_size": 0,
15 "average_wait_time": 0,
16 "uri": "/api/relay/rest/queues/aae131db-214c-46f5-88b6-92004f8467cf",
17 "date_created": "2024-01-15T09:30:00Z",
18 "date_updated": "2024-01-15T09:30:00Z"
19 }
20 ]
21}

Example

1import { RestClient } from "@signalwire/sdk";
2
3const client = new RestClient({
4 project: "your-project-id",
5 token: "your-api-token",
6 host: "your-space.signalwire.com"
7});
8
9const result = await client.queues.list();
10for (const q of result.data ?? []) {
11 console.log(q.name, q["current_size"]);
12}