Update workspace configuration with the APC API

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.

Use the updateWorkspaceDeploymentsConfig mutation to add or update workspace-level overrides:

1mutation {
2 updateWorkspaceDeploymentsConfig(
3 workspaceUuid: "<workspace-id>"
4 deploymentsConfigOverride: {
5 deploymentLifecycle: {
6 deployRollback: {
7 enabled: true
8 }
9 }
10 }
11 reason: "Enable deploy rollback for all deployments in this workspace"
12 ) {
13 id
14 config
15 }
16}

The deploymentsConfigOverride argument accepts a partial JSON object. Keys you provide are merged into the existing workspace override. Keys you omit are left unchanged. To remove a specific key from the stored override, set its value to the string "DELETE_KEY":

1mutation {
2 updateWorkspaceDeploymentsConfig(
3 workspaceUuid: "<workspace-id>"
4 deploymentsConfigOverride: {
5 deploymentLifecycle: {
6 deployRollback: {
7 enabled: "DELETE_KEY"
8 }
9 }
10 }
11 reason: "Remove deploy rollback override, revert to cluster/platform default"
12 ) {
13 id
14 config
15 }
16}

For the full config governance model these overrides participate in, see Config governance.