The examples on this page show common ways to use the APC API — they’re not a complete API reference. For the full, interactive API documentation for your installation, including every available query, mutation, and type, go to
https://houston.<your-base-domain>/v1, and click on the Docs tab. See Develop and test APC API queries for more on using the built-in GraphQL explorer.upsertDeployment mutation to both create and update Deployments with all possible Deployment configurations. If you query upsertDeployment without a deploymentUuid, the APC API creates a new Deployment according to your specifications. If you specify an existing deploymentUuid, the APC API updates the Deployment with that ID. All queries to create a Deployment require specifying a workspaceUuid.
The following query creates a new Deployment in a custom namespace test-new-dep and configures a Deployment environment variable AIRFLOW__CORE__COLORED_LOG_FORMAT.
More upsertDeployment examples
The following examples showupsertDeployment used for a few other common, narrower use cases.
Deploy a pre-built image from CI/CD
This approach is useful when you need to integrate with systems that can’t use the Astro CLI directly.workspaceUuid: The ID of the Workspace that contains the Deployment. You can provideworkspaceLabelinstead. One of the two is required.clusterId: The ID of the cluster that hosts the Deployment.releaseName: The release name of your Deployment, following the patternspaceyword-spaceyword-4digits. For example,infrared-photon-7780.image: The full image path including registry, repository, and tag. The image must be accessible from your Astro Private Cloud data plane.runtimeVersion: The Astro Runtime version that the image is based on. For example,12.1.0.deployRevisionDescription: An optional description for the deploy revision, useful for tracking deploys in the APC UI.
Configure NFS Dag deployment
UseupsertDeployment to configure a Deployment’s Dag deployment mechanism as an NFS volume mount:
Configure object storage mount Dag deployment
UseupsertDeployment to configure a Deployment’s Dag deployment mechanism as an object storage mount from cloud object storage (APC 2.2 and later):
storageUri is the cloud storage URI (gs://…, s3://…, or an Azure blob endpoint or container), and iamIdentity is the cloud IAM identity (GCP service account email, AWS IAM role ARN, or Azure managed identity client ID). You can also set an optional mountPath to override the default /usr/local/airflow/dags. For the full setup, including cloud prerequisites, see Deploy Dags with an object storage mount.
Skip Airflow database provisioning
To use pre-existing or managed databases, setskipAirflowDatabaseProvisioning to true in the upsertDeployment mutation: