Navigation

Verify Connect via Peering Only Mode for a Project

Verify whether an Atlas project has enabled Connect via Peering Only mode. You must have the Project Read Only role to successfully call this endpoint.

What is Connect via Peering Only Mode?

Connect via Peering Only mode prevents clusters in an Atlas project from connecting to any network destination other than aan Atlas Network Peer. Connect via Peering Only mode applies only to GCP and Azure-backed dedicated clusters. This setting disables the ability to:

  1. Deploy non-GCP or Azure-backed dedicated clusters in an Atlas project, and
  2. Use MongoDB Stitch with dedicated clusters in an Atlas project.

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

Resource

GET /groups/{GROUP-ID}/privateIpMode

Request Path Parameters

Body Parameter Type Necessity Description
GROUP-ID string Required Unique identifier of N Atlas project for which you want to enable Connect via Peering Only mode.

Request Query Parameters

This endpoint may use any of the HTTP request query parameters available to all Atlas API resources. These are all optional.

Name Type Description Default
pretty boolean Indicates whether the response body should be in a prettyprint format. false
envelope boolean

Indicates whether or not to wrap the response in an envelope.

Some API clients cannot access the HTTP response headers or status code. To remediate this, set envelope=true in the query.

For endpoints that return one result, the response body includes:

status HTTP response code
envelope The expected response body
false

Request Body Parameters

This endpoint does not use HTTP request body parameters.

Response

Response Element Type Description
enabled boolean Indicates whether Connect via Peering Only mode is enabled or disabled for an Atlas project.

Example Request

1
2
3
4
5
curl --user "{PUBLIC-KEY}:{PRIVATE-KEY}" --digest \
  --header "Accept: application/json" \
  --header "Content-Type: application/json" \
  --include \
  --request GET "https://cloud.mongodb.com/api/atlas/v1.0/groups/{GROUP-ID}/privateIpMode?pretty=true"

Example Response

Response Header

HTTP/1.1 401 Unauthorized
Content-Type: application/json;charset=ISO-8859-1
Date: {dateInUnixFormat}
WWW-Authenticate: Digest realm="MMS Public API", domain="", nonce="{nonce}", algorithm=MD5, op="auth", stale=false
Content-Length: {requestLengthInBytes}
Connection: keep-alive
HTTP/1.1 200 OK
Vary: Accept-Encoding
Content-Type: application/json
Strict-Transport-Security: max-age=300
Date: {dateInUnixFormat}
Connection: keep-alive
Content-Length: {requestLengthInBytes}

Response Body

1
2
3
{
  "enabled" : true
}