Get Consumer Role
Endpoint
GET /apiops/projects/{projectName}/consumer-roles/{roleName}
Authentication
Requires a Personal API Access Token.
Authorization: Bearer YOUR_TOKEN
Request
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| projectName | string | Yes | Project name |
| roleName | string | Yes | Name of the role in the project |
Response
200 OK with the role. An unknown name answers 404 resourceNotFound.
| Field | Type | Description |
|---|---|---|
| name | string | Name of the role |
| oauthScope | string | OAuth scope name that the role answers to. Absent when the role has none |
cURL Example
curl -X GET \
"https://demo.apinizer.com/apiops/projects/MyProject/consumer-roles/API_USER" \
-H "Authorization: Bearer YOUR_TOKEN"
Permissions
- User must have
IDENTITY+VIEWpermission in the project - A project outside the scope of the caller answers
404 resourceNotFound, never403 - The admin project is served: a call on
/apiops/projects/admin/consumer-rolesaddresses the roles of the admin project