Android / Plivo REST API / List All Recordings
Back to Collection Items
// Important: Don't forget to include the call to System.loadLibrary
// as shown at the bottom of this code sample.
package com.test;
import android.app.Activity;
import com.chilkatsoft.*;
import android.widget.TextView;
import android.os.Bundle;
public class SimpleActivity extends Activity {
private static final String TAG = "Chilkat";
// Called when the activity is first created.
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// This example assumes the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.
CkHttp http = new CkHttp();
boolean success;
http.put_BasicAuth(true);
http.put_Login("{{auth_id}}");
http.put_Password("password");
CkJsonObject queryParams = new CkJsonObject();
queryParams.UpdateInt("limit",5);
queryParams.UpdateInt("offset",0);
CkHttpResponse resp = http.QuickRequestParams("GET","https://api.plivo.com/v1/Account/<auth_id>/Recording/",queryParams);
if (http.get_LastMethodSuccess() == false) {
Log.i(TAG, http.lastErrorText());
return;
}
Log.i(TAG, String.valueOf(resp.get_StatusCode()));
Log.i(TAG, resp.bodyStr());
}
static {
System.loadLibrary("chilkat");
// Note: If the incorrect library name is passed to System.loadLibrary,
// then you will see the following error message at application startup:
//"The application <your-application-name> has stopped unexpectedly. Please try again."
}
}
Curl Command
curl -G -d "limit=5"
-d "offset=0"
-u '{{auth_id}}:password'
https://api.plivo.com/v1/Account/<auth_id>/Recording/
Postman Collection Item JSON
{
"name": "List All Recordings",
"request": {
"method": "GET",
"header": [
],
"url": {
"raw": "https://api.plivo.com/v1/Account/{{auth_id}}/Recording/?limit=5&offset=0",
"protocol": "https",
"host": [
"api",
"plivo",
"com"
],
"path": [
"v1",
"Account",
"{{auth_id}}",
"Recording",
""
],
"query": [
{
"key": "subaccount",
"value": "SAXXXXXXXXXXXXX",
"description": "You can provide the auth_id of the subaccount in case you want to filter only recordings of a given subaccount.",
"disabled": true
},
{
"key": "call_uuid",
"value": "c2c128e2-1c8c-11e4-9bff-1db8a9db0432",
"description": "The call_uuid of the call to filter only recordings associated with a specific call.",
"disabled": true
},
{
"key": "add_time",
"value": "2014-08-05 16:15:15.85",
"description": "Filter recordings based on the time they were added.",
"disabled": true
},
{
"key": "limit",
"value": "5",
"description": "Used to display the number of results per page. The maximum number of results that can be fetched is 20."
},
{
"key": "offset",
"value": "0",
"description": "Denotes the number of value items by which the results should be offset. Eg:- If the result contains a 1000 values and limit is set to 10 and offset is set to 705, then values 706 through 715 are displayed in the results. This parameter is also used for pagination of the results."
}
]
},
"description": "This method lists the recordings that are available in your account.\n\nBelow is the list of arguments that can be passed in this API request, more information can be found [here](https://www.plivo.com/docs/voice/api/recording#list-all-recordings)\n\n| Arguments | Description | Required/Conditional/Optional |\n| :--- | :----: | ---: |\n| subaccount | You can provide the auth_id of the subaccount in case you want to filter only recordings of a given subaccount.| Optional |\n| call_uuid | The call_uuid of the call to filter only recordings associated with a specific call.| Optional |\n| add_time | Filter recordings based on the time they were added.<br />add_time__gt: gt stands for greater than. The format expected is YYYY-MM-DD HH:MM[:ss[.uuuuuu]]. Eg:- To get all recordings that started after 2012-03-21 11:47, use add_time__gt=2012-03-21 11:47<br />add_time__gte: gte stands for greater than or equal. The format expected is YYYY-MM-DD HH:MM[:ss[.uuuuuu]]. Eg:- To get all recordings that started after or exactly at 2012-03-21 11:47[:30], use add_time__gte=2012-03-21 11:47[:30]<br />add_time__lt: lt stands for lesser than. The format expected is YYYY-MM-DD HH:MM[:ss[.uuuuuu]]. Eg:- To get all recordings that started before 2012-03-21 11:47, use add_time__lt=2012-03-21 11:47<br />add_time__lte: lte stands for lesser than or equal. The format expected is YYYY-MM-DD HH:MM[:ss[.uuuuuu]]. Eg:- To get all recordings that started before or exactly at 2012-03-21 11:47[:30], use add_time__lte=2012-03-21 11:47[:30] | Optional |\n| limit | Used to display the number of results per page. The maximum number of results that can be fetched is 20.| Optional |\n| offset | Denotes the number of value items by which the results should be offset. Eg:- If the result contains a 1000 values and limit is set to 10 and offset is set to 705, then values 706 through 715 are displayed in the results. This parameter is also used for pagination of the results.| Optional |"
},
"response": [
{
"name": "List All Recordings",
"originalRequest": {
"method": "GET",
"header": [
],
"url": {
"raw": "https://api.plivo.com/v1/Account/{{auth_id}}/Recording/?limit=5&offset=0",
"protocol": "https",
"host": [
"api",
"plivo",
"com"
],
"path": [
"v1",
"Account",
"{{auth_id}}",
"Recording",
""
],
"query": [
{
"key": "subaccount",
"value": "SAXXXXXXXXXXXXX",
"description": "You can provide the auth_id of the subaccount in case you want to filter only recordings of a given subaccount.",
"disabled": true
},
{
"key": "call_uuid",
"value": "c2c128e2-1c8c-11e4-9bff-1db8a9db0432",
"description": "The call_uuid of the call to filter only recordings associated with a specific call.",
"disabled": true
},
{
"key": "add_time",
"value": "2014-08-05 16:15:15.85",
"description": "Filter recordings based on the time they were added.",
"disabled": true
},
{
"key": "limit",
"value": "5",
"description": "Used to display the number of results per page. The maximum number of results that can be fetched is 20."
},
{
"key": "offset",
"value": "0",
"description": "Denotes the number of value items by which the results should be offset. Eg:- If the result contains a 1000 values and limit is set to 10 and offset is set to 705, then values 706 through 715 are displayed in the results. This parameter is also used for pagination of the results."
}
]
}
},
"code": 200,
"_postman_previewlanguage": "json",
"header": [
],
"cookie": [
],
"body": "{\n \"api_id\": \"ff25223a-1c9f-11e4-80aa-12313f048015\",\n \"meta\": {\n \"limit\": 3,\n \"next\": \"/v1/Account/MAXXXXXXXXXXXXXXXXXX/Recording/?limit=3&offset=3\",\n \"offset\": 0,\n \"previous\": null,\n \"total_count\": 948\n },\n \"objects\": [\n {\n \"add_time\": \"2014-08-05 16:15:15.852059+05:30\",\n \"call_uuid\": \"c2c128e2-1c8c-11e4-9bff-1db8a9db0432\",\n \"conference_name\": \"noname\",\n \"recording_duration_ms\": \"345100.00000\",\n \"recording_end_ms\": \"1407235509007.00000\",\n \"recording_format\": \"mp3\",\n \"recording_id\": \"c2186400-1c8c-1124-a664-0026b945b522\",\n \"recording_start_ms\": \"1407235163907.00000\",\n \"recording_type\": \"conference\",\n \"recording_url\": \"http://s3.amazonaws.com/recordings_2013/c2186400-1c8c-1124-a664-0026b945b522.mp3\",\n \"resource_uri\": \"/v1/Account/MAXXXXXXXXXXXXXXXXXX/Recording/c2186400-1c8c-1124-a664-0026b945b522/\"\n },\n {\n \"add_time\": \"2014-08-05 16:05:21.993853+05:30\",\n \"call_uuid\": \"fc773e88-1c8b-11e4-b25a-0fe7bcc54670\",\n \"conference_name\": \"noname\",\n \"recording_duration_ms\": \"90700.00000\",\n \"recording_end_ms\": \"1407234920253.00000\",\n \"recording_format\": \"mp3\",\n \"recording_id\": \"fc2716b0-1c8b-11e4-bwad-842b2b17453e\",\n \"recording_start_ms\": \"1407234829553.00000\",\n \"recording_type\": \"conference\",\n \"recording_url\": \"http://s3.amazonaws.com/recordings_2013/fc2716b0-1c8b-11e4-bwad-842b2b17453e.mp3\",\n \"resource_uri\": \"/v1/Account/MAXXXXXXXXXXXXXXXXXX/Recording/fc2716b0-1c8b-11e4-bwad-842b2b17453e/\"\n }\n ]\n}"
}
]
}