Skip to main content
GET
/
organizations
/
{organizationId}
/
users
/
{userId}
/
teams
List teams for a user
curl --request GET \
  --url https://api.astronomer.io/v1/organizations/{organizationId}/users/{userId}/teams \
  --header 'Authorization: Bearer <token>'
{
  "limit": 10,
  "offset": 0,
  "teams": [
    {
      "id": "clma5ftgk000008mhgev00k7d",
      "isIdpManaged": false,
      "name": "My Team",
      "organizationRole": "ORGANIZATION_MEMBER",
      "dagRoles": [
        {
          "deploymentId": "clm8t5u4q000008jq4qoc3031",
          "role": "DAG_VIEWER",
          "dagId": "my_dag",
          "dagTag": "team-a"
        }
      ],
      "deploymentRoles": [
        {
          "deploymentId": "clm8t5u4q000008jq4qoc3031",
          "role": "DEPLOYMENT_ADMIN"
        }
      ],
      "description": "My Team description",
      "rolesCount": 1,
      "workspaceRoles": [
        {
          "role": "WORKSPACE_MEMBER",
          "workspaceId": "clm8t5u4q000008jq4qoc3036"
        }
      ]
    }
  ],
  "totalCount": 100
}

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.

userId
string
required

The user's ID.

Query Parameters

offset
integer
default:0

Offset for pagination

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

Limit for pagination

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

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

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

Response

OK

limit
integer
required

The maximum number of teams in one page.

Example:

10

offset
integer
required

The offset of the current page.

Example:

0

teams
object[]
required

The list of teams the user belongs to in the current page.

totalCount
integer
required

The total number of teams.

Example:

100