List

View as Markdown

Use this endpoint for the Queues method to read all of the queues that are associated with your account. This will be returned as a list of queues.

Path parameters

AccountSidstringRequiredformat: "uuid"
The unique identifier for the account this Queue is associated with.

Query parameters

PageintegerOptional>=0Defaults to 0
The page number to retrieve (zero-indexed).
PageSizeintegerOptional1-1000Defaults to 50
The number of results per page. Default is 50, maximum is 1000.
PageTokenstringOptional
Token for cursor-based pagination. Required when navigating to pages beyond the first.

Response

uristringRequired
The URI of the current page.
first_page_uristringRequired
The URI of the first page.
next_page_uristring or nullRequired
The URI of the next page. Null if there are no more pages.
previous_page_uristring or nullRequired
The URI of the previous page. Null if this is the first page.
pageintegerRequired
The current page number (zero-indexed).
page_sizeintegerRequired
The number of items per page.
queueslist of objectsRequired
List of queues.
Response
1{
2 "uri": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/Queues?Page=0&PageSize=50",
3 "first_page_uri": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/Queues",
4 "next_page_uri": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/Queues?Page=1&PageSize=50&PageToken=PAb3877c40-da60-4998-90ad-b792e98472qu",
5 "previous_page_uri": "string",
6 "page": 0,
7 "page_size": 50,
8 "queues": [
9 {
10 "sid": "b3877c40-da60-4998-90ad-b792e98472qu",
11 "account_sid": "b3877c40-da60-4998-90ad-b792e98472af",
12 "friendly_name": "Queue1",
13 "max_size": 100,
14 "current_size": 0,
15 "average_wait_time": 0,
16 "date_created": "Wed, 26 Sep 2018 18:00:00 +0000",
17 "date_updated": "Thu, 27 Sep 2018 19:00:00 +0000",
18 "api_version": "2010-04-01",
19 "uri": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/Queues/b3877c40-da60-4998-90ad-b792e98472qu.json"
20 }
21 ]
22}

Request examples

1const { RestClient } = require('@signalwire/compatibility-api')
2const client = RestClient('YourProjectID', 'YourAuthToken', { signalwireSpaceUrl: 'example.signalwire.com' })
3
4client.queues.each(queues => console.log(queues.sid));