API7 Docs
API7 GatewayAPI7 Enterprise Admin APIsDelete a role

Delete a role

DELETE /api/roles/{role_id}

DELETE /api/roles/{role_id}

Interactive request editor loads with JavaScript.

Authorization

X-API-KEY<token>

In: header

Path Parameters

role_id*string

Role ID.

Length1 <= length

Response Body

application/json

application/json

curl -X DELETE "$API_BASE_URL/api/roles/4b9b56d1-147e-49ef-bcaa-88cc5bcf403f"

Successful operation.

{
  "value": {}
}
Complete operation details and schema variants

DELETE /api/roles/{role_id}

Delete a role

Delete a custom RBAC role from the organization. Review user assignments first to avoid unintended access loss. Required IAM Permission: Action iam:DeleteRole, Resource arn:api7:iam:role/%s

Parameters

  • role_id (path, string, required): Role ID.

Responses

  • 200: Successful operation.
  • value (object, optional): The specific resource.
  • 400: Bad Request — The request was malformed or contained invalid parameters. Check the error_msg field for details.
  • value (object, optional): The specific resource.
  • error_msg (string, optional): The error message.

cURL

curl -X DELETE '$API_BASE_URL/api/roles/{role_id}'