Latest Legacy

Retrieve all queued calls

This method lets you retrieve details of all queued calls. The maximum number of results that can be fetched with a single API call is 20.

API Endpoint

GET https://api.plivo.com/v1/Account/{auth_id}/Call/?status=queued

Arguments

No extra arguments need to be passed.

Returns

Returns the call objects that match the filters specified in the request.

Response

HTTP Status Code: 200

{
  "api_id": "c9527676-5839-11e1-86da-6ff39efcb949",
  "calls": [
    "eac94337-b1cd-499b-82d1-b39bca50dc31",
    "0a70a7fb-168e-4944-a846-4f3f4d2f96f1"
  ]
}

Example Request

1
2
3
4
5
6
7
import plivo

client = plivo.RestClient('<auth_id>','<auth_token>')


response = client.queued_calls.list_ids()
print(response)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#
# Example for Retrieve all Queued Calls
#
require 'rubygems'
require 'plivo'

include Plivo
include Plivo::Exceptions

api = RestClient.new("<auth_id>","<auth_token>")

begin
		response = api.calls.list_queued()
		  puts response
rescue PlivoRESTError => e
		  puts 'Exception: ' + e.message
end
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// Example for Retrieve all Queued Calls

var plivo = require('plivo');

(function main() {
  		'use strict';

		// As the auth_id and auth_token are unspecified, Plivo will fetch them from the PLIVO_AUTH_ID and PLIVO_AUTH_TOKEN environment variables.
			var client = new plivo.Client("<auth_id>","<auth_token>");
			client.calls.listQueuedCalls(
  		).then(function (response) {
 			   console.log(response);
  		}, function (err) {
 		   	console.error(err);
		 	});
})();
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<?php
/**
 * Example for Retrive all Queued Calls
 */
require 'vendor/autoload.php';
use Plivo\RestClient;
use Plivo\Exceptions\PlivoRestException;
$client = new RestClient("<auth_id>","<auth_token>");
try {
			$response = $client->calls->listQueued();
			print_r($response);
}
catch (PlivoRestException $ex) {
			print_r($ex);
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
package com.plivo.api.samples.livecall;

import java.io.IOException;
import com.plivo.api.Plivo;
import com.plivo.api.exceptions.PlivoRestException;
import com.plivo.api.models.call.QueuedCall;
import com.plivo.api.models.call.QueuedCallListResponse;

/**
 * Example for QueuedCall list
	*/
class QueuedCallList {
			public static void main(String [] args) {
    				Plivo.init("<auth_id>","<auth_token>");
    				try {
        				QueuedCallListResponse response = QueuedCall.listGetter()
                				.get();

        				System.out.println(response);
    				} catch (PlivoRestException | IOException e) {
        				e.printStackTrace();
    				}
			}
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/**
 * Example for Retrieve all Queued Calls
 */
using System;
using System.Collections.Generic;
using Plivo;
using Plivo.Exception;

namespace PlivoExamples
{
			internal class Program
			{
   			public static void Main(string[] args)
   			{
       		var api = new PlivoApi("<auth_id>","<auth_token>");
       		try
       		{
           			var response = api.Call.ListQueued();
           			Console.WriteLine(response);
       		}
       		catch (PlivoRestException e)
       		{
           			Console.WriteLine("Exception: " + e.Message);
       		}
   			}
			}
}
1
2
curl -i --user AUTH_ID:AUTH_TOKEN \
    https://api.plivo.com/v1/Account/{auth_id}/Call/?status=queued/
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// Example for Retrieve all Queued Calls
package main

import (
	"fmt"

	"github.com/plivo/plivo-go/v7"
)

func main() {
	client, err := plivo.NewClient("<auth_id>", "<auth_token>", &plivo.ClientOptions{})
	if err != nil {
		panic(err)
	}
	response, err := client.QueuedCalls.IDList()
	if err != nil {
		panic(err)
	}
	fmt.Printf("Response: %#v\n", response)
}