Chilkat Online Tools

delphiAx / Plivo REST API / Retrieve a recording

Back to Collection Items

var
http: TChilkatHttp;
success: Integer;
sbResponseBody: TChilkatStringBuilder;

begin
// This example assumes the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.

http := TChilkatHttp.Create(Self);

http.BasicAuth := 1;
http.Login := '{{auth_id}}';
http.Password := 'password';

sbResponseBody := TChilkatStringBuilder.Create(Self);
success := http.QuickGetSb('https://api.plivo.com/v1/Account/<auth_id>/Recording/{recording_id}/',sbResponseBody.ControlInterface);
if (success = 0) then
  begin
    Memo1.Lines.Add(http.LastErrorText);
    Exit;
  end;

Memo1.Lines.Add('Response status code = ' + IntToStr(http.LastStatus));
Memo1.Lines.Add(sbResponseBody.GetAsString());

Curl Command

curl -X GET
	-u '{{auth_id}}:password'
https://api.plivo.com/v1/Account/<auth_id>/Recording/{recording_id}/

Postman Collection Item JSON

{
  "name": "Retrieve a recording",
  "request": {
    "method": "GET",
    "header": [
    ],
    "url": {
      "raw": "https://api.plivo.com/v1/Account/{{auth_id}}/Recording/{recording_id}/",
      "protocol": "https",
      "host": [
        "api",
        "plivo",
        "com"
      ],
      "path": [
        "v1",
        "Account",
        "{{auth_id}}",
        "Recording",
        "{recording_id}",
        ""
      ]
    },
    "description": "The following API is used to retrieve a specific recording based on the ‘recording_id’.\n\nMore information can be found [here](https://www.plivo.com/docs/voice/api/recording#retrieve-a-recording)"
  },
  "response": [
    {
      "name": "Retrieve a recording",
      "originalRequest": {
        "method": "GET",
        "header": [
        ],
        "url": {
          "raw": "https://api.plivo.com/v1/Account/{{auth_id}}/Recording/{recording_id}/",
          "protocol": "https",
          "host": [
            "api",
            "plivo",
            "com"
          ],
          "path": [
            "v1",
            "Account",
            "{{auth_id}}",
            "Recording",
            "{recording_id}",
            ""
          ]
        }
      },
      "code": 200,
      "_postman_previewlanguage": "json",
      "header": [
      ],
      "cookie": [
      ],
      "body": "{\n    \"add_time\": \"2014-08-05 16:15:15.852059+05:30\",\n    \"api_id\": \"7abf0744-1ca0-11e4-a2d1-22000ac5040c\",\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-11e4-a664-0026b945b52x\",\n    \"recording_start_ms\": \"1407235163907.00000\",\n    \"recording_type\": \"conference\",\n    \"recording_url\": \"http://s3.amazonaws.com/recordings_2013/c2186400-1c8c-11e4-a664-0026b945b52x.mp3\",\n    \"resource_uri\": \"/v1/Account/MAXXXXXXXXXXXXXXXXXX/Recording/c2186400-1c8c-11e4-a664-0026b945b52x/\"\n}"
    }
  ]
}