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 ChilkatHttp
Dim success As Long
http.BasicAuth = 1
http.Login = "username"
http.Password = "password"
Dim resp As ChilkatHttpResponse
Set resp = http.QuickRequest("DELETE","https://domain.com/v2/apps/{{appId}}/integrations/:integrationId")
If (http.LastMethodSuccess = 0) Then
Debug.Print http.LastErrorText
Exit Sub
End If
Dim sbResponseBody As New ChilkatStringBuilder
success = resp.GetBodySb(sbResponseBody)
Dim jResp As New ChilkatJsonObject
success = jResp.LoadSb(sbResponseBody)
jResp.EmitCompact = 0
Debug.Print "Response Body:"
Debug.Print jResp.Emit()
Dim respStatusCode As Long
respStatusCode = resp.StatusCode
Debug.Print "Response Status Code = " & respStatusCode
If (respStatusCode >= 400) Then
Debug.Print "Response Header:"
Debug.Print resp.Header
Debug.Print "Failed."
Exit Sub
End If
Curl Command
curl -X DELETE
-u 'username:password'
https://domain.com/v2/apps/{{appId}}/integrations/:integrationId
Postman Collection Item JSON
{
"name": "Delete Integration",
"_postman_id": "e101a8fc-a7dc-4fd6-b3df-19732f54d269",
"request": {
"method": "DELETE",
"header": [
],
"url": {
"raw": "{{url}}/v2/apps/{{appId}}/integrations/:integrationId",
"host": [
"{{url}}"
],
"path": [
"v2",
"apps",
"{{appId}}",
"integrations",
":integrationId"
],
"variable": [
{
"key": "integrationId"
}
]
},
"description": "Delete the specified integration."
},
"response": [
{
"id": "634fab2f-bf7e-4175-8122-c9ecbec020f3",
"name": "Ok",
"originalRequest": {
"method": "DELETE",
"header": [
{
"description": {
"content": "Added as a part of security scheme: bearer",
"type": "text/plain"
},
"key": "Authorization",
"value": "Bearer <token>"
}
],
"url": {
"raw": "{{baseUrl}}/v2/apps/:appId/integrations/:integrationId",
"host": [
"{{baseUrl}}"
],
"path": [
"v2",
"apps",
":appId",
"integrations",
":integrationId"
],
"variable": [
{
"key": "appId"
},
{
"key": "integrationId"
}
]
}
},
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"cookie": [
],
"body": "{}"
},
{
"id": "d9ad7f5b-adb0-41d6-b0ee-707ac94e93c8",
"name": "Integration not found",
"originalRequest": {
"method": "DELETE",
"header": [
{
"description": {
"content": "Added as a part of security scheme: bearer",
"type": "text/plain"
},
"key": "Authorization",
"value": "Bearer <token>"
}
],
"url": {
"raw": "{{baseUrl}}/v2/apps/:appId/integrations/:integrationId",
"host": [
"{{baseUrl}}"
],
"path": [
"v2",
"apps",
":appId",
"integrations",
":integrationId"
],
"variable": [
{
"key": "appId"
},
{
"key": "integrationId"
}
]
}
},
"status": "Not Found",
"code": 404,
"_postman_previewlanguage": "text",
"header": [
{
"key": "Content-Type",
"value": "text/plain"
}
],
"cookie": [
],
"body": ""
}
]
}