Skip to main content

Set users and groups to roles in the current project

PUT <your-unleash-url>/api/admin/projects/:projectId/access

Authorization

name: Authorizationtype: apiKeyin: headerdescription: API key needed to access this API

Sets all groups, users and their roles for the given project, overriding any existing configuration.

Request

Path Parameters

  • projectId string required

Body

required

projectAccessConfigurationSchema

  • roles object[]required

    A list of roles that are available within this project.

  • Array [
  • id integer

    Possible values: >= 1

    The id of the role.

  • groups integer[]

    A list of group ids that will be assigned this role

  • users integer[]

    A list of user ids that will be assigned this role

  • ]
Responses

This response has no body.

Authorization

name: Authorizationtype: apiKeyin: headerdescription: API key needed to access this API

Request

Base URL
<your-unleash-url>
Security Scheme
apiKey
projectId — path required
Body required
{
"roles": [
{
"id": 1,
"groups": [
1,
2,
3
],
"users": [
1,
2,
3
]
}
]
}
curl / cURL
curl -L -X PUT '<your-unleash-url>/api/admin/projects/:projectId/access' \
-H 'Content-Type: application/json' \
-H 'Authorization: <API_KEY_VALUE>' \
--data-raw '{
"roles": [
{
"id": 1,
"groups": [
1,
2,
3
],
"users": [
1,
2,
3
]
}
]
}'