---
title: "Test Failover for One Cluster"
method: POST
path: "/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/restartPrimaries"
tags: ["Clusters"]
---

# Test Failover for One Cluster

`POST /api/atlas/v2/groups/{groupId}/clusters/{clusterName}/restartPrimaries`

Starts a failover test for the specified cluster in the specified project. Clusters contain a group of hosts that maintain the same data set. A failover test checks how MongoDB Cloud handles the failure of the cluster's primary node. During the test, MongoDB Cloud shuts down the primary node and elects a new primary.

## Path parameters

- `groupId` string, required
- `clusterName` string, required

## Query parameters

- `envelope` boolean
- `pretty` boolean

## Response `200`

OK

## Other responses

- `401` — Unauthorized.
- `403` — Forbidden.
- `404` — Not Found.
- `429` — Too Many Requests.
- `500` — Internal Server Error.

---

[API](https://skmtc.dev/mongodb/apis/atlas-admin-api.md) · [All operations](https://skmtc.dev/mongodb/apis/atlas-admin-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/mongodb/atlas-admin-api/revisions/e37e8ef8429f/schema)
