Back to Collection Items
func chilkatTest() {
// This example assumes the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.
let http = CkoHttp()!
var success: Bool
// Adds the "Authorization: Bearer {{token}}" header.
http.authToken = "{{token}}"
var resp: CkoHttpResponse? = http.quickRequest("DELETE", url: "https://domain.com/apimanager/api/v1/organizations/{{organization_id}}/environments/{{environment_id}}/apis/{{api_Id}}")
if http.lastMethodSuccess == false {
print("\(http.lastErrorText!)")
return
}
print("\(resp!.statusCode.intValue)")
print("\(resp!.bodyStr!)")
resp = nil
}
Curl Command
curl -X DELETE
-H "Authorization: Bearer {{token}}"
https://domain.com/apimanager/api/v1/organizations/{{organization_id}}/environments/{{environment_id}}/apis/{{api_Id}}
Postman Collection Item JSON
{
"name": "Delete api",
"request": {
"method": "DELETE",
"header": [
{
"key": "Authorization",
"value": "Bearer {{token}}",
"type": "text"
}
],
"url": {
"raw": "{{url}}/apimanager/api/v1/organizations/{{organization_id}}/environments/{{environment_id}}/apis/{{api_Id}}",
"host": [
"{{url}}"
],
"path": [
"apimanager",
"api",
"v1",
"organizations",
"{{organization_id}}",
"environments",
"{{environment_id}}",
"apis",
"{{api_Id}}"
]
}
},
"response": [
]
}