REST ClientQueues

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
{
"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

from signalwire.rest import RestClient
client = RestClient(
project="your-project-id",
token="your-api-token",
host="your-space.signalwire.com",
)
queue = client.queues.get("queue-id")
print(queue["name"], queue.get("current_size"))