Consumer Roles API
Overview
A consumer role is a name that you assign to consumers and applications and that you use in the authorization settings of API proxies. Roles are under /apiops/projects/{projectName}/consumer-roles. The names of this API are the names that roleNameList of a consumer takes and that roleNames of a consumer returns. See the Consumers API.
A role name must be unique across the project and the admin project. The comparison ignores case. A name that another role holds answers 409 duplicateName.
A role name in the roleNameList of a consumer resolves in the project of the consumer first, then in the admin project.
Endpoints
| Operation | Method | Endpoint | Description |
|---|---|---|---|
| List | GET | /consumer-roles | List the roles of the project |
| Get | GET | /consumer-roles/{roleName} | Read one role |
| Create | POST | /consumer-roles | Create a role |
| Update | PUT | /consumer-roles/{roleName} | Update or rename a role |
| Delete | DELETE | /consumer-roles/{roleName} | Delete a role |
Permissions
| Operation | Required Permission |
|---|---|
| List, Get | IDENTITY + VIEW |
| Create, Update, Delete | IDENTITY + MANAGE |
A project outside the scope of the caller answers 404 resourceNotFound. The admin project is served too: /apiops/projects/admin/consumer-roles manages the roles of the admin project.