Return All Private Endpoint Connection Strings for One Cluster Beta PREVIEW

GET /api/atlas/v2/groups/{groupId}/clusters/{clusterName}/privateEndpointConnectionStrings

This API is in preview. Breaking changes might be introduced before it is released. Don't use preview APIs in production.

Returns all private endpoint connection strings for the specified cluster.

Role requirements
  • Project Read Only

Path parameters

  • groupId string Required

    Unique 24-hexadecimal digit string that identifies your project. Use the /groups endpoint to retrieve all projects to which the authenticated user has access.

    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.

    Format should match the following pattern: ^([a-f0-9]{24})$.

  • clusterName string Required

    Human-readable label that identifies the cluster.

Query parameters

  • envelope boolean

    Flag that indicates whether Application wraps the response in an envelope JSON object. Some API clients cannot access the HTTP response headers or status code. To remediate this, set envelope=true in the query. Endpoints that return a list of results use the results object as an envelope. Application adds the status parameter to the response body.

    Default value is false.

  • includeCount boolean

    Flag that indicates whether MongoDB Cloud calculates the total number of items for the response. When set to false, MongoDB Cloud may skip an additional count operation. The response may still include totalCount when the count is available without additional calculation.

    Default value is true.

  • itemsPerPage integer

    Number of items that the response returns per page.

    Minimum value is 1, maximum value is 500. Default value is 100.

  • pageNum integer

    Number of the page that displays the current set of the total objects that the response returns.

    Minimum value is 1. Default value is 1.

  • pretty boolean

    Flag that indicates whether the response body should be in the prettyprint format.

    Default value is false.

    Prettyprint
  • status string

    Filter records by lifecycle status.

    Values are PENDING, AVAILABLE, or FAILED.

  • managementType string

    Filter records by management type.

    Values are SELF_MANAGED or IMPORTED.

Responses

  • 200 application/vnd.atlas.preview+json

    OK

    Hide headers attributes Show headers attributes
    • RateLimit-Limit

      The maximum number of requests that a user can make within a specific time window.

    • RateLimit-Remaining

      The number of requests remaining in the current rate limit window before the limit is reached.

    Hide response attributes Show response attributes object
    • results array[object] Required

      List of returned documents that MongoDB Cloud provides when completing this request.

      Hide results attributes Show results attributes object

      Private endpoint connection string for one cluster.

      • connectionString string

        Private endpoint-aware connection string that uses the mongodb:// protocol to connect to this cluster through the selected private endpoints. MongoDB Cloud returns this value when status is AVAILABLE. After you submit an update, MongoDB Cloud continues to return the existing connection string until the updated connection string becomes available.

        Maximum length is 2048.

      • connectionStringId string Required

        Unique 24-hexadecimal digit string that identifies this private endpoint connection string. This value is the connectionStringId path parameter of this resource's endpoints.

        Format should match the following pattern: ^([a-f0-9]{24})$.

      • createdAt string(date-time)

        Date and time when MongoDB Cloud created this private endpoint connection string. This parameter expresses its value in the ISO 8601 timestamp format in UTC.

      • errorMessage string

        Error message that explains why this private endpoint connection string is in the FAILED state, including the remediation, for example when a selected endpoint was deleted mid-flight. Present only when status is FAILED.

      • managementType string Required

        Party that manages this private endpoint connection string. MongoDB Cloud returns SELF_MANAGED for connection strings that you create and maintain through this resource, and IMPORTED for records that preserve the private endpoint connection strings that this cluster exposed before migration. You can delete an imported record but not update it.

        Values are SELF_MANAGED or IMPORTED.

      • name string Required

        Human-readable label of at most 64 characters that identifies this private endpoint connection string. You can change this label without changing the connection string.

        Maximum length is 64.

      • optimizedModeEnabled boolean

        Flag that indicates whether this private endpoint connection string uses the optimized load-balanced mode. This mode requires a sharded cluster and a private endpoint selection that satisfies the optimized connection string requirements.

        Default value is false.

      • privateEndpointIds array[string] Required

        Set of private endpoints that this connection string covers. MongoDB Cloud stores this set as a snapshot of your selection and never adds newly created private endpoints to it. The set accepts at most one private endpoint per cloud provider region, and can include private endpoints that the cluster does not use yet. Order is not significant and MongoDB Cloud rejects duplicate values.

        Not more than 50 elements. Maximum length of each is 512.

      • slug string

        Short generated pin of at most 64 characters, unique per project. Present only when managementType is SELF_MANAGED. A self-managed connection string embeds this value in its DNS names, and its replica set horizon name is cs- plus this value.

        Maximum length is 64.

      • srvConnectionString string

        Private endpoint-aware connection string that uses the mongodb+srv:// protocol to connect to this cluster through the selected private endpoints. MongoDB Cloud returns this value when status is AVAILABLE. After you submit an update, MongoDB Cloud continues to return the existing connection string until the updated connection string becomes available.

        Maximum length is 2048.

      • status string Required

        State of this private endpoint connection string. MongoDB Cloud returns PENDING while it reconfigures the cluster, AVAILABLE once the connection string is usable, and FAILED when creation cannot complete.

        Values are PENDING, AVAILABLE, or FAILED.

      • updatedAt string(date-time)

        Date and time when MongoDB Cloud last updated this private endpoint connection string. This parameter expresses its value in the ISO 8601 timestamp format in UTC.

    • totalCount integer(int32)

      Total number of documents available. When includeCount is set to false, MongoDB Cloud may omit this value or return it when the count is available without additional calculation. The total number is an estimate and may not be exact.

      Minimum value is 0.

  • 401 application/json

    Unauthorized.

    Hide response attributes Show response attributes object
    • badRequestDetail object

      Bad request detail.

      Hide badRequestDetail attribute Show badRequestDetail attribute object
      • fields array[object]

        Describes all violations in a client request.

        Hide fields attributes Show fields attributes object
        • description string Required

          A description of why the request element is bad.

        • field string Required

          A path that leads to a field in the request body.

    • detail string | null

      Describes the specific conditions or reasons that cause each type of error.

    • error integer(int32) Required

      HTTP status code returned with this error.

      External documentation
    • errorCode string Required

      Application error code returned with this error.

    • parameters array[object]

      Parameters used to give more information about the error.

    • policiesCausingDecision array[object]

      Atlas Resource Policies that caused the request to be denied. Returned only when errorCode is ATLAS_RESOURCE_POLICIES_VIOLATION_NOT_AUTHORIZED.

      Not more than 100 elements.

      Hide policiesCausingDecision attributes Show policiesCausingDecision attributes object

      Atlas Resource Policy that caused the request to be denied.

      • id string Required

        Unique 24-hexadecimal character string that identifies the Atlas Resource Policy.

        Format should match the following pattern: ^([a-f0-9]{24})$.

      • name string Required

        Human-readable label that identifies the Atlas Resource Policy.

    • reason string | null

      Application error message returned with this error.

  • 403 application/json

    Forbidden.

    Hide response attributes Show response attributes object
    • badRequestDetail object

      Bad request detail.

      Hide badRequestDetail attribute Show badRequestDetail attribute object
      • fields array[object]

        Describes all violations in a client request.

        Hide fields attributes Show fields attributes object
        • description string Required

          A description of why the request element is bad.

        • field string Required

          A path that leads to a field in the request body.

    • detail string | null

      Describes the specific conditions or reasons that cause each type of error.

    • error integer(int32) Required

      HTTP status code returned with this error.

      External documentation
    • errorCode string Required

      Application error code returned with this error.

    • parameters array[object]

      Parameters used to give more information about the error.

    • policiesCausingDecision array[object]

      Atlas Resource Policies that caused the request to be denied. Returned only when errorCode is ATLAS_RESOURCE_POLICIES_VIOLATION_NOT_AUTHORIZED.

      Not more than 100 elements.

      Hide policiesCausingDecision attributes Show policiesCausingDecision attributes object

      Atlas Resource Policy that caused the request to be denied.

      • id string Required

        Unique 24-hexadecimal character string that identifies the Atlas Resource Policy.

        Format should match the following pattern: ^([a-f0-9]{24})$.

      • name string Required

        Human-readable label that identifies the Atlas Resource Policy.

    • reason string | null

      Application error message returned with this error.

  • 404 application/json

    Not Found.

    Hide response attributes Show response attributes object
    • badRequestDetail object

      Bad request detail.

      Hide badRequestDetail attribute Show badRequestDetail attribute object
      • fields array[object]

        Describes all violations in a client request.

        Hide fields attributes Show fields attributes object
        • description string Required

          A description of why the request element is bad.

        • field string Required

          A path that leads to a field in the request body.

    • detail string | null

      Describes the specific conditions or reasons that cause each type of error.

    • error integer(int32) Required

      HTTP status code returned with this error.

      External documentation
    • errorCode string Required

      Application error code returned with this error.

    • parameters array[object]

      Parameters used to give more information about the error.

    • policiesCausingDecision array[object]

      Atlas Resource Policies that caused the request to be denied. Returned only when errorCode is ATLAS_RESOURCE_POLICIES_VIOLATION_NOT_AUTHORIZED.

      Not more than 100 elements.

      Hide policiesCausingDecision attributes Show policiesCausingDecision attributes object

      Atlas Resource Policy that caused the request to be denied.

      • id string Required

        Unique 24-hexadecimal character string that identifies the Atlas Resource Policy.

        Format should match the following pattern: ^([a-f0-9]{24})$.

      • name string Required

        Human-readable label that identifies the Atlas Resource Policy.

    • reason string | null

      Application error message returned with this error.

  • 429 application/json

    Too Many Requests.

    Hide headers attributes Show headers attributes
    • RateLimit-Limit

      The maximum number of requests that a user can make within a specific time window.

    • RateLimit-Remaining

      The number of requests remaining in the current rate limit window before the limit is reached.

    • Retry-After

      The minimum time you should wait, in seconds, before retrying the API request. This header might be returned for 429 or 503 error responses.

    Hide response attributes Show response attributes object
    • badRequestDetail object

      Bad request detail.

      Hide badRequestDetail attribute Show badRequestDetail attribute object
      • fields array[object]

        Describes all violations in a client request.

        Hide fields attributes Show fields attributes object
        • description string Required

          A description of why the request element is bad.

        • field string Required

          A path that leads to a field in the request body.

    • detail string | null

      Describes the specific conditions or reasons that cause each type of error.

    • error integer(int32) Required

      HTTP status code returned with this error.

      External documentation
    • errorCode string Required

      Application error code returned with this error.

    • parameters array[object]

      Parameters used to give more information about the error.

    • policiesCausingDecision array[object]

      Atlas Resource Policies that caused the request to be denied. Returned only when errorCode is ATLAS_RESOURCE_POLICIES_VIOLATION_NOT_AUTHORIZED.

      Not more than 100 elements.

      Hide policiesCausingDecision attributes Show policiesCausingDecision attributes object

      Atlas Resource Policy that caused the request to be denied.

      • id string Required

        Unique 24-hexadecimal character string that identifies the Atlas Resource Policy.

        Format should match the following pattern: ^([a-f0-9]{24})$.

      • name string Required

        Human-readable label that identifies the Atlas Resource Policy.

    • reason string | null

      Application error message returned with this error.

  • 500 application/json

    Internal Server Error.

    Hide response attributes Show response attributes object
    • badRequestDetail object

      Bad request detail.

      Hide badRequestDetail attribute Show badRequestDetail attribute object
      • fields array[object]

        Describes all violations in a client request.

        Hide fields attributes Show fields attributes object
        • description string Required

          A description of why the request element is bad.

        • field string Required

          A path that leads to a field in the request body.

    • detail string | null

      Describes the specific conditions or reasons that cause each type of error.

    • error integer(int32) Required

      HTTP status code returned with this error.

      External documentation
    • errorCode string Required

      Application error code returned with this error.

    • parameters array[object]

      Parameters used to give more information about the error.

    • policiesCausingDecision array[object]

      Atlas Resource Policies that caused the request to be denied. Returned only when errorCode is ATLAS_RESOURCE_POLICIES_VIOLATION_NOT_AUTHORIZED.

      Not more than 100 elements.

      Hide policiesCausingDecision attributes Show policiesCausingDecision attributes object

      Atlas Resource Policy that caused the request to be denied.

      • id string Required

        Unique 24-hexadecimal character string that identifies the Atlas Resource Policy.

        Format should match the following pattern: ^([a-f0-9]{24})$.

      • name string Required

        Human-readable label that identifies the Atlas Resource Policy.

    • reason string | null

      Application error message returned with this error.

GET /api/atlas/v2/groups/{groupId}/clusters/{clusterName}/privateEndpointConnectionStrings
atlas api clusters listEndpointConnectionStrings --help
curl --include --header "Authorization: Bearer ${ACCESS_TOKEN}" \
  --header "Accept: application/vnd.atlas.preview+json" \
  -X GET "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/privateEndpointConnectionStrings?pretty=true"
curl --user "${PUBLIC_KEY}:${PRIVATE_KEY}" \
  --digest --include \
  --header "Accept: application/vnd.atlas.preview+json" \
  -X GET "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/privateEndpointConnectionStrings?pretty=true"
Response examples (200)
# Headers

# Payload
{
  "links": [
    {
      "href": "https://cloud.mongodb.com/api/atlas",
      "rel": "self"
    }
  ],
  "results": [
    {
      "connectionString": "string",
      "connectionStringId": "32b6e34b3d91647abb20e7b8",
      "createdAt": "2026-05-04T09:42:00Z",
      "errorMessage": "string",
      "managementType": "SELF_MANAGED",
      "name": "reporting-vpc",
      "optimizedModeEnabled": false,
      "privateEndpointIds": [
        "string"
      ],
      "slug": "ztevkhxb",
      "srvConnectionString": "string",
      "status": "PENDING",
      "updatedAt": "2026-05-04T09:42:00Z"
    }
  ],
  "totalCount": 42
}
Response examples (401)
{
  "detail": "(This is just an example, the exception may not be related to this endpoint)",
  "error": 401,
  "errorCode": "NOT_ORG_GROUP_CREATOR",
  "reason": "Unauthorized"
}
Response examples (403)
{
  "detail": "(This is just an example, the exception may not be related to this endpoint)",
  "error": 403,
  "errorCode": "CANNOT_CHANGE_GROUP_NAME",
  "reason": "Forbidden"
}
Response examples (404)
{
  "detail": "(This is just an example, the exception may not be related to this endpoint) Cannot find resource AWS",
  "error": 404,
  "errorCode": "RESOURCE_NOT_FOUND",
  "reason": "Not Found"
}
Response examples (429)
{
  "detail": "(This is just an example, the exception may not be related to this endpoint)",
  "error": 429,
  "errorCode": "RATE_LIMITED",
  "reason": "Too Many Requests"
}
Response examples (500)
{
  "detail": "(This is just an example, the exception may not be related to this endpoint)",
  "error": 500,
  "errorCode": "UNEXPECTED_ERROR",
  "reason": "Internal Server Error"
}