curl --request GET \
--url https://api.astronomer.io/platform/v1beta1/organizations/{organizationId}/environment-objects/{environmentObjectId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.astronomer.io/platform/v1beta1/organizations/{organizationId}/environment-objects/{environmentObjectId}"
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/platform/v1beta1/organizations/{organizationId}/environment-objects/{environmentObjectId}', 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/platform/v1beta1/organizations/{organizationId}/environment-objects/{environmentObjectId}",
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/platform/v1beta1/organizations/{organizationId}/environment-objects/{environmentObjectId}"
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/platform/v1beta1/organizations/{organizationId}/environment-objects/{environmentObjectId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.astronomer.io/platform/v1beta1/organizations/{organizationId}/environment-objects/{environmentObjectId}")
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{
"objectKey": "<string>",
"scopeEntityId": "<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"
},
"excludeLinks": [
{
"scope": "DEPLOYMENT",
"scopeEntityId": "<string>"
}
],
"id": "<string>",
"links": [
{
"scope": "DEPLOYMENT",
"scopeEntityId": "<string>",
"airflowVariableOverrides": {
"value": "<string>"
},
"connectionOverrides": {
"extra": {},
"host": "<string>",
"login": "<string>",
"password": "<string>",
"port": 123,
"schema": "<string>",
"type": "<string>"
},
"metricsExportOverrides": {
"basicToken": "<string>",
"endpoint": "<string>",
"exporterType": "PROMETHEUS",
"headers": {},
"labels": {},
"password": "<string>",
"username": "<string>"
}
}
],
"metricsExport": {
"endpoint": "<string>",
"exporterType": "PROMETHEUS",
"basicToken": "<string>",
"headers": {},
"labels": {},
"password": "<string>",
"username": "<string>"
},
"sourceScopeEntityId": "<string>",
"updatedAt": "<string>",
"updatedBy": {
"id": "clm8qv74h000008mlf08scq7k",
"apiTokenName": "my-token",
"avatarUrl": "https://avatar.url",
"fullName": "Jane Doe",
"subjectType": "USER",
"username": "user1@company.com"
}
}{
"message": "<string>",
"requestId": "<string>",
"statusCode": 500
}{
"message": "<string>",
"requestId": "<string>",
"statusCode": 500
}{
"message": "<string>",
"requestId": "<string>",
"statusCode": 500
}{
"message": "<string>",
"requestId": "<string>",
"statusCode": 500
}{
"message": "<string>",
"requestId": "<string>",
"statusCode": 500
}Get environment object
Retrieve details about an environment object.
curl --request GET \
--url https://api.astronomer.io/platform/v1beta1/organizations/{organizationId}/environment-objects/{environmentObjectId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.astronomer.io/platform/v1beta1/organizations/{organizationId}/environment-objects/{environmentObjectId}"
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/platform/v1beta1/organizations/{organizationId}/environment-objects/{environmentObjectId}', 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/platform/v1beta1/organizations/{organizationId}/environment-objects/{environmentObjectId}",
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/platform/v1beta1/organizations/{organizationId}/environment-objects/{environmentObjectId}"
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/platform/v1beta1/organizations/{organizationId}/environment-objects/{environmentObjectId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.astronomer.io/platform/v1beta1/organizations/{organizationId}/environment-objects/{environmentObjectId}")
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{
"objectKey": "<string>",
"scopeEntityId": "<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"
},
"excludeLinks": [
{
"scope": "DEPLOYMENT",
"scopeEntityId": "<string>"
}
],
"id": "<string>",
"links": [
{
"scope": "DEPLOYMENT",
"scopeEntityId": "<string>",
"airflowVariableOverrides": {
"value": "<string>"
},
"connectionOverrides": {
"extra": {},
"host": "<string>",
"login": "<string>",
"password": "<string>",
"port": 123,
"schema": "<string>",
"type": "<string>"
},
"metricsExportOverrides": {
"basicToken": "<string>",
"endpoint": "<string>",
"exporterType": "PROMETHEUS",
"headers": {},
"labels": {},
"password": "<string>",
"username": "<string>"
}
}
],
"metricsExport": {
"endpoint": "<string>",
"exporterType": "PROMETHEUS",
"basicToken": "<string>",
"headers": {},
"labels": {},
"password": "<string>",
"username": "<string>"
},
"sourceScopeEntityId": "<string>",
"updatedAt": "<string>",
"updatedBy": {
"id": "clm8qv74h000008mlf08scq7k",
"apiTokenName": "my-token",
"avatarUrl": "https://avatar.url",
"fullName": "Jane Doe",
"subjectType": "USER",
"username": "user1@company.com"
}
}{
"message": "<string>",
"requestId": "<string>",
"statusCode": 500
}{
"message": "<string>",
"requestId": "<string>",
"statusCode": 500
}{
"message": "<string>",
"requestId": "<string>",
"statusCode": 500
}{
"message": "<string>",
"requestId": "<string>",
"statusCode": 500
}{
"message": "<string>",
"requestId": "<string>",
"statusCode": 500
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The ID of the Organization to which the environment object belongs.
The environment object's ID.
Response
OK
The key for the environment object
The type of environment object
CONNECTION, AIRFLOW_VARIABLE, METRICS_EXPORT The scope of the environment object
WORKSPACE, DEPLOYMENT The ID of the scope entity where the environment object is created
Show child attributes
Show child attributes
Whether or not to automatically link Deployments to the environment object
Show child attributes
Show child attributes
The time when the environment object was created in UTC, formatted as YYYY-MM-DDTHH:MM:SSZ
Show child attributes
Show child attributes
The excluded links for the environment object
Show child attributes
Show child attributes
The ID of the environment object
The Deployments linked to the environment object
Show child attributes
Show child attributes
Show child attributes
Show child attributes
The source scope of the environment object, if it is resolved from a link
WORKSPACE, DEPLOYMENT The source scope entity ID of the environment object, if it is resolved from a link
The time when the environment object was updated in UTC, formatted as YYYY-MM-DDTHH:MM:SSZ
Show child attributes
Show child attributes
Was this page helpful?