List All Queue Members
Use this endpoint for the Queue Members method to read all of the queue members that are waiting in a particular queue. This will be returned as a list of members.
Parameters
Parameter | Description |
---|---|
QueueSid Required | Returns members of a particular queue. |
Request
- cURL
- Node.js
- C#
- Python
- Ruby
curl https://example.signalwire.com/api/laml/2010-04-01/Accounts/{AccountSid}/Queues/{QueueSid}/Members.json \
-X GET \
-u "YourProjectID:YourAuthToken"
const { RestClient } = require('@signalwire/compatibility-api')
const client = RestClient('YourProjectID', 'YourAuthToken', { signalwireSpaceUrl: 'example.signalwire.com' })
client.queues('QueueSid')
.members
.each(members => console.log(members.callSid));
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 members = MemberResource.Read(
pathQueueSid: "QueueSid"
);
foreach(var record in members)
{
Console.WriteLine(record.CallSid);
}
}
}
from signalwire.rest import Client as signalwire_client
client = signalwire_client("YourProjectID", "YourAuthToken", signalwire_space_url = 'example.signalwire.com')
members = client.queues('QueueSid').members.list()
for record in members:
print(record.call_sid)
require 'signalwire/sdk'
@client = Signalwire::REST::Client.new 'YourProjectID', 'YourAuthToken', signalwire_space_url: "example.signalwire.com"
members = @client.queues('QueueSid').members.list
members.each do |record|
puts record.call_sid
end
Responses
200 OK
{
"end": 0,
"first_page_uri": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472ac/Queues/b3877c40-da60-4998-90ad-b792e98472qu/Members.json?Page=0&PageSize=50",
"last_page_uri": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472ac/Queues/b3877c40-da60-4998-90ad-b792e98472qu/Members.json?Page=0&PageSize=50",
"next_page_uri": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472ac/Queues/b3877c40-da60-4998-90ad-b792e98472qu/Members.json?Page=50",
"num_pages": 1,
"page": 0,
"page_size": 50,
"previous_page_uri": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472ac/Queues/b3877c40-da60-4998-90ad-b792e98472qu/Members.json?Page=0&PageSize=50",
"queue_members": [
{
"call_sid": "b3877c40-da60-4998-90ad-b792e98472ca",
"date_enqueued": "Wed, 26 Sept 2018 21:00:00 +0000",
"position": 1,
"uri": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472ac/Queues/b3877c40-da60-4998-90ad-b792e98472qu/Members/b3877c40-da60-4998-90ad-b792e98472ca.json",
"wait_time": 100
}
],
"start": 0,
"total": 1,
"uri": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472ac/Queues/b3877c40-da60-4998-90ad-b792e98472qu/Members.json",
"account_sid": "b3877c40-da60-4998-90ad-b792e98472ac",
"queue_sid": "b3877c40-da60-4998-90ad-b792e98472qu"
}