Envs

post

Create a new environment or start run for existing environment

🔒 Requires the create:environment permission

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Body
environmentSlugstringRequired

The environment slug for creating or targeting existing environment

blueprintstringOptional

The blueprint/package name, e.g. @bluebricks/postgres

versionstringOptional

The package version e.g. 1.2.3

Example: 1.2.3
deployTypestring · enumOptional

Controls how the deployment is executed. autoApply automatically applies changes without manual approval; autoApprove skips approval and pending; validateOnly validates the deployment without executing; planOnly generates a plan without executing; driftDetection runs only configuration-drift detection; draft creates the deployment record without starting any activity. autoRemediation automatically remediates detected drifts; deployType can't be used together with deprecated flags.

Example: autoApprovePossible values:
forcebooleanOptionalDeprecated

Deprecated. Use deployType='autoApprove' instead

validateOnlybooleanOptionalDeprecated

Deprecated. Use deployType='validateOnly' instead

Default: false
planOnlybooleanOptionalDeprecated

Deprecated. Use deployType='planOnly' instead

Default: false
incrementalbooleanOptional

Enable incremental mode to skip deployments with no changes

Default: false
noActivitybooleanOptionalDeprecated

Deprecated. Use deployType='draft' instead

Default: false
driftDetectionbooleanOptionalDeprecated

Deprecated. Use deployType='driftDetection' instead

Default: false
isDriftDetectionEnabledbooleanOptional

Enable drift detection for the environment

Default: false
collectionstringOptional

Target collection for environment

Responses
chevron-right
200

Created environment and task details or validation result

application/json

Created environment and task details or validation result

or
post
/api/v1/env/create
get

Retrieve all deployment states for an environment

🔒 Requires the read:environment permission

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
environmentIdOrSlugstringRequired

Environment ID or slug

Responses
chevron-right
200

List of environment states with metadata

application/json

List of environment states with metadata

state_idstringRequired

The unique identifier of the state

Example: 123e4567-e89b-12d3-a456-426614174000
package_idstringRequired

The unique identifier of the package

Example: terraform_aws_secretsmanager
hierarchical_pathstring · nullableOptional

The hierarchical path of the package in the deployment

Example: root.terraform_aws_secretsmanager
statusstring · enumRequired

The current status of the deployment state. Returns "n/a" when metadata is not available

Example: livePossible values:
run_idstring · nullableRequired

ID of the latest run that created/updated the state. Returns "n/a" when metadata is not available

Example: run-abc123
lockedbooleanRequired

Whether the state is currently locked

Example: false
created_atstring · nullableRequired

When the state was first created. Returns "n/a" when metadata is not available

Example: 2025-10-10T12:34:56.123Z
updated_atstring · nullableRequired

When the state was last updated

Example: 2025-10-12T08:20:00.456Z
iac_typestring · enumRequired

The IaC type for this package

Example: terraformPossible values:
versionstringRequired

The package version associated with this state

Example: 1.0.0
get
/api/v1/env/{environmentIdOrSlug}/states
get

Return environments information by collection

🔒 Requires the read:environment permission

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Query parameters
collectionIdstring · uuidOptional

The collection's ID e.g. f27d96be-c486-4075-a926-0ee96775119e

Example: f27d96be-c486-4075-a926-0ee96775119e
sortstring · enumOptional

Specifies the attribute by which the returned list should be sorted

Default: timestampPossible values:
offsetnumberOptional

Results offset to allow pagination e.g. 10

Default: 0Example: 10
orderstringOptional

Specifies the order - ascending or descending - by which the returned list should be sorted e.g. ASC

limitnumber · min: 3 · max: 1000Optional

Results limit to allow pagination, e.g. 50

Default: 20Example: 10
filterstringOptional

Structure: [key1=value1,key2=value2&value3]

searchstringOptional

Enables searching within the list for environment names that match a particular query

archivedbooleanOptional

Also includes archived environments

outdatedbooleanOptional

If true, return only environments with outdated package versions

Responses
chevron-right
200

Paginated information of filtered environments for a collection

application/json

Paginated information of filtered environments for a collection

totalnumberRequired
has_outdatedbooleanOptional

Indicates if any outdated environments exist

statsone ofRequired
or
get
/api/v1/envs
post

Archive multiple environments

🔒 Requires the update:environment permission

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Bodystring[]
string[]Optional

List of environment slugs, e.g. ["test-environment", "my-environment"]

Example: ["test-environment","my-environment"]
Responses
chevron-right
200

Environment archived / unarchived successfully

application/json

Environment archived / unarchived successfully

environmentstringRequired

The environment's slug e.g. my-environment

archivedbooleanRequired

Updated archived status

post
/api/v1/envs/archive
post

Unarchive multiple environments

🔒 Requires the update:environment permission

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Bodystring[]
string[]Optional

List of environment slugs, e.g. ["test-environment", "my-environment"]

Example: ["test-environment","my-environment"]
Responses
chevron-right
200

Environment archived / unarchived successfully

application/json

Environment archived / unarchived successfully

environmentstringRequired

The environment's slug e.g. my-environment

archivedbooleanRequired

Updated archived status

post
/api/v1/envs/unarchive
post

Enable drift detection for multiple environments

🔒 Requires the update:environment permission

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Bodystring[]
string[]Optional

List of environment slugs, e.g. ["test-environment", "my-environment"]

Example: ["test-environment","my-environment"]
Responses
chevron-right
200

Environment drift detection status updated successfully

application/json

Environment drift detection status updated successfully

environmentstringRequired

The environment's slug e.g. my-environment

is_drift_detection_enabledbooleanRequired

Updated drift detection status

post
/api/v1/envs/enable-drift-detection
post

Disable drift detection for multiple environments

🔒 Requires the update:environment permission

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Bodystring[]
string[]Optional

List of environment slugs, e.g. ["test-environment", "my-environment"]

Example: ["test-environment","my-environment"]
Responses
chevron-right
200

Environment drift detection status updated successfully

application/json

Environment drift detection status updated successfully

environmentstringRequired

The environment's slug e.g. my-environment

is_drift_detection_enabledbooleanRequired

Updated drift detection status

post
/api/v1/envs/disable-drift-detection
post

Upload state files to draft environment

🔒 Requires the create:environment permission

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
environmentIdOrSlugstringRequired

Environment ID or slug

Body
statesstringRequired

JSON string containing array of state metadata with file references for root-level packages only.

Example: [{"package_id":"terraform_aws_secretsmanager","state_file":"state_1"},{"package_id":"terraform_aws_eks_auto","state_file":"state_2"}]
Other propertiesanyOptional
Responses
chevron-right
200

State upload results

application/json

State upload results

package_idstringRequired

Package identifier

Example: terraform_aws_secretsmanager
statusstring · enumRequired

Upload status

Example: successPossible values:
reasonstringOptional

Reason for failure (only present when status is failed)

post
/api/v1/envs/{environmentIdOrSlug}/states

Last updated

Was this helpful?