get

View as MarkdownOpen in Claude

Retrieve a specific queue.

Path parameters

idstringRequiredformat: "uuid"
Unique ID of the queue.

Response

idstringRequiredformat: "uuid"
The unique identifier of the queue.
project_idstringRequiredformat: "uuid"
The project ID associated with this queue.
friendly_namestringRequired
The friendly name of the queue.
max_sizeintegerOptional
The maximum number of callers allowed in the queue.
current_sizeintegerOptional
The current number of callers in the queue.
average_wait_timeintegerOptional
The average wait time in seconds.
uristringOptional
The URL of this queue.
date_createddatetimeOptional
Timestamp when the queue was created.
date_updateddatetimeOptional
Timestamp when the queue was last updated.

Response Example

Response
1{
2 "id": "aae131db-214c-46f5-88b6-92004f8467cf",
3 "project_id": "c6c4679b-716a-456a-9e41-a03821005005",
4 "friendly_name": "test",
5 "max_size": 5,
6 "current_size": 0,
7 "average_wait_time": 0,
8 "uri": "/api/relay/rest/queues/aae131db-214c-46f5-88b6-92004f8467cf",
9 "date_created": "2024-01-15T09:30:00Z",
10 "date_updated": "2024-01-15T09:30:00Z"
11}

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 queue = await client.queues.get("queue-id");
10console.log(queue.name, queue["current_size"]);