POST/v1/customers/{external_id}/grants/{grant_id}:revoke
Revoke a grant
Revokes a grant the customer holds, identified by grantId, with an optional reason. Optionally guarded by expectedRevision. Needs customers:write.
curl -X POST 'https://api.entitler.co/v1/customers/ada/grants/<grant_id>:revoke' \
-H "Authorization: Bearer $ENTITLER_KEY" \
-H "Content-Type: application/json" \
-d '{"expectedRevision":{"value":1},"reason":"reason","target":{"environmentId":"environmentId","projectId":"projectId","teamId":"teamId"}}'Credentials
Send any one of these:
- Bearer token
Path parameters
| Name | Type | Description |
|---|---|---|
external_idrequired | string | The customer's external ID, or me for the customer a customer token or identity token names. |
grant_idrequired | string |
Request body
object
expectedRevisioncommon.Revision-Inputvalueintegerat least 0; at most 18446744073709552000
reasonstringtargetProductTargetenvironmentIdstringprojectIdstringteamIdstring
Responses
200The RevokeGrantResponse message.
RevokeGrantResponse
changedbooleanrequiredgrantGrantfeatureKeystringrequiredfromintegerrequiredat least 0; at most 18446744073709552000
grantedBycommon.Actoridstringrequiredtypecommon.ActorTyperequiredOne of
ACTOR_TYPE_UNSPECIFIED,ACTOR_TYPE_USER,ACTOR_TYPE_KEY,ACTOR_TYPE_SYSTEM.
idstringrequiredreasonstringrequiredrevokeReasonstringrevokedAtintegerat least 0; at most 18446744073709552000
revokedBycommon.Actoridstringrequiredtypecommon.ActorTyperequiredOne of
ACTOR_TYPE_UNSPECIFIED,ACTOR_TYPE_USER,ACTOR_TYPE_KEY,ACTOR_TYPE_SYSTEM.
untilintegerat least 0; at most 18446744073709552000
valueGrantValuelimitcommon.Limitcountintegerat least 0; at most 18446744073709552000
unlimitedcommon.Unlimited
onSwitchOn
revisionintegerrequiredat least 0; at most 18446744073709552000
ErrorA refusal, with the HTTP status of its gRPC code.
Error
errorobjectrequiredcodestringrequiredparametersobjectrequiredEach value: string
reasonstringor nullrequired