Delete Consumer
Endpoint
DELETE /apiops/projects/{projectName}/consumers/{consumerKey}
Authentication
Requires a Personal API Access Token.
Authorization: Bearer YOUR_TOKEN
Request
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| projectName | string | Yes | Project name |
| consumerKey | string | Yes | Consumer key, assigned by the installation. Returned as consumerKey by every consumer response |
Response
200 OK as a write response. result is the consumer as it was before the delete. runtimeDeployment reports the undeploy.
Errors
| Status | Error key | Cause |
|---|---|---|
| 400 | malformedRequest | A live identity source manages the consumer (params.reason = ldapManaged) |
| 404 | resourceNotFound | The consumer key is unknown |
| 409 | dependencyConflict | The consumer still owns API clients, or another dependency blocks the delete. params.reason names the blocker |
| 409 | lifecycleConflict | Another delete holds the barrier (params.reason = deleteInProgress) |
cURL Example
curl -X DELETE \
"https://demo.apinizer.com/apiops/projects/MyProject/consumers/CONSUMER_KEY" \
-H "Authorization: Bearer YOUR_TOKEN"
Permissions
- User must have
IDENTITY+MANAGEpermission in the project - A project outside the scope of the caller answers
404 resourceNotFound, never403 - The admin project has no consumers: a call on it answers
400 malformedRequest(params.reason=platformScopeNotSupported)