Ana içeriğe geç

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​

ParameterTypeRequiredDescription
projectNamestringYesProject name
roleNamestringYesName of the role in the project

Response​

200 OK with the role. An unknown name answers 404 resourceNotFound.

FieldTypeDescription
namestringName of the role
oauthScopestringOAuth 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 + VIEW permission in the project
  • A project outside the scope of the caller answers 404 resourceNotFound, never 403
  • The admin project is served: a call on /apiops/projects/admin/consumer-roles addresses the roles of the admin project