Enable Consumer
Endpoint
POST /apiops/projects/{projectName}/consumers/{consumerKey}/actions/enable
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. An unknown value answers 404 resourceNotFound |
The request has no body.
The action is also accepted on a consumer that a live identity source (LDAP, OIDC, database or API sync) manages. Update Consumer refuses such a consumer with 400 malformedRequest (params.reason = ldapManaged).
On such a consumer the enable holds until the source disables the account or the user leaves the sync scope. The next sync run then disables the consumer again.
Response
200 OK.
The response is a write response. result is the consumer. runtimeDeployment.state is IN_SYNC when every environment acknowledged the change, or DEGRADED when the change is stored but at least one environment did not acknowledge it. Do not retry a DEGRADED write; redeploy instead. resourceVersion is not returned.
cURL Example
curl -X POST \
"https://demo.apinizer.com/apiops/projects/MyProject/consumers/CONSUMER_KEY/actions/enable" \
-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)