Navigation

Test Failover

Note

Groups and projects are synonymous terms. Your {GROUP-ID} is the same as your project ID. For existing groups, your group/project ID remains the same. The resource and corresponding endpoints use the term groups.

The Atlas API uses HTTP Digest Authentication. Provide a programmatic API public key and corresponding private key as the username and password when constructing the HTTP request.

For complete documentation on configuring API access for an Atlas project, see Configure Atlas API Access.

To learn more about failover testing and the replica set election process, see Test Failover.

Base URL: https://cloud.mongodb.com/api/atlas/v1.0

Syntax

POST /api/atlas/v1.0/groups/{GROUP-ID}/clusters/{CLUSTER-NAME}/restartPrimaries

Request Path Parameters

Path Element Type Necessity Description
GROUP-ID String Required The unique identifier of the project containing the cluster you want to test.
CLUSTER-NAME String Required The name of the cluster to test.

Example

Request

curl -i -u "{PUBLIC-KEY}:{PRIVATE-KEY}" --digest --request POST "https://cloud.mongodb.com/api/atlas/v1.0/groups/5356823b3794de37132bb7b/clusters/egCluster/restartPrimaries"

Response

{}