delphiDll / Plivo REST API / Retrieve a queued call
Back to Collection Items
var
http: HCkHttp;
success: Boolean;
queryParams: HCkJsonObject;
resp: HCkHttpResponse;
begin
// This example assumes the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.
http := CkHttp_Create();
CkHttp_putBasicAuth(http,True);
CkHttp_putLogin(http,'{{auth_id}}');
CkHttp_putPassword(http,'password');
queryParams := CkJsonObject_Create();
CkJsonObject_UpdateString(queryParams,'status','queued');
resp := CkHttp_QuickRequestParams(http,'GET','https://api.plivo.com/v1/Account/<auth_id>/Call/{call_uuid}/',queryParams);
if (CkHttp_getLastMethodSuccess(http) = False) then
begin
Memo1.Lines.Add(CkHttp__lastErrorText(http));
Exit;
end;
Memo1.Lines.Add(IntToStr(CkHttpResponse_getStatusCode(resp)));
Memo1.Lines.Add(CkHttpResponse__bodyStr(resp));
CkHttpResponse_Dispose(resp);
CkHttp_Dispose(http);
CkJsonObject_Dispose(queryParams);
Curl Command
curl -G -d "status=queued"
-u '{{auth_id}}:password'
https://api.plivo.com/v1/Account/<auth_id>/Call/{call_uuid}/
Postman Collection Item JSON
{
"name": "Retrieve a queued call",
"request": {
"method": "GET",
"header": [
],
"url": {
"raw": "https://api.plivo.com/v1/Account/{{auth_id}}/Call/{call_uuid}/?status=queued",
"protocol": "https",
"host": [
"api",
"plivo",
"com"
],
"path": [
"v1",
"Account",
"{{auth_id}}",
"Call",
"{call_uuid}",
""
],
"query": [
{
"key": "status",
"value": "queued"
}
]
},
"description": "This method allows you to retrieve details of a specific queued call. The maximum number of results that can be fetched with a single API call is 20.\n\nMore information can be found [here](https://www.plivo.com/docs/voice/api/call#retrieve-a-queued-call)"
},
"response": [
{
"name": "Retrieve a queued call",
"originalRequest": {
"method": "GET",
"header": [
],
"url": {
"raw": "https://api.plivo.com/v1/Account/{{auth_id}}/Call/{call_uuid}/?status=queued",
"protocol": "https",
"host": [
"api",
"plivo",
"com"
],
"path": [
"v1",
"Account",
"{{auth_id}}",
"Call",
"{call_uuid}",
""
],
"query": [
{
"key": "status",
"value": "queued"
}
]
}
},
"code": 200,
"_postman_previewlanguage": "json",
"header": [
],
"cookie": [
],
"body": "{\n \"direction\": \"outbound\",\n \"from\": \"15856338537\",\n \"call_status\": \"queued\",\n \"api_id\": \"45223222-74f8-11e1-8ea7-12313806be9a\",\n \"to\": \"14154290945\",\n \"caller_name\": \"+15856338537\",\n \"call_uuid\": \"6653422-91b6-4716-9fad-9463daaeeec2\",\n \"request_uuid\": \"6653422-91b6-4716-9fad-9463daaeeec2\"\n}"
}
]
}