Ana içeriğe geç

Delete Consumer

Endpoint​

DELETE /apiops/projects/{projectName}/consumers/{consumerKey}

Authentication​

Requires a Personal API Access Token.

Authorization: Bearer YOUR_TOKEN

Request​

Path Parameters​

ParameterTypeRequiredDescription
projectNamestringYesProject name
consumerKeystringYesConsumer 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​

StatusError keyCause
400malformedRequestA live identity source manages the consumer (params.reason = ldapManaged)
404resourceNotFoundThe consumer key is unknown
409dependencyConflictThe consumer still owns API clients, or another dependency blocks the delete. params.reason names the blocker
409lifecycleConflictAnother 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 + MANAGE permission in the project
  • A project outside the scope of the caller answers 404 resourceNotFound, never 403
  • The admin project has no consumers: a call on it answers 400 malformedRequest (params.reason = platformScopeNotSupported)