.NET Core C# / Plivo REST API / List all incoming carriers
Back to Collection Items
// This example assumes the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.
Chilkat.Http http = new Chilkat.Http();
bool success;
http.BasicAuth = true;
http.Login = "{{auth_id}}";
http.Password = "password";
Chilkat.JsonObject queryParams = new Chilkat.JsonObject();
queryParams.UpdateInt("limit",5);
queryParams.UpdateInt("offset",0);
Chilkat.HttpResponse resp = http.QuickRequestParams("GET","https://api.plivo.com/v1/Account/<auth_id>/IncomingCarrier/",queryParams);
if (http.LastMethodSuccess == false) {
Debug.WriteLine(http.LastErrorText);
return;
}
Debug.WriteLine(Convert.ToString(resp.StatusCode));
Debug.WriteLine(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": [
]
}