---
title: "Disable compute environment"
method: POST
path: "/compute-envs/{computeEnvId}/disable"
tags: ["compute-envs"]
---

# Disable compute environment

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

Disables the compute environment identified by the given `computeEnvId`. A disabled compute environment cannot be used to launch workflows. If the compute environment is primary, it will be automatically unset as primary.

## Path parameters

- `computeEnvId` string, required

## Query parameters

- `workspaceId` integer

## Request body

- EmptyBodyRequest

## Response `204`

OK - No content

## Other responses

- `400` — Bad request
- `403` — Operation not allowed

---

[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)
