List All Queues
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.
Parameters
Parameter | Description |
---|---|
FriendlyName Required | Returns queues that exactly match the provided friendly name. |
MaxSize Optional | Returns queues that have the provided maximum size. |
Request
- cURL
- Node.js
- C#
- Python
- Ruby
curl https://example.signalwire.com/api/laml/2010-04-01/Accounts/{AccountSid}/Queues.json \
-X GET \
-u "YourProjectID:YourAuthToken"
const { RestClient } = require('@signalwire/compatibility-api')
const client = RestClient('YourProjectID', 'YourAuthToken', { signalwireSpaceUrl: 'example.signalwire.com' })
client.queues.each(queues => console.log(queues.sid));
using System;
using System.Collections.Generic;
using Twilio;
using Twilio.Rest.Api.V2010.Account.Queue;
class Program
{
static void Main(string[] args)
{
TwilioClient.Init("YourProjectID", "YourAuthToken", new Dictionary<string, object> { ["signalwireSpaceUrl"] = "{SPACE}.signalwire.com" });
var queues = QueueResource.Read();
foreach(var record in queues)
{
Console.WriteLine(record.Sid);
}
}
}
from signalwire.rest import Client as signalwire_client
client = signalwire_client("YourProjectID", "YourAuthToken", signalwire_space_url = 'example.signalwire.com')
queues = client.queues.list()
for record in queues:
print(record.sid)
require 'signalwire/sdk'
@client = Signalwire::REST::Client.new 'YourProjectID', 'YourAuthToken', signalwire_space_url: "example.signalwire.com"
queues = @client.queues.list
queues.each do |record|
puts record.sid
end
Responses
200 OK
{
"end": 0,
"first_page_uri": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472ac/Queues.json?PageSize=1&Page=0",
"last_page_uri": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472ac/Queues.json?PageSize=1&Page=12857",
"next_page_uri": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472ac/Queues.json?PageSize=1&Page=1",
"num_pages": 12858,
"page": 0,
"page_size": 1,
"previous_page_uri": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472ac/Queues.json?PageSize=1&Page=0",
"queues": [
{
"account_sid": "b3877c40-da60-4998-90ad-b792e98472ac",
"average_wait_time": 0,
"current_size": 0,
"date_created": "Tue, 04 Aug 2018 18:39:09 +0000",
"date_updated": "Tue, 04 Aug 2018 18:39:19 +0000",
"friendly_name": "Queue2",
"max_size": 100,
"sid": "b3877c40-da60-4998-90ad-b792e98472qu",
"uri": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472ac/Queues/b3877c40-da60-4998-90ad-b792e98472qu.json"
}
],
"start": 0,
"total": 12858,
"uri": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472ac/Queues.json?PageSize=1&Page=0",
"account_sid": "b3877c40-da60-4998-90ad-b792e98472ac"
}