Deploy

Create a Deploy

POST
Create a new Deploy. A Deploy represents an intent to deploy new DAG code to an Astro Deployment.

Path parameters

organizationIdstringRequired
The ID of the Organization in which to create the Deployment.
deploymentIdstringRequired
The Deployment's ID.

Request

This endpoint expects an object.
type
enumRequired
The type of the deploy.
Allowed values: IMAGE_AND_DAGIMAGE_ONLYDAG_ONLY
description
stringOptional
The deploy's description.

Response

This endpoint returns an object
createdAt
datetime

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

deploymentId
string
The Deployment's ID.
id
string
The deploy's ID.
imageRepository
string
The URL of the deploy's image repository.
imageTag
string
The deploy's image tag. Appears only if specified in the most recent deploy.
isDagDeployEnabled
boolean
Whether the deploy was triggered on a Deployment with DAG deploys enabled.
status
enum
The status of the deploy.
Allowed values: INITIALIZEDDEPLOYEDFAILED
type
enum
The type of deploy.
Allowed values: IMAGE_AND_DAGIMAGE_ONLYDAG_ONLY
airflowVersion
stringOptional
The deploy's Airflow version.
astroRuntimeVersion
stringOptional
The deploy's Astro Runtime version.
createdBySubject
objectOptional
dagTarballVersion
stringOptional
The deploy's DAG tarball version, also known as the Bundle Version in the Astro UI.
dagsUploadUrl
stringOptional
The deploy's upload URL to upload DAG bundles. Appears only if dag deploys are enabled on the Deployment.
description
stringOptional
The deploy's description.
rollbackFromId
stringOptional
The ID of the deploy that you completed a rollback on. Appears only if a rollback has been performed.
updatedAt
datetimeOptional

The time when the deploy was last updated in UTC, formatted as YYYY-MM-DDTHH:MM:SSZ.

updatedBySubject
objectOptional
POST
1curl -X POST https://api.astronomer.io/platform/v1beta1/organizations/organizationId/deployments/deploymentId/deploys \
2 -H "Authorization: Bearer <token>" \
3 -H "Content-Type: application/json" \
4 -d '{
5 "type": "IMAGE_AND_DAG",
6 "description": "My deploy description"
7}'
200Successful
1{
2 "createdAt": "2022-11-22T04:37:12Z",
3 "deploymentId": "clmh57jtm000008lb58fe2wmv",
4 "id": "clvetru2w000201mowqwua63n",
5 "imageRepository": "https://my-image-repository",
6 "imageTag": "my-image-tag",
7 "isDagDeployEnabled": true,
8 "status": "INITIALIZED",
9 "type": "IMAGE_AND_DAG",
10 "airflowVersion": "2.7.2, if airflow version is not found, it will return NA",
11 "astroRuntimeVersion": "9.1.0",
12 "createdBySubject": {
13 "id": "clm8qv74h000008mlf08scq7k",
14 "apiTokenName": "my-token",
15 "avatarUrl": "https://avatar.url",
16 "fullName": "Jane Doe",
17 "subjectType": "USER",
18 "username": "user1@company.com"
19 },
20 "dagTarballVersion": "2024-01-12T18:32:20.5898930Z",
21 "dagsUploadUrl": "https://astroproddagdeploy.windows.core.net/clmh59gt0000308lbgswe5fvh/clmh57jtm000008lb58fe2wmv",
22 "description": "My deploy description",
23 "rollbackFromId": "clvcz1lrq000101oitxtp276e",
24 "updatedAt": "2022-11-22T04:37:12Z",
25 "updatedBySubject": {
26 "id": "clm8qv74h000008mlf08scq7k",
27 "apiTokenName": "my-token",
28 "avatarUrl": "https://avatar.url",
29 "fullName": "Jane Doe",
30 "subjectType": "USER",
31 "username": "user1@company.com"
32 }
33}