Validate a role
POST<your-unleash-url>/api/admin/roles/validate
Check if the role matches schema and has a unique name
Request
Responses
- 200
- 400
- 401
This response has no body.
The request data does not match what we expect.
Authorization information is missing or invalid. Provide a valid API token as the authorization
header, e.g. authorization:*.*.my-admin-token
.
Authorization: Authorization
name: Authorizationtype: apiKeyin: headerdescription: API key needed to access this API
- curl
- python
- go
- nodejs
- ruby
- csharp
- php
- java
- powershell
- CURL
curl -L '<your-unleash-url>/api/admin/roles/validate' \
-H 'Content-Type: application/json' \
-H 'Authorization: <Authorization>' \
-d '{
"name": "external-contributors",
"description": "Users with external-contributors role have limited access to most features in Unleash",
"type": "root-custom",
"permissions": [
{
"name": "CREATE_PROJECT",
"environment": "development"
}
]
}'
ResponseClear