import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: 'My API Key',
});
const queue = await client.queues.retrieve('queue_name');
console.log(queue.data);{
"data": {
"record_type": "queue",
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "support",
"created_at": "2019-01-23T18:10:02.574Z",
"updated_at": "2019-01-23T18:10:02.574Z",
"current_size": 20,
"max_size": 50,
"average_wait_time_secs": 175
}
}Retrieve an existing call queue
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: 'My API Key',
});
const queue = await client.queues.retrieve('queue_name');
console.log(queue.data);{
"data": {
"record_type": "queue",
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "support",
"created_at": "2019-01-23T18:10:02.574Z",
"updated_at": "2019-01-23T18:10:02.574Z",
"current_size": 20,
"max_size": 50,
"average_wait_time_secs": 175
}
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Uniquely identifies the queue by name
Successful response with details about a queue.
Show child attributes
queue "queue"
Uniquely identifies the queue
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
Name of the queue
"support"
ISO 8601 formatted date of when the queue was created
"2019-01-23T18:10:02.574Z"
ISO 8601 formatted date of when the queue was last updated
"2019-01-23T18:10:02.574Z"
The number of calls currently in the queue
20
The maximum number of calls allowed in the queue
50
The average time that the calls currently in the queue have spent waiting, given in seconds.
175
{
"record_type": "queue",
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "support",
"created_at": "2019-01-23T18:10:02.574Z",
"updated_at": "2019-01-23T18:10:02.574Z",
"current_size": 20,
"max_size": 50,
"average_wait_time_secs": 175
}Was this page helpful?