Skip to main content
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 the Docs tab. See Develop and test APC API queries for more on using the built-in GraphQL explorer.
Worker queues have no dedicated mutation. You manage them through the workerQueues argument on upsertDeployment. For what worker queues do and how to use them in the UI, see Configure worker queues.
Astro Private Cloud 2.2This feature was introduced in Astro Private Cloud 2.2. To access this feature, upgrade your Astro Private Cloud installation to 2.2 or later.
The workerQueues argument is a full-list replace, not a partial patch. The list you send becomes the complete set of queues on the Deployment: a queue you leave out is deleted, and an optional field you leave out on a queue is reset to its default rather than keeping its stored value. Always send the full list with every field you want to keep.Omitting the workerQueues argument entirely leaves the queues untouched. An empty list is rejected.
The replace-all behavior defines the CRUD operations:

Enable worker queues for a Deployment

deployments.workerQueues.enabled gates worker queues and ships false. To turn it on for one Deployment, set a deployment-level config override:
deploymentsConfigOverride replaces the Deployment’s entire stored override under deployments.*. A key you leave out stops overriding and inherits again, so read the current override first and resend everything you want to keep. See Update Deployment configuration.
Add maxPerDeployment to the same object to raise or lower the queue cap for this Deployment:
To set the flag more widely, use updateWorkspaceDeploymentsConfig for a Workspace, updateCluster for a cluster, or values.yaml for the whole platform. See Enable worker queues and Config governance.

Read a Deployment’s worker queues

workerQueues is an empty list on Kubernetes executor and Helm-mode Deployments, never null.

Read the limits that apply to a Deployment

Resource bounds are overridable per cluster, Workspace, and Deployment, so read them for the Deployment you’re changing instead of assuming the platform defaults:
A range where either end is null isn’t enforced. canWorkerQueuesAutoscale is true when this Deployment’s queues can run a worker range. See Confirm autoscaling is available.

Add a worker queue

Send the complete list, including the existing default queue:
With these variables:

InputWorkerQueue fields

cpu is in millicores and memory and ephemeralStorage are in MiB. The API takes integers, not Kubernetes resource strings: send 2000, not "2", and 4096, not "4Gi". Sending only one of minWorkerCount and maxWorkerCount leaves replicas at 1, makes the missing bound fall back to it, and then rejects the inverted pair. Send both bounds or neither. To run a fixed number of workers, send replicas alone. To let a queue autoscale, send a maxWorkerCount above its minWorkerCount. See Set a worker range on a queue for an example. There’s no id field and no isDefault field. Queues are matched by name across an update, and isDefault is derived from the name default.

Resize a worker queue

Send the full list again with the changed values. This example doubles heavy-etl and leaves default as it was:

Delete a worker queue

Send the list without it. Dropping heavy-etl from the previous example deletes that queue and its workers. Nothing checks whether your Dag code still routes to the omitted queue. Tasks that name a deleted queue wait indefinitely with no error. The default queue can’t be dropped: a list that doesn’t contain it is rejected.

Update a Deployment without touching its queues

Omit the workerQueues argument. Any other upsertDeployment call — changing environment variables, alert emails, or the image — leaves the queues as they are:

The legacy workers argument

The workers argument still works and aliases the default queue. Precedence is: A script written before worker queues existed keeps working against a multi-queue Deployment and doesn’t collapse the other queues.

Errors

Out-of-range cpu, memory, and ephemeralStorage values return INTERNAL_SERVER_ERROR rather than BAD_USER_INPUT. The message names the field, the value, and the allowed range.

See also