Organisation Roles

Take a permission from a role

DELETE/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

  • idintegerRequired#

    The role's id, a whole number from 1 to 2147483647. An unknown role, another organisation's role and a service role return 404.

  • member_idintegerRequired#

    The permission to take away.

Responses

204

The role no longer grants the permission.

401

Authentication failed. error.code is one of invalid_token, expired, revoked.

Error
403

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.

Error
404

Resource not found (error.code = not_found).

Error
429

Rate limit exceeded (error.code = rate_limited).

Error

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"