Skip to main content
POST
/
organizations
/
{organizationId}
/
environment-objects
/
{environmentObjectId}
Update an environment object
curl --request POST \
  --url https://api.astronomer.io/platform/v1beta1/organizations/{organizationId}/environment-objects/{environmentObjectId} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "airflowVariable": {
    "value": "<string>"
  },
  "autoLinkDeployments": true,
  "excludeLinks": [
    {
      "scope": "DEPLOYMENT",
      "scopeEntityId": "<string>"
    }
  ],
  "links": [
    {
      "scope": "DEPLOYMENT",
      "scopeEntityId": "<string>",
      "overrides": {
        "airflowVariable": {
          "value": "<string>"
        },
        "connection": {
          "extra": {},
          "host": "<string>",
          "login": "<string>",
          "password": "<string>",
          "port": 123,
          "schema": "<string>",
          "type": "<string>"
        },
        "metricsExport": {
          "authType": "BASIC",
          "basicToken": "<string>",
          "endpoint": "<string>",
          "exporterType": "PROMETHEUS",
          "headers": {},
          "labels": {},
          "password": "<string>",
          "username": "<string>"
        }
      }
    }
  ],
  "metricsExport": {
    "authType": "BASIC",
    "basicToken": "<string>",
    "endpoint": "<string>",
    "exporterType": "PROMETHEUS",
    "headers": {},
    "labels": {},
    "password": "<string>",
    "username": "<string>"
  }
}
'
{
  "objectKey": "<string>",
  "objectType": "CONNECTION",
  "scope": "WORKSPACE",
  "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": {
        "authType": "BASIC",
        "basicToken": "<string>",
        "endpoint": "<string>",
        "exporterType": "PROMETHEUS",
        "headers": {},
        "labels": {},
        "password": "<string>",
        "username": "<string>"
      }
    }
  ],
  "metricsExport": {
    "endpoint": "<string>",
    "exporterType": "PROMETHEUS",
    "authType": "BASIC",
    "basicToken": "<string>",
    "headers": {},
    "labels": {},
    "password": "<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"
  }
}

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 to which the environment object belongs.

environmentObjectId
string
required

The environment object's ID.

Body

application/json

The request body for updating an environment object.

airflowVariable
object

Whether or not to automatically link Deployments to the environment object. Only applicable for WORKSPACE scope

connection
object

The links to exclude from the environment object. Only applicable for WORKSPACE scope

The Deployments that Astro links to the environment object. Only applicable for WORKSPACE scope

metricsExport
object

Response

OK

objectKey
string
required

The key for the environment object

objectType
enum<string>
required

The type of environment object

Available options:
CONNECTION,
AIRFLOW_VARIABLE,
METRICS_EXPORT
scope
enum<string>
required

The scope of the environment object

Available options:
WORKSPACE,
DEPLOYMENT
scopeEntityId
string
required

The ID of the scope entity where the environment object is created

airflowVariable
object

Whether or not to automatically link Deployments to the environment object

connection
object
createdAt
string

The time when the environment object was created in UTC, formatted as YYYY-MM-DDTHH:MM:SSZ

createdBy
object

The excluded links for the environment object

id
string

The ID of the environment object

The Deployments linked to the environment object

metricsExport
object
sourceScope
enum<string>

The source scope of the environment object, if it is resolved from a link

Available options:
WORKSPACE,
DEPLOYMENT
sourceScopeEntityId
string

The source scope entity ID of the environment object, if it is resolved from a link

updatedAt
string

The time when the environment object was updated in UTC, formatted as YYYY-MM-DDTHH:MM:SSZ

updatedBy
object