Skip to main content

Set users and groups to roles in the current project

PUT 

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

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

Request

Path Parameters

    projectId stringrequired

Bodyrequired

projectAccessConfigurationSchema

    roles object[]required

    A list of roles that are available within this project.

  • Array [
  • idinteger

    The id of the role.

    Possible values: >= 1

    Example: 1
    groupsinteger[]

    A list of group ids that will be assigned this role

    Example: [1,2,3]
    usersinteger[]

    A list of user ids that will be assigned this role

    Example: [1,2,3]
  • ]

Responses

This response has no body.

Authorization: Authorization

name: Authorizationtype: apiKeyin: headerdescription: API key needed to access this API
curl -L -X PUT '<your-unleash-url>/api/admin/projects/:projectId/access' \
-H 'Content-Type: application/json' \
-H 'Authorization: <Authorization>' \
-d '{
"roles": [
{
"id": 1,
"groups": [
1,
2,
3
],
"users": [
1,
2,
3
]
}
]
}'
Request Collapse all
Base URL
<your-unleash-url>
Auth
Parameters
— pathrequired
Body required
{
  "roles": [
    {
      "id": 1,
      "groups": [
        1,
        2,
        3
      ],
      "users": [
        1,
        2,
        3
      ]
    }
  ]
}
ResponseClear

Click the Send API Request button above and see the response here!