User

Update a user's roles

POST
Update Organization and Workspace roles for a user.

Path parameters

organizationIdstringRequired
The ID of the Organization to which the user belongs.
userIdstringRequired
The user's ID

Request

This endpoint expects an object.
deploymentRoles
list of objectsOptional

The user’s updated Deployment roles. Requires also specifying an OrganizationRole.

organizationRole
enumOptional
The user's updated Organization role.
Allowed values: ORGANIZATION_OWNERORGANIZATION_BILLING_ADMINORGANIZATION_MEMBER
workspaceRoles
list of objectsOptional

The user’s updated Workspace roles. Requires also specifying an OrganizationRole.

Response

This endpoint returns an object
deploymentRoles
list of objectsOptional
A list of the subject's Deployment roles. Currently only for API tokens.
organizationRole
enumOptional
The subject's Organization role.
Allowed values: ORGANIZATION_OWNERORGANIZATION_BILLING_ADMINORGANIZATION_MEMBER
workspaceRoles
list of objectsOptional
A list of the subject's Workspace roles.
POST
1curl -X POST https://api.astronomer.io/iam/v1beta1/organizations/organizationId/users/userId/roles \
2 -H "Authorization: Bearer <token>" \
3 -H "Content-Type: application/json" \
4 -d '{
5 "deploymentRoles": [
6 {
7 "deploymentId": "clm8t5u4q000008jq4qoc3031",
8 "role": "DEPLOYMENT_ADMIN"
9 }
10 ],
11 "workspaceRoles": [
12 {
13 "role": "WORKSPACE_OWNER",
14 "workspaceId": "clm8t5u4q000008jq4qoc3036"
15 }
16 ]
17}'
Response
1{
2 "deploymentRoles": [
3 {
4 "deploymentId": "clm8t5u4q000008jq4qoc3031",
5 "role": "DEPLOYMENT_ADMIN"
6 }
7 ],
8 "organizationRole": "ORGANIZATION_OWNER",
9 "workspaceRoles": [
10 {
11 "role": "WORKSPACE_OWNER",
12 "workspaceId": "clm8t5u4q000008jq4qoc3036"
13 }
14 ]
15}