List environment objects
List environment objects in a Workspace or Deployment. Environment objects are Airflow connections, Airflow variables, environment variables, and metrics exports. The values of secret fields are hidden by default.
GET
/
organizations
/
{organizationId}
/
environment-objects
List environment objects
curl --request GET \
--url https://api.astronomer.io/v1/organizations/{organizationId}/environment-objects \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.astronomer.io/v1/organizations/{organizationId}/environment-objects"
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}/environment-objects', 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}/environment-objects",
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}/environment-objects"
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}/environment-objects")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.astronomer.io/v1/organizations/{organizationId}/environment-objects")
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{
"environmentObjects": [
{
"objectKey": "<string>",
"objectType": "CONNECTION",
"scope": "WORKSPACE",
"scopeEntityId": "<string>",
"setFields": [
"<string>"
],
"airflowVariable": {
"isSecret": true,
"value": "<string>"
},
"autoLinkDeployments": true,
"connection": {
"type": "<string>",
"connectionAuthType": {
"airflowType": "<string>",
"authMethodName": "<string>",
"description": "<string>",
"id": "<string>",
"name": "<string>",
"parameters": [
{
"airflowParamName": "<string>",
"dataType": "<string>",
"description": "<string>",
"friendlyName": "<string>",
"isInExtra": true,
"isRequired": true,
"isSecret": true,
"example": "<string>",
"pattern": "<string>"
}
],
"providerPackageName": "<string>",
"guidePath": "<string>",
"providerLogo": "<string>"
},
"extra": {},
"host": "<string>",
"login": "<string>",
"password": "<string>",
"port": 123,
"schema": "<string>"
},
"createdAt": "<string>",
"createdBy": {
"id": "clm8qv74h000008mlf08scq7k",
"apiTokenName": "my-token",
"avatarUrl": "https://avatar.url",
"fullName": "Jane Doe",
"subjectType": "USER",
"username": "user1@company.com"
},
"description": "<string>",
"environmentVariable": {
"isSecret": true,
"value": "<string>"
},
"excludeLinks": [
{
"scope": "DEPLOYMENT",
"scopeEntityId": "<string>"
}
],
"id": "<string>",
"links": [
{
"scope": "DEPLOYMENT",
"scopeEntityId": "<string>",
"setFields": [
"<string>"
],
"airflowVariableOverrides": {
"value": "<string>"
},
"connectionOverrides": {
"extra": {},
"host": "<string>",
"login": "<string>",
"password": "<string>",
"port": 123,
"schema": "<string>",
"type": "<string>"
},
"environmentVariableOverrides": {
"value": "<string>"
},
"metricsExportOverrides": {
"authType": "BASIC",
"basicToken": "<string>",
"dataDogApiKey": "<string>",
"dataDogSite": "datadoghq.com",
"endpoint": "<string>",
"exporterType": "PROMETHEUS",
"headers": {},
"labels": {},
"password": "<string>",
"sigV4AssumeArn": "<string>",
"sigV4StsRegion": "<string>",
"username": "<string>"
}
}
],
"metricsExport": {
"endpoint": "<string>",
"exporterType": "PROMETHEUS",
"authType": "BASIC",
"basicToken": "<string>",
"dataDogApiKey": "<string>",
"dataDogSite": "datadoghq.com",
"headers": {},
"labels": {},
"password": "<string>",
"sigV4AssumeArn": "<string>",
"sigV4StsRegion": "<string>",
"username": "<string>"
},
"sourceScope": "WORKSPACE",
"sourceScopeEntityId": "<string>",
"updatedAt": "<string>",
"updatedBy": {
"id": "clm8qv74h000008mlf08scq7k",
"apiTokenName": "my-token",
"avatarUrl": "https://avatar.url",
"fullName": "Jane Doe",
"subjectType": "USER",
"username": "user1@company.com"
}
}
],
"limit": 123,
"offset": 123,
"totalCount": 123
}{
"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
Path Parameters
Query Parameters
A list of field names to sort by, and whether to show results as ascending or descending. Formatted as <fieldName>:asc or <fieldName>:desc.
Available options:
objectType:asc, objectType:desc, objectKey:asc, objectKey:desc, createdAt:asc, createdAt:desc, updatedAt:asc, updatedAt:desc Response
OK
Was this page helpful?
⌘I
List environment objects
curl --request GET \
--url https://api.astronomer.io/v1/organizations/{organizationId}/environment-objects \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.astronomer.io/v1/organizations/{organizationId}/environment-objects"
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}/environment-objects', 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}/environment-objects",
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}/environment-objects"
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}/environment-objects")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.astronomer.io/v1/organizations/{organizationId}/environment-objects")
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{
"environmentObjects": [
{
"objectKey": "<string>",
"objectType": "CONNECTION",
"scope": "WORKSPACE",
"scopeEntityId": "<string>",
"setFields": [
"<string>"
],
"airflowVariable": {
"isSecret": true,
"value": "<string>"
},
"autoLinkDeployments": true,
"connection": {
"type": "<string>",
"connectionAuthType": {
"airflowType": "<string>",
"authMethodName": "<string>",
"description": "<string>",
"id": "<string>",
"name": "<string>",
"parameters": [
{
"airflowParamName": "<string>",
"dataType": "<string>",
"description": "<string>",
"friendlyName": "<string>",
"isInExtra": true,
"isRequired": true,
"isSecret": true,
"example": "<string>",
"pattern": "<string>"
}
],
"providerPackageName": "<string>",
"guidePath": "<string>",
"providerLogo": "<string>"
},
"extra": {},
"host": "<string>",
"login": "<string>",
"password": "<string>",
"port": 123,
"schema": "<string>"
},
"createdAt": "<string>",
"createdBy": {
"id": "clm8qv74h000008mlf08scq7k",
"apiTokenName": "my-token",
"avatarUrl": "https://avatar.url",
"fullName": "Jane Doe",
"subjectType": "USER",
"username": "user1@company.com"
},
"description": "<string>",
"environmentVariable": {
"isSecret": true,
"value": "<string>"
},
"excludeLinks": [
{
"scope": "DEPLOYMENT",
"scopeEntityId": "<string>"
}
],
"id": "<string>",
"links": [
{
"scope": "DEPLOYMENT",
"scopeEntityId": "<string>",
"setFields": [
"<string>"
],
"airflowVariableOverrides": {
"value": "<string>"
},
"connectionOverrides": {
"extra": {},
"host": "<string>",
"login": "<string>",
"password": "<string>",
"port": 123,
"schema": "<string>",
"type": "<string>"
},
"environmentVariableOverrides": {
"value": "<string>"
},
"metricsExportOverrides": {
"authType": "BASIC",
"basicToken": "<string>",
"dataDogApiKey": "<string>",
"dataDogSite": "datadoghq.com",
"endpoint": "<string>",
"exporterType": "PROMETHEUS",
"headers": {},
"labels": {},
"password": "<string>",
"sigV4AssumeArn": "<string>",
"sigV4StsRegion": "<string>",
"username": "<string>"
}
}
],
"metricsExport": {
"endpoint": "<string>",
"exporterType": "PROMETHEUS",
"authType": "BASIC",
"basicToken": "<string>",
"dataDogApiKey": "<string>",
"dataDogSite": "datadoghq.com",
"headers": {},
"labels": {},
"password": "<string>",
"sigV4AssumeArn": "<string>",
"sigV4StsRegion": "<string>",
"username": "<string>"
},
"sourceScope": "WORKSPACE",
"sourceScopeEntityId": "<string>",
"updatedAt": "<string>",
"updatedBy": {
"id": "clm8qv74h000008mlf08scq7k",
"apiTokenName": "my-token",
"avatarUrl": "https://avatar.url",
"fullName": "Jane Doe",
"subjectType": "USER",
"username": "user1@company.com"
}
}
],
"limit": 123,
"offset": 123,
"totalCount": 123
}{
"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>"
}
]
}