Skip to main content
POST
/
organizations
/
{organizationId}
/
users
/
{userId}
/
roles
Update a user's roles
curl --request POST \
  --url https://api.astronomer.io/platform/v1beta1/organizations/{organizationId}/users/{userId}/roles \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "dagRoles": [
    {
      "deploymentId": "clm8t5u4q000008jq4qoc3031",
      "role": "DAG_VIEWER",
      "dagId": "my_dag",
      "dagTag": "team-a"
    }
  ],
  "deploymentRoles": [
    {
      "deploymentId": "clm8t5u4q000008jq4qoc3031",
      "role": "DEPLOYMENT_ADMIN"
    }
  ],
  "organizationRole": "ORGANIZATION_OWNER,ORGANIZATION_OBSERVE_ADMIN,ORGANIZATION_OBSERVE_MEMBER,ORGANIZATION_BILLING_ADMIN,ORGANIZATION_MEMBER",
  "workspaceRoles": [
    {
      "role": "WORKSPACE_MEMBER",
      "workspaceId": "clm8t5u4q000008jq4qoc3036"
    }
  ]
}
'
{
  "dagRoles": [
    {
      "deploymentId": "clm8t5u4q000008jq4qoc3031",
      "role": "DAG_VIEWER",
      "dagId": "my_dag",
      "dagTag": "team-a"
    }
  ],
  "deploymentRoles": [
    {
      "deploymentId": "clm8t5u4q000008jq4qoc3031",
      "role": "DEPLOYMENT_ADMIN"
    }
  ],
  "organizationRole": "ORGANIZATION_OWNER,ORGANIZATION_OBSERVE_ADMIN,ORGANIZATION_OBSERVE_MEMBER,ORGANIZATION_BILLING_ADMIN,ORGANIZATION_MEMBER",
  "workspaceRoles": [
    {
      "role": "WORKSPACE_MEMBER",
      "workspaceId": "clm8t5u4q000008jq4qoc3036"
    }
  ]
}

Documentation Index

Fetch the complete documentation index at: https://astronomer-preview.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

organizationId
string
required

The ID of the Organization to which the user belongs.

userId
string
required

The user's ID

Body

application/json

The request body for updating the user's roles

dagRoles
object[]
deploymentRoles
object[]

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

organizationRole
string

The user's updated Organization role.

Example:

"ORGANIZATION_OWNER,ORGANIZATION_OBSERVE_ADMIN,ORGANIZATION_OBSERVE_MEMBER,ORGANIZATION_BILLING_ADMIN,ORGANIZATION_MEMBER"

workspaceRoles
object[]

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

Response

The response body containing the user's roles

dagRoles
object[]

A list of the subject's DAG roles.

deploymentRoles
object[]

A list of the subject's Deployment roles. Currently only for API tokens.

organizationRole
string

The subject's Organization role.

Example:

"ORGANIZATION_OWNER,ORGANIZATION_OBSERVE_ADMIN,ORGANIZATION_OBSERVE_MEMBER,ORGANIZATION_BILLING_ADMIN,ORGANIZATION_MEMBER"

workspaceRoles
object[]

A list of the subject's Workspace roles.