curl --request GET \
--url https://api.astronomer.io/v1/organizations/{organizationId}/teams \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.astronomer.io/v1/organizations/{organizationId}/teams"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.astronomer.io/v1/organizations/{organizationId}/teams', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.astronomer.io/v1/organizations/{organizationId}/teams",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.astronomer.io/v1/organizations/{organizationId}/teams"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.astronomer.io/v1/organizations/{organizationId}/teams")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.astronomer.io/v1/organizations/{organizationId}/teams")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"limit": 10,
"offset": 0,
"teams": [
{
"createdAt": "2022-11-22T04:37:12Z",
"id": "clma5ftgk000008mhgev00k7d",
"isIdpManaged": false,
"name": "My Team",
"organizationId": "clma5g8q6000108mh88g27k1y",
"organizationRole": "ORGANIZATION_MEMBER",
"updatedAt": "2022-11-22T04:37:12Z",
"createdBy": {
"id": "clm8qv74h000008mlf08scq7k",
"apiTokenName": "my-token",
"avatarUrl": "https://avatar.url",
"fullName": "Jane Doe",
"subjectType": "USER",
"username": "user1@company.com"
},
"dagRoles": [
{
"deploymentId": "clm8t5u4q000008jq4qoc3031",
"role": "DAG_VIEWER",
"dagId": "my_dag",
"dagTag": "team-a"
}
],
"deploymentRoles": [
{
"deploymentId": "clm8t5u4q000008jq4qoc3031",
"role": "DEPLOYMENT_ADMIN"
}
],
"description": "My Team description",
"rolesCount": 1,
"updatedBy": {
"id": "clm8qv74h000008mlf08scq7k",
"apiTokenName": "my-token",
"avatarUrl": "https://avatar.url",
"fullName": "Jane Doe",
"subjectType": "USER",
"username": "user1@company.com"
},
"workspaceRoles": [
{
"role": "WORKSPACE_MEMBER",
"workspaceId": "clm8t5u4q000008jq4qoc3036"
}
]
}
],
"totalCount": 100
}{
"message": "<string>",
"requestId": "<string>",
"statusCode": 500,
"fieldErrors": [
{
"code": "<string>",
"field": "<string>",
"message": "<string>"
}
]
}{
"message": "<string>",
"requestId": "<string>",
"statusCode": 500,
"fieldErrors": [
{
"code": "<string>",
"field": "<string>",
"message": "<string>"
}
]
}{
"message": "<string>",
"requestId": "<string>",
"statusCode": 500,
"fieldErrors": [
{
"code": "<string>",
"field": "<string>",
"message": "<string>"
}
]
}{
"message": "<string>",
"requestId": "<string>",
"statusCode": 500,
"fieldErrors": [
{
"code": "<string>",
"field": "<string>",
"message": "<string>"
}
]
}{
"message": "<string>",
"requestId": "<string>",
"statusCode": 500,
"fieldErrors": [
{
"code": "<string>",
"field": "<string>",
"message": "<string>"
}
]
}List Teams
List all Teams in an Organization. Optionally filter by Workspace or Deployment membership.
curl --request GET \
--url https://api.astronomer.io/v1/organizations/{organizationId}/teams \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.astronomer.io/v1/organizations/{organizationId}/teams"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.astronomer.io/v1/organizations/{organizationId}/teams', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.astronomer.io/v1/organizations/{organizationId}/teams",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.astronomer.io/v1/organizations/{organizationId}/teams"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.astronomer.io/v1/organizations/{organizationId}/teams")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.astronomer.io/v1/organizations/{organizationId}/teams")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"limit": 10,
"offset": 0,
"teams": [
{
"createdAt": "2022-11-22T04:37:12Z",
"id": "clma5ftgk000008mhgev00k7d",
"isIdpManaged": false,
"name": "My Team",
"organizationId": "clma5g8q6000108mh88g27k1y",
"organizationRole": "ORGANIZATION_MEMBER",
"updatedAt": "2022-11-22T04:37:12Z",
"createdBy": {
"id": "clm8qv74h000008mlf08scq7k",
"apiTokenName": "my-token",
"avatarUrl": "https://avatar.url",
"fullName": "Jane Doe",
"subjectType": "USER",
"username": "user1@company.com"
},
"dagRoles": [
{
"deploymentId": "clm8t5u4q000008jq4qoc3031",
"role": "DAG_VIEWER",
"dagId": "my_dag",
"dagTag": "team-a"
}
],
"deploymentRoles": [
{
"deploymentId": "clm8t5u4q000008jq4qoc3031",
"role": "DEPLOYMENT_ADMIN"
}
],
"description": "My Team description",
"rolesCount": 1,
"updatedBy": {
"id": "clm8qv74h000008mlf08scq7k",
"apiTokenName": "my-token",
"avatarUrl": "https://avatar.url",
"fullName": "Jane Doe",
"subjectType": "USER",
"username": "user1@company.com"
},
"workspaceRoles": [
{
"role": "WORKSPACE_MEMBER",
"workspaceId": "clm8t5u4q000008jq4qoc3036"
}
]
}
],
"totalCount": 100
}{
"message": "<string>",
"requestId": "<string>",
"statusCode": 500,
"fieldErrors": [
{
"code": "<string>",
"field": "<string>",
"message": "<string>"
}
]
}{
"message": "<string>",
"requestId": "<string>",
"statusCode": 500,
"fieldErrors": [
{
"code": "<string>",
"field": "<string>",
"message": "<string>"
}
]
}{
"message": "<string>",
"requestId": "<string>",
"statusCode": 500,
"fieldErrors": [
{
"code": "<string>",
"field": "<string>",
"message": "<string>"
}
]
}{
"message": "<string>",
"requestId": "<string>",
"statusCode": 500,
"fieldErrors": [
{
"code": "<string>",
"field": "<string>",
"message": "<string>"
}
]
}{
"message": "<string>",
"requestId": "<string>",
"statusCode": 500,
"fieldErrors": [
{
"code": "<string>",
"field": "<string>",
"message": "<string>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
ID of the Organization to list Teams for.
Query Parameters
A list of names for Teams to filter by. The API returns details only for the specified Teams.
The ID of the Workspace to filter the list of Teams for. When specified, the API returns only Teams with a role in the specified Workspace.
The ID of the Deployment to filter the list of Teams for. When specified, the API returns only Teams with a role in the specified Deployment.
Offset for pagination
x >= 0Limit for pagination
0 <= x <= 1000Sorting criteria, each criterion should conform to format 'fieldName:asc' or 'fieldName:desc'
name:asc, name:desc, description:asc, description:desc, createdAt:asc, createdAt:desc, updatedAt:asc, updatedAt:desc Was this page helpful?