Take a permission from a role
/roles/{id}/permissions/{member_id}Removes the permission and returns 204; one the role does not have also returns 204 and changes nothing. With a personal token, taking away a permission you do not hold yourself returns 403 missing_permission, and super admin needs a super admin caller; a service identity is refused only for super admin and super-admin-level permissions. A global role returns 403 forbidden. It has no dry run. Emits role.updated with permissions as the changed field when it changed; sends no email. POST /roles/{id}/permissions undoes it.
Path parameters
The role's id, a whole number from 1 to 2147483647. An unknown role, another organisation's role and a service role return 404.
The permission to take away.
Responses
The role no longer grants the permission.
Authorization failed. error.code is forbidden when the role is global and so read-only, missing_permission when the caller may not grant, take away or delete what the call touches, with the permissions in details, or one of missing_scope, scope_disabled, org_disabled, ip_blocked, user_disabled.
Examples
curl -X DELETE https://your-org-domain/kong/core/api/v2/roles/{id}/permissions/{member_id}\
-H "Authorization: Bearer $HELM_API_KEY"\
-H "Content-Type: application/json"