delphiAx / Plivo REST API / List all incoming carriers
Back to Collection Items
var
http: TChilkatHttp;
success: Integer;
queryParams: TChilkatJsonObject;
resp: IChilkatHttpResponse;
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';
queryParams := TChilkatJsonObject.Create(Self);
queryParams.UpdateInt('limit',5);
queryParams.UpdateInt('offset',0);
resp := http.QuickRequestParams('GET','https://api.plivo.com/v1/Account/<auth_id>/IncomingCarrier/',queryParams.ControlInterface);
if (http.LastMethodSuccess = 0) then
begin
Memo1.Lines.Add(http.LastErrorText);
Exit;
end;
Memo1.Lines.Add(IntToStr(resp.StatusCode));
Memo1.Lines.Add(resp.BodyStr);
Curl Command
curl -G -d "limit=5"
-d "offset=0"
-u '{{auth_id}}:password'
https://api.plivo.com/v1/Account/<auth_id>/IncomingCarrier/
Postman Collection Item JSON
{
"name": "List all incoming carriers",
"request": {
"method": "GET",
"header": [
],
"url": {
"raw": "https://api.plivo.com/v1/Account/{{auth_id}}/IncomingCarrier/?limit=5&offset=0",
"protocol": "https",
"host": [
"api",
"plivo",
"com"
],
"path": [
"v1",
"Account",
"{{auth_id}}",
"IncomingCarrier",
""
],
"query": [
{
"key": "name",
"value": "carrier_name",
"description": "Allows filtering by name",
"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."
}
]
}
},
"response": [
]
}