Chilkat Online Tools

Xojo / Plivo REST API / Delete an Endpoint

Back to Collection Items

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

Dim http As New Chilkat.Http
Dim success As Boolean

http.BasicAuth = True
http.Login = "{{auth_id}}"
http.Password = "password"

Dim resp As Chilkat.HttpResponse
resp = http.QuickRequest("DELETE","https://api.plivo.com/v1/Account/<auth_id>/Endpoint/{endpoint_id}/")
If (http.LastMethodSuccess = False) Then
    System.DebugLog(http.LastErrorText)
    Return
End If

Dim respStatusCode As Int32
respStatusCode = resp.StatusCode
System.DebugLog("Response Status Code = " + Str(respStatusCode))
If (respStatusCode <> 204) Then
    System.DebugLog("Response Header:")
    System.DebugLog(resp.Header)
    System.DebugLog("Response Body:")
    System.DebugLog(resp.BodyStr)
    System.DebugLog("Failed.")

    Return
End If

System.DebugLog("Success.")

Curl Command

curl -X DELETE
	-u '{{auth_id}}:password'
https://api.plivo.com/v1/Account/<auth_id>/Endpoint/{endpoint_id}/

Postman Collection Item JSON

{
  "name": "Delete an Endpoint",
  "request": {
    "method": "DELETE",
    "header": [
    ],
    "url": {
      "raw": "https://api.plivo.com/v1/Account/{{auth_id}}/Endpoint/{endpoint_id}/",
      "protocol": "https",
      "host": [
        "api",
        "plivo",
        "com"
      ],
      "path": [
        "v1",
        "Account",
        "{{auth_id}}",
        "Endpoint",
        "{endpoint_id}",
        ""
      ]
    },
    "description": "Permanently delete an endpoint.\n\nMore information can be found [here](https://www.plivo.com/docs/voice/api/endpoint#delete-an-endpoint)"
  },
  "response": [
    {
      "name": "Delete an Endpoint",
      "originalRequest": {
        "method": "DELETE",
        "header": [
        ],
        "url": {
          "raw": "https://api.plivo.com/v1/Account/{{auth_id}}/Endpoint/{endpoint_id}/",
          "protocol": "https",
          "host": [
            "api",
            "plivo",
            "com"
          ],
          "path": [
            "v1",
            "Account",
            "{{auth_id}}",
            "Endpoint",
            "{endpoint_id}",
            ""
          ]
        }
      },
      "code": 204,
      "_postman_previewlanguage": "Text",
      "header": [
      ],
      "cookie": [
      ],
      "body": ""
    }
  ]
}