Chilkat Online Tools

Powershell / Plivo REST API / List all incoming carriers

Back to Collection Items

Add-Type -Path "C:\chilkat\ChilkatDotNet47-9.5.0-x64\ChilkatDotNet47.dll"

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

$http = New-Object Chilkat.Http

$http.BasicAuth = $true
$http.Login = "{{auth_id}}"
$http.Password = "password"

$queryParams = New-Object Chilkat.JsonObject
$queryParams.UpdateInt("limit",5)
$queryParams.UpdateInt("offset",0)

$resp = $http.QuickRequestParams("GET","https://api.plivo.com/v1/Account/<auth_id>/IncomingCarrier/",$queryParams)
if ($http.LastMethodSuccess -eq $false) {
    $($http.LastErrorText)
    exit
}

$($resp.StatusCode)
$($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": [
  ]
}