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 = "username";
http.Password = "password";
Chilkat.HttpResponse resp = http.QuickRequest("DELETE","https://domain.com/v2/apps/{{appId}}/integrations/:integrationId/keys/:keyId");
if (http.LastMethodSuccess == false) {
Debug.WriteLine(http.LastErrorText);
return;
}
Chilkat.StringBuilder sbResponseBody = new Chilkat.StringBuilder();
resp.GetBodySb(sbResponseBody);
Chilkat.JsonObject jResp = new Chilkat.JsonObject();
jResp.LoadSb(sbResponseBody);
jResp.EmitCompact = false;
Debug.WriteLine("Response Body:");
Debug.WriteLine(jResp.Emit());
int respStatusCode = resp.StatusCode;
Debug.WriteLine("Response Status Code = " + Convert.ToString(respStatusCode));
if (respStatusCode >= 400) {
Debug.WriteLine("Response Header:");
Debug.WriteLine(resp.Header);
Debug.WriteLine("Failed.");
return;
}
Curl Command
curl -X DELETE
-u 'username:password'
https://domain.com/v2/apps/{{appId}}/integrations/:integrationId/keys/:keyId
Postman Collection Item JSON
{
"name": "Delete Integration Key",
"_postman_id": "a51c6659-253e-45c6-ab07-4a8dd858279b",
"request": {
"method": "DELETE",
"header": [
],
"url": {
"raw": "{{url}}/v2/apps/{{appId}}/integrations/:integrationId/keys/:keyId",
"host": [
"{{url}}"
],
"path": [
"v2",
"apps",
"{{appId}}",
"integrations",
":integrationId",
"keys",
":keyId"
],
"variable": [
{
"key": "integrationId"
},
{
"key": "keyId"
}
]
},
"description": "Removes an API key."
},
"response": [
{
"id": "5ebb0fd6-6e02-4970-80d0-6ca5ca13e34f",
"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/keys/:keyId",
"host": [
"{{baseUrl}}"
],
"path": [
"v2",
"apps",
":appId",
"integrations",
":integrationId",
"keys",
":keyId"
],
"variable": [
{
"key": "appId"
},
{
"key": "integrationId"
},
{
"key": "keyId"
}
]
}
},
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"cookie": [
],
"body": "{}"
}
]
}