Skip to main content
GET
/
organizations
/
{organizationId}
/
roles
List roles
curl --request GET \
  --url https://api.astronomer.io/platform/v1beta1/organizations/{organizationId}/roles \
  --header 'Authorization: Bearer <token>'
{
  "limit": 1,
  "offset": 1,
  "roles": [
    {
      "createdAt": "2022-11-22T04:37:12Z",
      "createdBy": {
        "id": "clm8qv74h000008mlf08scq7k",
        "apiTokenName": "my-token",
        "avatarUrl": "https://avatar.url",
        "fullName": "Jane Doe",
        "subjectType": "USER",
        "username": "user1@company.com"
      },
      "id": "cluc9tapx000901qn2xrgqdmn",
      "name": "Deployment_Viewer",
      "restrictedWorkspaceIds": [
        "cldbvzoi20182g8odxt8ehi5i"
      ],
      "scopeType": "DEPLOYMENT",
      "updatedAt": "2022-11-22T04:37:12Z",
      "updatedBy": {
        "id": "clm8qv74h000008mlf08scq7k",
        "apiTokenName": "my-token",
        "avatarUrl": "https://avatar.url",
        "fullName": "Jane Doe",
        "subjectType": "USER",
        "username": "user1@company.com"
      },
      "description": "Subject can only view deployments."
    }
  ],
  "totalCount": 1,
  "defaultRoles": [
    {
      "name": "Deployment_Viewer",
      "permissions": [
        "deployment.get"
      ],
      "scopeType": "DEPLOYMENT",
      "description": "Subject can only view deployments."
    }
  ]
}

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 Organization's ID.

Query Parameters

includeDefaultRoles
boolean

Whether to include default Astro roles in the returned list.

scopeTypes
enum<string>[]

Filter the list of roles based on the scope of each role.

Available options:
DEPLOYMENT,
WORKSPACE,
ORGANIZATION,
DAG
offset
integer
default:0

Offset for pagination.

Required range: x >= 0
limit
integer
default:20

Limit for pagination.

Required range: x >= 0
sorts
enum<string>[]

Sorting criteria, each criterion should conform to format 'fieldName:asc' or 'fieldName:desc'.

Available options:
name:asc,
name:desc,
scopeType:asc,
scopeType:desc,
description:asc,
description:desc,
createdAt:asc,
createdAt:desc,
updatedAt:asc,
updatedAt:desc

Response

OK

limit
integer
required

The number of custom roles returned.

Example:

1

offset
integer
required

The offset of the custom roles.

Example:

1

roles
object[]
required

The list of custom roles.

totalCount
integer
required

The total number of custom roles.

Example:

1

defaultRoles
object[]

The list of default roles.