---
title: "Validate a compute environment"
method: POST
path: "/compute-envs/{computeEnvId}/validate"
tags: ["compute-envs"]
---

# Validate a compute environment

`POST /compute-envs/{computeEnvId}/validate`

Re-runs the pre-flight checks (associated-credential validation and work-directory accessibility) for the compute environment identified by the given `computeEnvId` and persists the outcome to the compute environment and its credential. Intended to recover a compute environment marked `INVALID` after the underlying problem has been fixed. Available only while the pre-flight feature is enabled.

## Path parameters

- `computeEnvId` string, required

## Query parameters

- `workspaceId` integer
- `force` boolean

## Request body

- EmptyBodyRequest

## Response `200`

Validation outcome - inspect status and the transientError flag on the response body

- ValidateComputeEnvResponse
  - `message` string, nullable — Human-readable explanation of the outcome: the failure reason when the compute environment is INVALID, the provider-unreachable reason on a transient outcome, or null when the compute environment is AVAILABLE.
  - `status` 'CREATING' | 'AVAILABLE' | 'DISABLED' | 'DELETING' | 'ERRORED' | 'INVALID' | 'DELETED'
  - `transientError` boolean — True when a provider could not be reached (timeout / throttle / 5xx). The persisted status is left unchanged; retry later.

## Other responses

- `400` — Compute environment is in a status that cannot be validated
- `403` — Operation not allowed
- `404` — Compute environment not found
- `405` — Pre-flight feature is disabled
- `409` — Force override rejected because the compute environment or its associated credential is not in a compatible state

---

[API](https://skmtc.net/seqeralabs/apis/seqera-api.md) · [All operations](https://skmtc.net/seqeralabs/apis/seqera-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/seqeralabs/seqera-api/revisions/13316c9fe5ff/schema)
