Return All Alert Configuration Matchers Field Names

GET /api/atlas/v2/alertConfigs/matchers/fieldNames

Get all field names that the matchers.fieldName parameter accepts when you create or update an Alert Configuration. You can successfully call this endpoint with any assigned role.

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.

  • pretty boolean

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

    Default value is false.

    Prettyprint

Responses

  • 200 application/vnd.atlas.2023-01-01+json

    OK

    One of:

    Value is APPLICATION_ID.

  • 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

      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.

    • reason string

      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

      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.

    • reason string

      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

      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.

    • reason string

      Application error message returned with this error.

GET /api/atlas/v2/alertConfigs/matchers/fieldNames
atlas api listAlertConfigurationMatchersFieldNames --help
import (
	"os"
	"context"
	"log"
	sdk "go.mongodb.org/atlas-sdk/v20250312001/admin"
)

func main() {
	ctx := context.Background()
	clientID := os.Getenv("MONGODB_ATLAS_CLIENT_ID")
	clientSecret := os.Getenv("MONGODB_ATLAS_CLIENT_SECRET")

	client, err := sdk.NewClient(
		sdk.UseOAuthAuth(clientID, clientSecret),
		sdk.UseBaseURL(url))

	if err != nil {
		log.Fatalf("Error: %v", err)
	}

	params = &sdk.ListAlertConfigurationMatchersFieldNamesApiParams{}
	sdkResp, httpResp, err := client.AlertConfigurationsApi.
		ListAlertConfigurationMatchersFieldNamesWithParams(ctx, params).
		Execute()
}
curl --header "Authorization: Bearer ${ACCESS_TOKEN}" \
  --header "Accept: application/vnd.atlas.2025-03-12+json" \
  -X GET "https://cloud.mongodb.com/api/atlas/v2/alertConfigs/matchers/fieldNames?pretty=true"
curl --user "${PUBLIC_KEY}:${PRIVATE_KEY}" \
  --digest \
  --header "Accept: application/vnd.atlas.2025-03-12+json" \
  -X GET "https://cloud.mongodb.com/api/atlas/v2/alertConfigs/matchers/fieldNames?pretty=true"
Response examples (200)
[
  "APPLICATION_ID"
]
Response examples (401)
{
  "error": 401,
  "detail": "(This is just an example, the exception may not be related to this endpoint)",
  "reason": "Unauthorized",
  "errorCode": "NOT_ORG_GROUP_CREATOR"
}
Response examples (403)
{
  "error": 403,
  "detail": "(This is just an example, the exception may not be related to this endpoint)",
  "reason": "Forbidden",
  "errorCode": "CANNOT_CHANGE_GROUP_NAME"
}
Response examples (500)
{
  "error": 500,
  "detail": "(This is just an example, the exception may not be related to this endpoint)",
  "reason": "Internal Server Error",
  "errorCode": "UNEXPECTED_ERROR"
}


















































Return All Atlas Search Indexes for One Collection Deprecated

GET /api/atlas/v2/groups/{groupId}/clusters/{clusterName}/fts/indexes/{databaseName}/{collectionName}

Returns all Atlas Search indexes on the specified collection. Atlas Search indexes contain the indexed fields and the analyzers used to create the indexes. To use this resource, the requesting Service Account or API Key must have the Project Data Access Read Write role.

Atlas Search Indexes

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

    Name of the cluster that contains the collection with one or more Atlas Search indexes.

    Format should match the following pattern: ^[a-zA-Z0-9][a-zA-Z0-9-]*$.

  • collectionName string Required

    Name of the collection that contains one or more Atlas Search indexes.

  • databaseName string Required

    Human-readable label that identifies the database that contains the collection with one or more Atlas Search indexes.

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.

  • pretty boolean

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

    Default value is false.

    Prettyprint

Responses

  • 200 application/vnd.atlas.2023-01-01+json

    OK

    One of:
    Hide attributes Show attributes
    • collectionName string Required

      Human-readable label that identifies the collection that contains one or more Atlas Search indexes.

    • database string Required

      Human-readable label that identifies the database that contains the collection with one or more Atlas Search indexes.

    • name string Required

      Human-readable label that identifies this index. Within each namespace, names of all indexes in the namespace must be unique.

    • numPartitions integer(int32)

      Number of index partitions. Allowed values are [1, 2, 4].

      Default value is 1.

    • type string Discriminator

      Type of the index. Default type is search.

      Value is search.

    • analyzer string

      Specific pre-defined method chosen to convert database field text into searchable words. This conversion reduces the text of fields into the smallest units of text. These units are called a term or token. This process, known as tokenization, involves a variety of changes made to the text in fields:

      • extracting words
      • removing punctuation
      • removing accents
      • changing to lowercase
      • removing common words
      • reducing words to their root form (stemming)
      • changing words to their base form (lemmatization) MongoDB Cloud uses the selected process to build the Atlas Search index.

      Values are lucene.standard, lucene.simple, lucene.whitespace, lucene.keyword, lucene.arabic, lucene.armenian, lucene.basque, lucene.bengali, lucene.brazilian, lucene.bulgarian, lucene.catalan, lucene.chinese, lucene.cjk, lucene.czech, lucene.danish, lucene.dutch, lucene.english, lucene.finnish, lucene.french, lucene.galician, lucene.german, lucene.greek, lucene.hindi, lucene.hungarian, lucene.indonesian, lucene.irish, lucene.italian, lucene.japanese, lucene.korean, lucene.kuromoji, lucene.latvian, lucene.lithuanian, lucene.morfologik, lucene.nori, lucene.norwegian, lucene.persian, lucene.portuguese, lucene.romanian, lucene.russian, lucene.smartcn, lucene.sorani, lucene.spanish, lucene.swedish, lucene.thai, lucene.turkish, or lucene.ukrainian. Default value is lucene.standard.

      Atlas Search Analyzers
    • analyzers array[object]

      List of user-defined methods to convert database field text into searchable words.

      Settings that describe one Atlas Search custom analyzer.

      Custom Atlas Search Analyzers
      Hide analyzers attributes Show analyzers attributes object
      • charFilters array[object]

        Filters that examine text one character at a time and perform filtering operations.

        One of:

        Filter that strips out HTML constructs.

        Hide attributes Show attributes
        • ignoredTags array[string]

          The HTML tags that you want to exclude from filtering.

        • type string Required

          Human-readable label that identifies this character filter type.

          Value is htmlStrip.

      • name string Required

        Human-readable name that identifies the custom analyzer. Names must be unique within an index, and must not start with any of the following strings:

        • lucene.
        • builtin.
        • mongodb.
      • tokenFilters array[object]

        Filter that performs operations such as:

        • Stemming, which reduces related words, such as "talking", "talked", and "talks" to their root word "talk".

        • Redaction, the removal of sensitive information from public documents.

        Any of:

        Filter that converts alphabetic, numeric, and symbolic Unicode characters that are not in the Basic Latin Unicode block to their ASCII equivalents, if available.

        Hide attributes Show attributes
        • originalTokens string

          Value that indicates whether to include or omit the original tokens in the output of the token filter.

          Choose include if you want to support queries on both the original tokens as well as the converted forms.

          Choose omit if you want to query only on the converted forms of the original tokens.

          Values are omit or include. Default value is omit.

        • type string Required

          Human-readable label that identifies this token filter type.

          Value is asciiFolding.

      • tokenizer object Required

        Tokenizer that you want to use to create tokens. Tokens determine how Atlas Search splits up text into discrete chunks for indexing.

        One of:

        Tokenizer that splits input from the left side, or "edge", of a text input into n-grams of given sizes. You can't use the edgeGram tokenizer in synonym or autocomplete mapping definitions.

        Hide attributes Show attributes
        • maxGram integer Required

          Characters to include in the longest token that Atlas Search creates.

        • minGram integer Required

          Characters to include in the shortest token that Atlas Search creates.

        • type string Required Discriminator

          Human-readable label that identifies this tokenizer type.

          Value is edgeGram.

    • mappings object

      Index specifications for the collection's fields.

      Hide mappings attributes Show mappings attributes object
      • dynamic boolean

        Flag that indicates whether the index uses dynamic or static mappings. Required if mappings.fields is omitted.

        Default value is false.

        Dynamic or Static Mappings
      • fields object

        One or more field specifications for the Atlas Search index. Required if mappings.dynamic is omitted or set to false.

        Atlas Search Index
        Hide fields attribute Show fields attribute object
    • searchAnalyzer string

      Method applied to identify words when searching this index.

      Values are lucene.standard, lucene.simple, lucene.whitespace, lucene.keyword, lucene.arabic, lucene.armenian, lucene.basque, lucene.bengali, lucene.brazilian, lucene.bulgarian, lucene.catalan, lucene.chinese, lucene.cjk, lucene.czech, lucene.danish, lucene.dutch, lucene.english, lucene.finnish, lucene.french, lucene.galician, lucene.german, lucene.greek, lucene.hindi, lucene.hungarian, lucene.indonesian, lucene.irish, lucene.italian, lucene.japanese, lucene.korean, lucene.kuromoji, lucene.latvian, lucene.lithuanian, lucene.morfologik, lucene.nori, lucene.norwegian, lucene.persian, lucene.portuguese, lucene.romanian, lucene.russian, lucene.smartcn, lucene.sorani, lucene.spanish, lucene.swedish, lucene.thai, lucene.turkish, or lucene.ukrainian. Default value is lucene.standard.

    • storedSource object

      Flag that indicates whether to store all fields (true) on Atlas Search. By default, Atlas doesn't store (false) the fields on Atlas Search. Alternatively, you can specify an object that only contains the list of fields to store (include) or not store (exclude) on Atlas Search. To learn more, see documentation.

      Stored Source Fields
    • synonyms array[object]

      Rule sets that map words to their synonyms in this index.

      Synonyms used for this full text index.

      Synonym Mapping
      Hide synonyms attributes Show synonyms attributes object
      • analyzer string Required

        Specific pre-defined method chosen to apply to the synonyms to be searched.

        Values are lucene.standard, lucene.simple, lucene.whitespace, lucene.keyword, lucene.arabic, lucene.armenian, lucene.basque, lucene.bengali, lucene.brazilian, lucene.bulgarian, lucene.catalan, lucene.chinese, lucene.cjk, lucene.czech, lucene.danish, lucene.dutch, lucene.english, lucene.finnish, lucene.french, lucene.galician, lucene.german, lucene.greek, lucene.hindi, lucene.hungarian, lucene.indonesian, lucene.irish, lucene.italian, lucene.japanese, lucene.korean, lucene.kuromoji, lucene.latvian, lucene.lithuanian, lucene.morfologik, lucene.nori, lucene.norwegian, lucene.persian, lucene.portuguese, lucene.romanian, lucene.russian, lucene.smartcn, lucene.sorani, lucene.spanish, lucene.swedish, lucene.thai, lucene.turkish, or lucene.ukrainian.

      • name string Required

        Label that identifies the synonym definition. Each synonym.name must be unique within the same index definition.

      • source object Required

        Data set that stores words and their applicable synonyms.

        Hide source attribute Show source attribute object
        • collection string Required

          Label that identifies the MongoDB collection that stores words and their applicable synonyms.

  • 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

      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.

    • reason string

      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

      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.

    • reason string

      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

      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.

    • reason string

      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

      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.

    • reason string

      Application error message returned with this error.

GET /api/atlas/v2/groups/{groupId}/clusters/{clusterName}/fts/indexes/{databaseName}/{collectionName}
atlas api listAtlasSearchIndexesDeprecated --help
import (
	"os"
	"context"
	"log"
	sdk "go.mongodb.org/atlas-sdk/v20250312001/admin"
)

func main() {
	ctx := context.Background()
	clientID := os.Getenv("MONGODB_ATLAS_CLIENT_ID")
	clientSecret := os.Getenv("MONGODB_ATLAS_CLIENT_SECRET")

	client, err := sdk.NewClient(
		sdk.UseOAuthAuth(clientID, clientSecret),
		sdk.UseBaseURL(url))

	if err != nil {
		log.Fatalf("Error: %v", err)
	}

	params = &sdk.ListAtlasSearchIndexesDeprecatedApiParams{}
	sdkResp, httpResp, err := client.AtlasSearchApi.
		ListAtlasSearchIndexesDeprecatedWithParams(ctx, params).
		Execute()
}
curl --header "Authorization: Bearer ${ACCESS_TOKEN}" \
  --header "Accept: application/vnd.atlas.2025-03-12+json" \
  -X GET "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/fts/indexes/{databaseName}/{collectionName}?pretty=true"
curl --user "${PUBLIC_KEY}:${PRIVATE_KEY}" \
  --digest \
  --header "Accept: application/vnd.atlas.2025-03-12+json" \
  -X GET "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/fts/indexes/{databaseName}/{collectionName}?pretty=true"
Response examples (200)
[
  {
    "collectionName": "string",
    "database": "string",
    "name": "string",
    "numPartitions": 1,
    "type": "search",
    "analyzer": "lucene.standard",
    "analyzers": [
      {
        "charFilters": [
          {
            "ignoredTags": [
              "string"
            ],
            "type": "htmlStrip"
          }
        ],
        "name": "string",
        "tokenFilters": [
          {
            "originalTokens": "omit",
            "type": "asciiFolding"
          }
        ],
        "tokenizer": {
          "maxGram": 42,
          "minGram": 42,
          "type": "edgeGram"
        }
      }
    ],
    "mappings": {
      "dynamic": false,
      "fields": {
        "additionalProperty1": {},
        "additionalProperty2": {}
      }
    },
    "searchAnalyzer": "lucene.standard",
    "storedSource": {
      "include | exclude": [
        "field1",
        "field2"
      ]
    },
    "synonyms": [
      {
        "analyzer": "lucene.standard",
        "name": "string",
        "source": {
          "collection": "string"
        }
      }
    ]
  }
]
Response examples (401)
{
  "error": 401,
  "detail": "(This is just an example, the exception may not be related to this endpoint)",
  "reason": "Unauthorized",
  "errorCode": "NOT_ORG_GROUP_CREATOR"
}
Response examples (403)
{
  "error": 403,
  "detail": "(This is just an example, the exception may not be related to this endpoint)",
  "reason": "Forbidden",
  "errorCode": "CANNOT_CHANGE_GROUP_NAME"
}
Response examples (404)
{
  "error": 404,
  "detail": "(This is just an example, the exception may not be related to this endpoint) Cannot find resource AWS",
  "reason": "Not Found",
  "errorCode": "RESOURCE_NOT_FOUND"
}
Response examples (500)
{
  "error": 500,
  "detail": "(This is just an example, the exception may not be related to this endpoint)",
  "reason": "Internal Server Error",
  "errorCode": "UNEXPECTED_ERROR"
}
































Create One Atlas Search Index

POST /api/atlas/v2/groups/{groupId}/clusters/{clusterName}/search/indexes

Creates one Atlas Search index on the specified collection. Atlas Search indexes define the fields on which to create the index and the analyzers to use when creating the index. Only clusters running MongoDB v4.2 or later can use Atlas Search. To use this resource, the requesting Service Account or API Key must have the Project Data Access Admin role.

Atlas Search Indexes

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

    Name of the cluster that contains the collection on which to create an Atlas Search index.

    Format should match the following pattern: ^[a-zA-Z0-9][a-zA-Z0-9-]*$.

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.

  • pretty boolean

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

    Default value is false.

    Prettyprint
application/vnd.atlas.2024-05-30+json

Body object Required

Creates one Atlas Search index on the specified collection.

One of:

Text Search Index Create Request

  • collectionName string Required

    Label that identifies the collection to create an Atlas Search index in.

  • database string Required

    Label that identifies the database that contains the collection to create an Atlas Search index in.

  • name string Required

    Label that identifies this index. Within each namespace, names of all indexes in the namespace must be unique.

  • type string Discriminator

    Type of the index. The default type is search.

    Value is search.

  • definition object Required

    The text search index definition set by the user.

    Hide definition attributes Show definition attributes object
    • analyzer string

      Specific pre-defined method chosen to convert database field text into searchable words. This conversion reduces the text of fields into the smallest units of text. These units are called a term or token. This process, known as tokenization, involves making the following changes to the text in fields:

      • extracting words
      • removing punctuation
      • removing accents
      • changing to lowercase
      • removing common words
      • reducing words to their root form (stemming)
      • changing words to their base form (lemmatization) MongoDB Cloud uses the process you select to build the Atlas Search index.

      Values are lucene.standard, lucene.simple, lucene.whitespace, lucene.keyword, lucene.arabic, lucene.armenian, lucene.basque, lucene.bengali, lucene.brazilian, lucene.bulgarian, lucene.catalan, lucene.chinese, lucene.cjk, lucene.czech, lucene.danish, lucene.dutch, lucene.english, lucene.finnish, lucene.french, lucene.galician, lucene.german, lucene.greek, lucene.hindi, lucene.hungarian, lucene.indonesian, lucene.irish, lucene.italian, lucene.japanese, lucene.korean, lucene.kuromoji, lucene.latvian, lucene.lithuanian, lucene.morfologik, lucene.nori, lucene.norwegian, lucene.persian, lucene.portuguese, lucene.romanian, lucene.russian, lucene.smartcn, lucene.sorani, lucene.spanish, lucene.swedish, lucene.thai, lucene.turkish, or lucene.ukrainian. Default value is lucene.standard.

      Atlas Search Analyzers
    • analyzers array[object]

      List of user-defined methods to convert database field text into searchable words.

      Custom Atlas Search Analyzers
      Hide analyzers attributes Show analyzers attributes object
      • charFilters array[object]

        Filters that examine text one character at a time and perform filtering operations.

        Hide charFilters attribute Show charFilters attribute object
        • * object Additional properties
      • name string Required

        Name that identifies the custom analyzer. Names must be unique within an index, and must not start with any of the following strings:

        • lucene.
        • builtin.
        • mongodb.
      • tokenFilters array[object]

        Filter that performs operations such as:

        • Stemming, which reduces related words, such as "talking", "talked", and "talks" to their root word "talk".

        • Redaction, which is the removal of sensitive information from public documents.

        Hide tokenFilters attribute Show tokenFilters attribute object
        • * object Additional properties
      • tokenizer object Required

        Tokenizer that you want to use to create tokens. Tokens determine how Atlas Search splits up text into discrete chunks for indexing.

        Hide tokenizer attribute Show tokenizer attribute object
        • * object Additional properties

          Tokenizer that you want to use to create tokens. Tokens determine how Atlas Search splits up text into discrete chunks for indexing.

    • mappings object Required

      Index specifications for the collection's fields.

      Hide mappings attributes Show mappings attributes object
      • dynamic boolean

        Flag that indicates whether the index uses dynamic or static mappings. Required if mappings.fields is omitted.

        Dynamic or Static Mappings
      • fields object

        One or more field specifications for the Atlas Search index. Required if mappings.dynamic is omitted or set to false.

        Atlas Search Index
        Hide fields attribute Show fields attribute object
    • numPartitions integer(int32)

      Number of index partitions. Allowed values are [1, 2, 4].

      Default value is 1.

    • searchAnalyzer string

      Method applied to identify words when searching this index.

      Values are lucene.standard, lucene.simple, lucene.whitespace, lucene.keyword, lucene.arabic, lucene.armenian, lucene.basque, lucene.bengali, lucene.brazilian, lucene.bulgarian, lucene.catalan, lucene.chinese, lucene.cjk, lucene.czech, lucene.danish, lucene.dutch, lucene.english, lucene.finnish, lucene.french, lucene.galician, lucene.german, lucene.greek, lucene.hindi, lucene.hungarian, lucene.indonesian, lucene.irish, lucene.italian, lucene.japanese, lucene.korean, lucene.kuromoji, lucene.latvian, lucene.lithuanian, lucene.morfologik, lucene.nori, lucene.norwegian, lucene.persian, lucene.portuguese, lucene.romanian, lucene.russian, lucene.smartcn, lucene.sorani, lucene.spanish, lucene.swedish, lucene.thai, lucene.turkish, or lucene.ukrainian. Default value is lucene.standard.

    • storedSource object

      Flag that indicates whether to store all fields (true) on Atlas Search. By default, Atlas doesn't store (false) the fields on Atlas Search. Alternatively, you can specify an object that only contains the list of fields to store (include) or not store (exclude) on Atlas Search. To learn more, see Stored Source Fields.

      Stored Source Fields
    • synonyms array[object]

      Rule sets that map words to their synonyms in this index.

      Synonyms used for this full text index.

      Synonym Mapping
      Hide synonyms attributes Show synonyms attributes object
      • analyzer string Required

        Specific pre-defined method chosen to apply to the synonyms to be searched.

        Values are lucene.standard, lucene.simple, lucene.whitespace, lucene.keyword, lucene.arabic, lucene.armenian, lucene.basque, lucene.bengali, lucene.brazilian, lucene.bulgarian, lucene.catalan, lucene.chinese, lucene.cjk, lucene.czech, lucene.danish, lucene.dutch, lucene.english, lucene.finnish, lucene.french, lucene.galician, lucene.german, lucene.greek, lucene.hindi, lucene.hungarian, lucene.indonesian, lucene.irish, lucene.italian, lucene.japanese, lucene.korean, lucene.kuromoji, lucene.latvian, lucene.lithuanian, lucene.morfologik, lucene.nori, lucene.norwegian, lucene.persian, lucene.portuguese, lucene.romanian, lucene.russian, lucene.smartcn, lucene.sorani, lucene.spanish, lucene.swedish, lucene.thai, lucene.turkish, or lucene.ukrainian.

      • name string Required

        Label that identifies the synonym definition. Each synonym.name must be unique within the same index definition.

      • source object Required

        Data set that stores words and their applicable synonyms.

        Hide source attribute Show source attribute object
        • collection string Required

          Label that identifies the MongoDB collection that stores words and their applicable synonyms.

Responses

  • 201 application/vnd.atlas.2024-05-30+json

    Created

    One of:
    Hide attributes Show attributes
    • collectionName string

      Label that identifies the collection that contains one or more Atlas Search indexes.

    • database string

      Label that identifies the database that contains the collection with one or more Atlas Search indexes.

    • indexID string

      Unique 24-hexadecimal digit string that identifies this Atlas Search index.

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

    • latestDefinition object

      The text search index definition set by the user.

      Hide latestDefinition attributes Show latestDefinition attributes object
      • numPartitions integer(int32)

        Number of index partitions. Allowed values are [1, 2, 4].

        Default value is 1.

      • analyzer string

        Specific pre-defined method chosen to convert database field text into searchable words. This conversion reduces the text of fields into the smallest units of text. These units are called a term or token. This process, known as tokenization, involves making the following changes to the text in fields:

        • extracting words
        • removing punctuation
        • removing accents
        • changing to lowercase
        • removing common words
        • reducing words to their root form (stemming)
        • changing words to their base form (lemmatization) MongoDB Cloud uses the process you select to build the Atlas Search index.

        Values are lucene.standard, lucene.simple, lucene.whitespace, lucene.keyword, lucene.arabic, lucene.armenian, lucene.basque, lucene.bengali, lucene.brazilian, lucene.bulgarian, lucene.catalan, lucene.chinese, lucene.cjk, lucene.czech, lucene.danish, lucene.dutch, lucene.english, lucene.finnish, lucene.french, lucene.galician, lucene.german, lucene.greek, lucene.hindi, lucene.hungarian, lucene.indonesian, lucene.irish, lucene.italian, lucene.japanese, lucene.korean, lucene.kuromoji, lucene.latvian, lucene.lithuanian, lucene.morfologik, lucene.nori, lucene.norwegian, lucene.persian, lucene.portuguese, lucene.romanian, lucene.russian, lucene.smartcn, lucene.sorani, lucene.spanish, lucene.swedish, lucene.thai, lucene.turkish, or lucene.ukrainian. Default value is lucene.standard.

        Atlas Search Analyzers
      • analyzers array[object]

        List of user-defined methods to convert database field text into searchable words.

        Custom Atlas Search Analyzers
        Hide analyzers attributes Show analyzers attributes object
        • charFilters array[object]

          Filters that examine text one character at a time and perform filtering operations.

          Hide charFilters attribute Show charFilters attribute object
          • * object Additional properties
        • name string Required

          Name that identifies the custom analyzer. Names must be unique within an index, and must not start with any of the following strings:

          • lucene.
          • builtin.
          • mongodb.
        • tokenFilters array[object]

          Filter that performs operations such as:

          • Stemming, which reduces related words, such as "talking", "talked", and "talks" to their root word "talk".

          • Redaction, which is the removal of sensitive information from public documents.

          Hide tokenFilters attribute Show tokenFilters attribute object
          • * object Additional properties
        • tokenizer object Required

          Tokenizer that you want to use to create tokens. Tokens determine how Atlas Search splits up text into discrete chunks for indexing.

          Hide tokenizer attribute Show tokenizer attribute object
          • * object Additional properties

            Tokenizer that you want to use to create tokens. Tokens determine how Atlas Search splits up text into discrete chunks for indexing.

      • mappings object Required

        Index specifications for the collection's fields.

        Hide mappings attributes Show mappings attributes object
        • dynamic boolean

          Flag that indicates whether the index uses dynamic or static mappings. Required if mappings.fields is omitted.

          Dynamic or Static Mappings
        • fields object

          One or more field specifications for the Atlas Search index. Required if mappings.dynamic is omitted or set to false.

          Atlas Search Index
          Hide fields attribute Show fields attribute object
      • searchAnalyzer string

        Method applied to identify words when searching this index.

        Values are lucene.standard, lucene.simple, lucene.whitespace, lucene.keyword, lucene.arabic, lucene.armenian, lucene.basque, lucene.bengali, lucene.brazilian, lucene.bulgarian, lucene.catalan, lucene.chinese, lucene.cjk, lucene.czech, lucene.danish, lucene.dutch, lucene.english, lucene.finnish, lucene.french, lucene.galician, lucene.german, lucene.greek, lucene.hindi, lucene.hungarian, lucene.indonesian, lucene.irish, lucene.italian, lucene.japanese, lucene.korean, lucene.kuromoji, lucene.latvian, lucene.lithuanian, lucene.morfologik, lucene.nori, lucene.norwegian, lucene.persian, lucene.portuguese, lucene.romanian, lucene.russian, lucene.smartcn, lucene.sorani, lucene.spanish, lucene.swedish, lucene.thai, lucene.turkish, or lucene.ukrainian. Default value is lucene.standard.

      • storedSource object

        Flag that indicates whether to store all fields (true) on Atlas Search. By default, Atlas doesn't store (false) the fields on Atlas Search. Alternatively, you can specify an object that only contains the list of fields to store (include) or not store (exclude) on Atlas Search. To learn more, see Stored Source Fields.

        Stored Source Fields
      • synonyms array[object]

        Rule sets that map words to their synonyms in this index.

        Synonyms used for this full text index.

        Synonym Mapping
        Hide synonyms attributes Show synonyms attributes object
        • analyzer string Required

          Specific pre-defined method chosen to apply to the synonyms to be searched.

          Values are lucene.standard, lucene.simple, lucene.whitespace, lucene.keyword, lucene.arabic, lucene.armenian, lucene.basque, lucene.bengali, lucene.brazilian, lucene.bulgarian, lucene.catalan, lucene.chinese, lucene.cjk, lucene.czech, lucene.danish, lucene.dutch, lucene.english, lucene.finnish, lucene.french, lucene.galician, lucene.german, lucene.greek, lucene.hindi, lucene.hungarian, lucene.indonesian, lucene.irish, lucene.italian, lucene.japanese, lucene.korean, lucene.kuromoji, lucene.latvian, lucene.lithuanian, lucene.morfologik, lucene.nori, lucene.norwegian, lucene.persian, lucene.portuguese, lucene.romanian, lucene.russian, lucene.smartcn, lucene.sorani, lucene.spanish, lucene.swedish, lucene.thai, lucene.turkish, or lucene.ukrainian.

        • name string Required

          Label that identifies the synonym definition. Each synonym.name must be unique within the same index definition.

        • source object Required

          Data set that stores words and their applicable synonyms.

          Hide source attribute Show source attribute object
          • collection string Required

            Label that identifies the MongoDB collection that stores words and their applicable synonyms.

    • latestDefinitionVersion object

      Object which includes the version number of the index definition and the time that the index definition was created.

      Hide latestDefinitionVersion attributes Show latestDefinitionVersion attributes object
      • createdAt string(date-time)

        The time at which this index definition was created. This parameter expresses its value in the ISO 8601 timestamp format in UTC.

      • version integer(int64)

        The version number associated with this index definition when it was created.

    • name string

      Label that identifies this index. Within each namespace, the names of all indexes must be unique.

    • queryable boolean

      Flag that indicates whether the index is queryable on all hosts.

    • status string

      Condition of the search index when you made this request.

      • DELETING: The index is being deleted.
      • FAILED The index build failed. Indexes can enter the FAILED state due to an invalid index definition.
      • STALE: The index is queryable but has stopped replicating data from the indexed collection. Searches on the index may return out-of-date data.
      • PENDING: Atlas has not yet started building the index.
      • BUILDING: Atlas is building or re-building the index after an edit.
      • READY: The index is ready and can support queries.

      Values are DELETING, FAILED, STALE, PENDING, BUILDING, READY, or DOES_NOT_EXIST.

    • statusDetail array[object]

      List of documents detailing index status on each host.

      Hide statusDetail attributes Show statusDetail attributes object
      • hostname string

        Hostname that corresponds to the status detail.

      • mainIndex object

        Contains status information about the active index.

        Hide mainIndex attributes Show mainIndex attributes object
        • definition object

          The search index definition set by the user.

          Hide definition attribute Show definition attribute object
          • numPartitions integer(int32)

            Number of index partitions. Allowed values are [1, 2, 4].

            Default value is 1.

        • definitionVersion object

          Object which includes the version number of the index definition and the time that the index definition was created.

          Hide definitionVersion attributes Show definitionVersion attributes object
          • createdAt string(date-time)

            The time at which this index definition was created. This parameter expresses its value in the ISO 8601 timestamp format in UTC.

          • version integer(int64)

            The version number associated with this index definition when it was created.

        • message string

          Optional message describing an error.

        • queryable boolean

          Flag that indicates whether the index generation is queryable on the host.

        • status string

          Condition of the search index when you made this request.

          • DELETING: The index is being deleted.
          • FAILED The index build failed. Indexes can enter the FAILED state due to an invalid index definition.
          • STALE: The index is queryable but has stopped replicating data from the indexed collection. Searches on the index may return out-of-date data.
          • PENDING: Atlas has not yet started building the index.
          • BUILDING: Atlas is building or re-building the index after an edit.
          • READY: The index is ready and can support queries.

          Values are DELETING, FAILED, STALE, PENDING, BUILDING, READY, or DOES_NOT_EXIST.

      • queryable boolean

        Flag that indicates whether the index is queryable on the host.

      • stagedIndex object

        Contains status information about an index building in the background.

        Hide stagedIndex attributes Show stagedIndex attributes object
        • definition object

          The search index definition set by the user.

          Hide definition attribute Show definition attribute object
          • numPartitions integer(int32)

            Number of index partitions. Allowed values are [1, 2, 4].

            Default value is 1.

        • definitionVersion object

          Object which includes the version number of the index definition and the time that the index definition was created.

          Hide definitionVersion attributes Show definitionVersion attributes object
          • createdAt string(date-time)

            The time at which this index definition was created. This parameter expresses its value in the ISO 8601 timestamp format in UTC.

          • version integer(int64)

            The version number associated with this index definition when it was created.

        • message string

          Optional message describing an error.

        • queryable boolean

          Flag that indicates whether the index generation is queryable on the host.

        • status string

          Condition of the search index when you made this request.

          • DELETING: The index is being deleted.
          • FAILED The index build failed. Indexes can enter the FAILED state due to an invalid index definition.
          • STALE: The index is queryable but has stopped replicating data from the indexed collection. Searches on the index may return out-of-date data.
          • PENDING: Atlas has not yet started building the index.
          • BUILDING: Atlas is building or re-building the index after an edit.
          • READY: The index is ready and can support queries.

          Values are DELETING, FAILED, STALE, PENDING, BUILDING, READY, or DOES_NOT_EXIST.

      • status string

        Condition of the search index when you made this request.

        • DELETING: The index is being deleted.
        • FAILED The index build failed. Indexes can enter the FAILED state due to an invalid index definition.
        • STALE: The index is queryable but has stopped replicating data from the indexed collection. Searches on the index may return out-of-date data.
        • PENDING: Atlas has not yet started building the index.
        • BUILDING: Atlas is building or re-building the index after an edit.
        • READY: The index is ready and can support queries.

        Values are DELETING, FAILED, STALE, PENDING, BUILDING, READY, or DOES_NOT_EXIST.

    • type string Discriminator

      Type of the index. The default type is search.

      Value is search.

    • synonymMappingStatus string

      Status that describes this index's synonym mappings. This status appears only if the index has synonyms defined.

      Values are FAILED, BUILDING, or READY.

    • synonymMappingStatusDetail array[object]

      A list of documents describing the status of the index's synonym mappings on each search host. Only appears if the index has synonyms defined.

      Hide synonymMappingStatusDetail attribute Show synonymMappingStatusDetail attribute object
      • * object Additional properties

        Contains the status of the index's synonym mappings on each search host. This field (and its subfields) only appear if the index has synonyms defined.

        Hide * attributes Show * attributes object
        • message string

          Optional message describing an error.

        • queryable boolean

          Flag that indicates whether the synonym mapping is queryable on a host.

        • status string

          Status that describes this index's synonym mappings. This status appears only if the index has synonyms defined.

          Values are FAILED, BUILDING, or READY.

  • 400 application/json

    Bad Request.

    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

      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.

    • reason string

      Application error message returned with this error.

  • 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

      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.

    • reason string

      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

      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.

    • reason string

      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

      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.

    • reason string

      Application error message returned with this error.

  • 409 application/json

    Conflict.

    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

      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.

    • reason string

      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

      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.

    • reason string

      Application error message returned with this error.

POST /api/atlas/v2/groups/{groupId}/clusters/{clusterName}/search/indexes
atlas api createAtlasSearchIndex --help
import (
	"os"
	"context"
	"log"
	sdk "go.mongodb.org/atlas-sdk/v20250312001/admin"
)

func main() {
	ctx := context.Background()
	clientID := os.Getenv("MONGODB_ATLAS_CLIENT_ID")
	clientSecret := os.Getenv("MONGODB_ATLAS_CLIENT_SECRET")

	client, err := sdk.NewClient(
		sdk.UseOAuthAuth(clientID, clientSecret),
		sdk.UseBaseURL(url))

	if err != nil {
		log.Fatalf("Error: %v", err)
	}

	params = &sdk.CreateAtlasSearchIndexApiParams{}
	sdkResp, httpResp, err := client.AtlasSearchApi.
		CreateAtlasSearchIndexWithParams(ctx, params).
		Execute()
}
curl --header "Authorization: Bearer ${ACCESS_TOKEN}" \
  --header "Accept: application/vnd.atlas.2025-03-12+json" \
  --header "Content-Type: application/json" \
  -X POST "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/search/indexes" \
  -d '{ <Payload> }'
curl --user "${PUBLIC_KEY}:${PRIVATE_KEY}" \
  --digest \
  --header "Accept: application/vnd.atlas.2025-03-12+json" \
  --header "Content-Type: application/json" \
  -X POST "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/search/indexes" \
  -d '{ <Payload> }'
Request examples
{
  "collectionName": "string",
  "database": "string",
  "name": "string",
  "type": "search",
  "definition": {
    "analyzer": "lucene.standard",
    "analyzers": [
      {
        "charFilters": [
          {
            "additionalProperty1": {},
            "additionalProperty2": {}
          }
        ],
        "name": "string",
        "tokenFilters": [
          {
            "additionalProperty1": {},
            "additionalProperty2": {}
          }
        ],
        "tokenizer": {
          "additionalProperty1": {},
          "additionalProperty2": {}
        }
      }
    ],
    "mappings": {
      "dynamic": true,
      "fields": {
        "additionalProperty1": {},
        "additionalProperty2": {}
      }
    },
    "numPartitions": 1,
    "searchAnalyzer": "lucene.standard",
    "storedSource": {
      "include | exclude": [
        "field1",
        "field2"
      ]
    },
    "synonyms": [
      {
        "analyzer": "lucene.standard",
        "name": "string",
        "source": {
          "collection": "string"
        }
      }
    ]
  }
}
{
  "collectionName": "string",
  "database": "string",
  "name": "string",
  "type": "search",
  "definition": {
    "fields": [
      {
        "additionalProperty1": {},
        "additionalProperty2": {}
      }
    ],
    "numPartitions": 1
  }
}
Response examples (201)
{
  "collectionName": "string",
  "database": "string",
  "indexID": "32b6e34b3d91647abb20e7b8",
  "latestDefinition": {
    "numPartitions": 1,
    "analyzer": "lucene.standard",
    "analyzers": [
      {
        "charFilters": [
          {
            "additionalProperty1": {},
            "additionalProperty2": {}
          }
        ],
        "name": "string",
        "tokenFilters": [
          {
            "additionalProperty1": {},
            "additionalProperty2": {}
          }
        ],
        "tokenizer": {
          "additionalProperty1": {},
          "additionalProperty2": {}
        }
      }
    ],
    "mappings": {
      "dynamic": true,
      "fields": {
        "additionalProperty1": {},
        "additionalProperty2": {}
      }
    },
    "searchAnalyzer": "lucene.standard",
    "storedSource": {
      "include | exclude": [
        "field1",
        "field2"
      ]
    },
    "synonyms": [
      {
        "analyzer": "lucene.standard",
        "name": "string",
        "source": {
          "collection": "string"
        }
      }
    ]
  },
  "latestDefinitionVersion": {
    "createdAt": "2025-05-04T09:42:00Z",
    "version": 42
  },
  "name": "string",
  "queryable": true,
  "status": "DELETING",
  "statusDetail": [
    {
      "hostname": "string",
      "mainIndex": {
        "definition": {
          "numPartitions": 1
        },
        "definitionVersion": {
          "createdAt": "2025-05-04T09:42:00Z",
          "version": 42
        },
        "message": "string",
        "queryable": true,
        "status": "DELETING"
      },
      "queryable": true,
      "stagedIndex": {
        "definition": {
          "numPartitions": 1
        },
        "definitionVersion": {
          "createdAt": "2025-05-04T09:42:00Z",
          "version": 42
        },
        "message": "string",
        "queryable": true,
        "status": "DELETING"
      },
      "status": "DELETING"
    }
  ],
  "type": "search",
  "synonymMappingStatus": "FAILED",
  "synonymMappingStatusDetail": [
    {
      "additionalProperty1": {
        "message": "string",
        "queryable": true,
        "status": "FAILED"
      },
      "additionalProperty2": {
        "message": "string",
        "queryable": true,
        "status": "FAILED"
      }
    }
  ]
}
{
  "collectionName": "string",
  "database": "string",
  "indexID": "32b6e34b3d91647abb20e7b8",
  "latestDefinition": {
    "numPartitions": 1,
    "fields": [
      {
        "additionalProperty1": {},
        "additionalProperty2": {}
      }
    ]
  },
  "latestDefinitionVersion": {
    "createdAt": "2025-05-04T09:42:00Z",
    "version": 42
  },
  "name": "string",
  "queryable": true,
  "status": "DELETING",
  "statusDetail": [
    {
      "hostname": "string",
      "mainIndex": {
        "definition": {
          "numPartitions": 1
        },
        "definitionVersion": {
          "createdAt": "2025-05-04T09:42:00Z",
          "version": 42
        },
        "message": "string",
        "queryable": true,
        "status": "DELETING"
      },
      "queryable": true,
      "stagedIndex": {
        "definition": {
          "numPartitions": 1
        },
        "definitionVersion": {
          "createdAt": "2025-05-04T09:42:00Z",
          "version": 42
        },
        "message": "string",
        "queryable": true,
        "status": "DELETING"
      },
      "status": "DELETING"
    }
  ],
  "type": "search"
}
Response examples (400)
{
  "error": 400,
  "detail": "(This is just an example, the exception may not be related to this endpoint) No provider AWS exists.",
  "reason": "Bad Request",
  "errorCode": "VALIDATION_ERROR"
}
Response examples (401)
{
  "error": 401,
  "detail": "(This is just an example, the exception may not be related to this endpoint)",
  "reason": "Unauthorized",
  "errorCode": "NOT_ORG_GROUP_CREATOR"
}
Response examples (403)
{
  "error": 403,
  "detail": "(This is just an example, the exception may not be related to this endpoint)",
  "reason": "Forbidden",
  "errorCode": "CANNOT_CHANGE_GROUP_NAME"
}
Response examples (404)
{
  "error": 404,
  "detail": "(This is just an example, the exception may not be related to this endpoint) Cannot find resource AWS",
  "reason": "Not Found",
  "errorCode": "RESOURCE_NOT_FOUND"
}
Response examples (409)
{
  "error": 409,
  "detail": "(This is just an example, the exception may not be related to this endpoint) Cannot delete organization link while there is active migration in following project ids: 60c4fd418ebe251047c50554",
  "reason": "Conflict",
  "errorCode": "CANNOT_DELETE_ORG_ACTIVE_LIVE_MIGRATION_ATLAS_ORG_LINK"
}
Response examples (500)
{
  "error": 500,
  "detail": "(This is just an example, the exception may not be related to this endpoint)",
  "reason": "Internal Server Error",
  "errorCode": "UNEXPECTED_ERROR"
}































































































Return One Restore Job for One Cluster

GET /api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs/{restoreJobId}

Returns one cloud backup restore job for one cluster from the specified project. To use this resource, the requesting Service Account or API Key must have the Project Backup Manager role.

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 with the restore jobs you want to return.

    Format should match the following pattern: ^[a-zA-Z0-9][a-zA-Z0-9-]*$.

  • restoreJobId string Required

    Unique 24-hexadecimal digit string that identifies the restore job to return.

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

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.

  • pretty boolean

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

    Default value is false.

    Prettyprint

Responses

  • 200 application/vnd.atlas.2023-01-01+json

    OK

    Hide response attributes Show response attributes object
    • cancelled boolean

      Flag that indicates whether someone canceled this restore job.

    • components array[object]

      Information on the restore job for each replica set in the sharded cluster.

      Hide components attributes Show components attributes object
      • downloadUrl string

        One Uniform Resource Locator that points to the compressed snapshot files for manual download. MongoDB Cloud returns this parameter when "deliveryType" : "download".

      • privateDownloadDeliveryUrls array[object]

        One or more Uniform Resource Locators (URLs) that point to the compressed snapshot files for manual download and the corresponding private endpoint(s). MongoDB Cloud returns this parameter when "deliveryType" : "download" and the download can be performed privately.

        One Uniform Resource Locator (URL) that points to the compressed snapshot files for manual download and the corresponding private endpoint.

        Hide privateDownloadDeliveryUrls attributes Show privateDownloadDeliveryUrls attributes object
        • deliveryUrl string

          One Uniform Resource Locator that points to the compressed snapshot files for manual download.

        • endpointId string

          Unique 22-character alphanumeric string that identifies the private endpoint.

          Format should match the following pattern: ^vpce-[0-9a-f]{17}$.

      • replicaSetName string

        Human-readable label that identifies the replica set on the sharded cluster.

    • deliveryType string Required

      Human-readable label that categorizes the restore job to create.

      Values are automated, download, or pointInTime.

    • deliveryUrl array[string]

      One or more Uniform Resource Locators (URLs) that point to the compressed snapshot files for manual download. MongoDB Cloud returns this parameter when "deliveryType" : "download".

    • desiredTimestamp object

      BSON timestamp that indicates when the checkpoint token entry in the oplog occurred.

      Hide desiredTimestamp attributes Show desiredTimestamp attributes object
      • date string(date-time)

        Date and time when the oplog recorded this database operation. This parameter expresses its value in the ISO 8601 timestamp format in UTC.

      • increment integer(int32)

        Order of the database operation that the oplog recorded at specific date and time.

        Minimum value is 1199145600.

    • expired boolean

      Flag that indicates whether the restore job expired.

    • expiresAt string(date-time)

      Date and time when the restore job expires. This parameter expresses its value in the ISO 8601 timestamp format in UTC.

    • failed boolean

      Flag that indicates whether the restore job failed.

    • finishedAt string(date-time)

      Date and time when the restore job completed. This parameter expresses its value in the ISO 8601 timestamp format in UTC.

    • id string

      Unique 24-hexadecimal character string that identifies the restore job.

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

    • oplogInc integer(int32)

      Oplog operation number from which you want to restore this snapshot. This number represents the second part of an Oplog timestamp. The resource returns this parameter when "deliveryType" : "pointInTime" and oplogTs exceeds 0.

      Minimum value is 1.

    • oplogTs integer(int32)

      Date and time from which you want to restore this snapshot. This parameter expresses this timestamp in the number of seconds that have elapsed since the UNIX epoch. This number represents the first part of an Oplog timestamp. The resource returns this parameter when "deliveryType" : "pointInTime" and oplogTs exceeds 0.

      Minimum value is 1199145600.

    • pointInTimeUTCSeconds integer(int32)

      Date and time from which MongoDB Cloud restored this snapshot. This parameter expresses this timestamp in the number of seconds that have elapsed since the UNIX epoch. The resource returns this parameter when "deliveryType" : "pointInTime" and pointInTimeUTCSeconds exceeds 0.

      Minimum value is 1199145600.

    • privateDownloadDeliveryUrls array[object]

      One or more Uniform Resource Locators (URLs) that point to the compressed snapshot files for manual download and the corresponding private endpoint(s). MongoDB Cloud returns this parameter when "deliveryType" : "download" and the download can be performed privately.

      One Uniform Resource Locator (URL) that points to the compressed snapshot files for manual download and the corresponding private endpoint.

      Hide privateDownloadDeliveryUrls attributes Show privateDownloadDeliveryUrls attributes object
      • deliveryUrl string

        One Uniform Resource Locator that points to the compressed snapshot files for manual download.

      • endpointId string

        Unique 22-character alphanumeric string that identifies the private endpoint.

        Format should match the following pattern: ^vpce-[0-9a-f]{17}$.

    • snapshotId string

      Unique 24-hexadecimal character string that identifies the snapshot.

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

    • targetClusterName string

      Human-readable label that identifies the target cluster to which the restore job restores the snapshot. The resource returns this parameter when "deliveryType": "automated". Required for automated and pointInTime restore types.

      Format should match the following pattern: ^[a-zA-Z0-9][a-zA-Z0-9-]*$.

    • targetGroupId string

      Unique 24-hexadecimal digit string that identifies the target project for the specified targetClusterName. Required for automated and pointInTime restore types.

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

    • timestamp string(date-time)

      Date and time when MongoDB Cloud took the snapshot associated with snapshotId. This parameter expresses its value in the ISO 8601 timestamp format in UTC.

  • 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

      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.

    • reason string

      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

      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.

    • reason string

      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

      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.

    • reason string

      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

      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.

    • reason string

      Application error message returned with this error.

GET /api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs/{restoreJobId}
atlas api getBackupRestoreJob --help
import (
	"os"
	"context"
	"log"
	sdk "go.mongodb.org/atlas-sdk/v20250312001/admin"
)

func main() {
	ctx := context.Background()
	clientID := os.Getenv("MONGODB_ATLAS_CLIENT_ID")
	clientSecret := os.Getenv("MONGODB_ATLAS_CLIENT_SECRET")

	client, err := sdk.NewClient(
		sdk.UseOAuthAuth(clientID, clientSecret),
		sdk.UseBaseURL(url))

	if err != nil {
		log.Fatalf("Error: %v", err)
	}

	params = &sdk.GetBackupRestoreJobApiParams{}
	sdkResp, httpResp, err := client.CloudBackupsApi.
		GetBackupRestoreJobWithParams(ctx, params).
		Execute()
}
curl --header "Authorization: Bearer ${ACCESS_TOKEN}" \
  --header "Accept: application/vnd.atlas.2025-03-12+json" \
  -X GET "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs/{restoreJobId}?pretty=true"
curl --user "${PUBLIC_KEY}:${PRIVATE_KEY}" \
  --digest \
  --header "Accept: application/vnd.atlas.2025-03-12+json" \
  -X GET "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/restoreJobs/{restoreJobId}?pretty=true"
Response examples (200)
{
  "cancelled": true,
  "components": [
    {
      "downloadUrl": "string",
      "privateDownloadDeliveryUrls": [
        {
          "deliveryUrl": "string",
          "endpointId": "vpce-3bf78b0ddee411ba1"
        }
      ],
      "replicaSetName": "string"
    }
  ],
  "deliveryType": "automated",
  "deliveryUrl": [
    "string"
  ],
  "desiredTimestamp": {
    "date": "2025-05-04T09:42:00Z",
    "increment": 1199145600
  },
  "expired": true,
  "expiresAt": "2025-05-04T09:42:00Z",
  "failed": true,
  "finishedAt": "2025-05-04T09:42:00Z",
  "id": "32b6e34b3d91647abb20e7b8",
  "links": [
    {
      "href": "https://cloud.mongodb.com/api/atlas",
      "rel": "self"
    }
  ],
  "oplogInc": 1,
  "oplogTs": 42,
  "pointInTimeUTCSeconds": 42,
  "privateDownloadDeliveryUrls": [
    {
      "deliveryUrl": "string",
      "endpointId": "vpce-3bf78b0ddee411ba1"
    }
  ],
  "snapshotId": "32b6e34b3d91647abb20e7b8",
  "targetClusterName": "string",
  "targetGroupId": "32b6e34b3d91647abb20e7b8",
  "timestamp": "2025-05-04T09:42:00Z"
}
Response examples (401)
{
  "error": 401,
  "detail": "(This is just an example, the exception may not be related to this endpoint)",
  "reason": "Unauthorized",
  "errorCode": "NOT_ORG_GROUP_CREATOR"
}
Response examples (403)
{
  "error": 403,
  "detail": "(This is just an example, the exception may not be related to this endpoint)",
  "reason": "Forbidden",
  "errorCode": "CANNOT_CHANGE_GROUP_NAME"
}
Response examples (404)
{
  "error": 404,
  "detail": "(This is just an example, the exception may not be related to this endpoint) Cannot find resource AWS",
  "reason": "Not Found",
  "errorCode": "RESOURCE_NOT_FOUND"
}
Response examples (500)
{
  "error": 500,
  "detail": "(This is just an example, the exception may not be related to this endpoint)",
  "reason": "Internal Server Error",
  "errorCode": "UNEXPECTED_ERROR"
}




Return One Cloud Backup Schedule

GET /api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/schedule

Returns the cloud backup schedule for the specified cluster within the specified project. This schedule defines when MongoDB Cloud takes scheduled snapshots and how long it stores those snapshots. To use this resource, the requesting Service Account or API Key must have the Project Read Only role. Deprecated versions: v2-{2023-01-01}

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.

    Format should match the following pattern: ^[a-zA-Z0-9][a-zA-Z0-9-]*$.

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.

  • pretty boolean

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

    Default value is false.

    Prettyprint

Responses

  • 200 application/vnd.atlas.2024-08-05+json

    OK

    Hide response attributes Show response attributes object
    • autoExportEnabled boolean

      Flag that indicates whether MongoDB Cloud automatically exports Cloud Backup Snapshots to the Export Bucket.

    • clusterId string

      Unique 24-hexadecimal digit string that identifies the cluster with the Snapshot you want to return.

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

    • clusterName string

      Human-readable label that identifies the cluster with the Snapshot you want to return.

      Format should match the following pattern: ^[a-zA-Z0-9][a-zA-Z0-9-]*$.

    • copySettings array[object]

      List that contains a document for each copy setting item in the desired backup policy.

      Copy setting item in the desired backup policy.

      Hide copySettings attributes Show copySettings attributes object
      • cloudProvider string

        Human-readable label that identifies the cloud provider that stores the snapshot copy.

        Values are AWS, AZURE, or GCP.

      • frequencies array[string]

        List that describes which types of snapshots to copy.

        Values are HOURLY, DAILY, WEEKLY, MONTHLY, YEARLY, or ON_DEMAND.

      • regionName string

        Target region to copy snapshots belonging to zoneId. Please supply the 'Atlas Region'.

        Cloud Provider Regions
      • shouldCopyOplogs boolean

        Flag that indicates whether to copy the oplogs to the target region. You can use the oplogs to perform point-in-time restores.

      • zoneId string Required

        Unique 24-hexadecimal digit string that identifies the zone in a cluster. For global clusters, there can be multiple zones to choose from. For sharded clusters and replica set clusters, there is only one zone in the cluster. To find the Zone Id, do a GET request to Return One Cluster from One Project and consult the replicationSpecs array.

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

        Return One Cluster From One Project
    • export object

      Policy for automatically exporting Cloud Backup Snapshots.

      Hide export attributes Show export attributes object
      • exportBucketId string

        Unique 24-hexadecimal character string that identifies the Export Bucket.

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

      • frequencyType string

        Human-readable label that indicates the rate at which the export policy item occurs.

        Values are monthly or yearly.

    • extraRetentionSettings array[object]

      List that contains a document for each extra retention setting item in the desired backup policy.

      extra retention setting item in the desired backup policy.

      Hide extraRetentionSettings attributes Show extraRetentionSettings attributes object
      • frequencyType string

        The frequency type for the extra retention settings for the cluster.

        Values are HOURLY, DAILY, WEEKLY, MONTHLY, YEARLY, or ON_DEMAND.

      • retentionDays integer(int32)

        The number of extra retention days for the cluster.

    • nextSnapshot string(date-time)

      Date and time when MongoDB Cloud takes the next Snapshot. This parameter expresses its value in the ISO 8601 timestamp format in UTC.

    • policies array[object]

      Rules set for this backup schedule.

      List that contains a document for each backup policy item in the desired backup policy.

      Not more than 1 element.

      Hide policies attributes Show policies attributes object
      • id string

        Unique 24-hexadecimal digit string that identifies this backup policy.

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

      • policyItems array[object]

        List that contains the specifications for one policy.

        Specifications for one policy.

        Hide policyItems attributes Show policyItems attributes object
        • frequencyInterval integer(int32) Required

          Number that indicates the frequency interval for a set of Snapshots. A value of 1 specifies the first instance of the corresponding frequencyType.

          • In a yearly policy item, 1 indicates that the yearly Snapshot occurs on the first day of January and 12 indicates the first day of December.

          • In a monthly policy item, 1 indicates that the monthly Snapshot occurs on the first day of the month and 40 indicates the last day of the month.

          • In a weekly policy item, 1 indicates that the weekly Snapshot occurs on Monday and 7 indicates Sunday.

          • In an hourly policy item, you can set the frequency interval to 1, 2, 4, 6, 8, or 12. For hourly policy items for NVMe clusters, MongoDB Cloud accepts only 12 as the frequency interval value.

          MongoDB Cloud ignores this setting for non-hourly policy items in Backup Compliance Policy settings.

          Values are 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, or 40.

        • frequencyType string Required

          Human-readable label that identifies the frequency type associated with the backup policy.

          Values are daily, hourly, weekly, monthly, yearly, or ondemand.

        • id string

          Unique 24-hexadecimal digit string that identifies this backup policy item.

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

        • retentionUnit string Required

          Unit of time in which MongoDB Cloud measures Snapshot retention.

          Values are days, weeks, months, or years.

        • retentionValue integer(int32) Required

          Duration in days, weeks, months, or years that MongoDB Cloud retains the Snapshot. For less frequent policy items, MongoDB Cloud requires that you specify a value greater than or equal to the value specified for more frequent policy items.

          For example: If the hourly policy item specifies a retention of two days, you must specify two days or greater for the retention of the weekly policy item.

    • referenceHourOfDay integer(int32)

      Hour of day in Coordinated Universal Time (UTC) that represents when MongoDB Cloud takes the Snapshot.

    • referenceMinuteOfHour integer(int32)

      Minute of the referenceHourOfDay that represents when MongoDB Cloud takes the Snapshot.

    • restoreWindowDays integer(int32)

      Number of previous days that you can restore back to with Continuous Cloud Backup accuracy. You must specify a positive, non-zero integer. This parameter applies to continuous Cloud Backups only.

    • useOrgAndGroupNamesInExportPrefix boolean

      Flag that indicates whether to use organization and project names instead of organization and project UUIDs in the path to the metadata files that MongoDB Cloud uploads to your Export Bucket.

  • 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

      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.

    • reason string

      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

      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.

    • reason string

      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

      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.

    • reason string

      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

      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.

    • reason string

      Application error message returned with this error.

GET /api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/schedule
atlas api getBackupSchedule --help
import (
	"os"
	"context"
	"log"
	sdk "go.mongodb.org/atlas-sdk/v20250312001/admin"
)

func main() {
	ctx := context.Background()
	clientID := os.Getenv("MONGODB_ATLAS_CLIENT_ID")
	clientSecret := os.Getenv("MONGODB_ATLAS_CLIENT_SECRET")

	client, err := sdk.NewClient(
		sdk.UseOAuthAuth(clientID, clientSecret),
		sdk.UseBaseURL(url))

	if err != nil {
		log.Fatalf("Error: %v", err)
	}

	params = &sdk.GetBackupScheduleApiParams{}
	sdkResp, httpResp, err := client.CloudBackupsApi.
		GetBackupScheduleWithParams(ctx, params).
		Execute()
}
curl --header "Authorization: Bearer ${ACCESS_TOKEN}" \
  --header "Accept: application/vnd.atlas.2025-03-12+json" \
  -X GET "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/schedule?pretty=true"
curl --user "${PUBLIC_KEY}:${PRIVATE_KEY}" \
  --digest \
  --header "Accept: application/vnd.atlas.2025-03-12+json" \
  -X GET "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/schedule?pretty=true"
Response examples (200)
{
  "autoExportEnabled": true,
  "clusterId": "32b6e34b3d91647abb20e7b8",
  "clusterName": "string",
  "copySettings": [
    {
      "cloudProvider": "AWS",
      "frequencies": [
        "HOURLY"
      ],
      "regionName": "string",
      "shouldCopyOplogs": true,
      "zoneId": "32b6e34b3d91647abb20e7b8"
    }
  ],
  "export": {
    "exportBucketId": "32b6e34b3d91647abb20e7b8",
    "frequencyType": "monthly"
  },
  "extraRetentionSettings": [
    {
      "frequencyType": "HOURLY",
      "retentionDays": 42
    }
  ],
  "links": [
    {
      "href": "https://cloud.mongodb.com/api/atlas",
      "rel": "self"
    }
  ],
  "nextSnapshot": "2025-05-04T09:42:00Z",
  "policies": [
    {
      "id": "32b6e34b3d91647abb20e7b8",
      "policyItems": [
        {
          "frequencyInterval": 1,
          "frequencyType": "daily",
          "id": "32b6e34b3d91647abb20e7b8",
          "retentionUnit": "days",
          "retentionValue": 42
        }
      ]
    }
  ],
  "referenceHourOfDay": 42,
  "referenceMinuteOfHour": 42,
  "restoreWindowDays": 42,
  "useOrgAndGroupNamesInExportPrefix": true
}
Response examples (401)
{
  "error": 401,
  "detail": "(This is just an example, the exception may not be related to this endpoint)",
  "reason": "Unauthorized",
  "errorCode": "NOT_ORG_GROUP_CREATOR"
}
Response examples (403)
{
  "error": 403,
  "detail": "(This is just an example, the exception may not be related to this endpoint)",
  "reason": "Forbidden",
  "errorCode": "CANNOT_CHANGE_GROUP_NAME"
}
Response examples (404)
{
  "error": 404,
  "detail": "(This is just an example, the exception may not be related to this endpoint) Cannot find resource AWS",
  "reason": "Not Found",
  "errorCode": "RESOURCE_NOT_FOUND"
}
Response examples (500)
{
  "error": 500,
  "detail": "(This is just an example, the exception may not be related to this endpoint)",
  "reason": "Internal Server Error",
  "errorCode": "UNEXPECTED_ERROR"
}




























Return One Replica Set Cloud Backup

GET /api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots/{snapshotId}

Returns one snapshot from the specified cluster. To use this resource, the requesting Service Account or API Key must have the Project Read Only role or Project Backup Manager role.

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.

    Format should match the following pattern: ^[a-zA-Z0-9][a-zA-Z0-9-]*$.

  • snapshotId string Required

    Unique 24-hexadecimal digit string that identifies the desired snapshot.

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

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.

  • pretty boolean

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

    Default value is false.

    Prettyprint

Responses

  • 200 application/vnd.atlas.2023-01-01+json

    OK

    Hide response attributes Show response attributes object
    • cloudProvider string

      Human-readable label that identifies the cloud provider that stores this snapshot. The resource returns this parameter when "type": "replicaSet".

      Values are AWS, AZURE, or GCP.

    • copyRegions array[string]

      List that identifies the regions to which MongoDB Cloud copies the snapshot.

    • createdAt string(date-time)

      Date and time when MongoDB Cloud took the snapshot. This parameter expresses its value in the ISO 8601 timestamp format in UTC.

    • description string

      Human-readable phrase or sentence that explains the purpose of the snapshot. The resource returns this parameter when "status": "onDemand".

    • expiresAt string(date-time)

      Date and time when MongoDB Cloud deletes the snapshot. This parameter expresses its value in the ISO 8601 timestamp format in UTC.

    • frequencyType string

      Human-readable label that identifies how often this snapshot triggers.

      Values are hourly, daily, weekly, monthly, or yearly.

    • id string

      Unique 24-hexadecimal digit string that identifies the snapshot.

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

    • masterKeyUUID string(uuid)

      Unique string that identifies the Amazon Web Services (AWS) Key Management Service (KMS) Customer Master Key (CMK) used to encrypt the snapshot. The resource returns this value when "encryptionEnabled" : true.

    • mongodVersion string

      Version of the MongoDB host that this snapshot backs up.

      Format should match the following pattern: ([\d]+\.[\d]+\.[\d]+).

    • policyItems array[string]

      List that contains unique identifiers for the policy items.

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

    • replicaSetName string

      Human-readable label that identifies the replica set from which MongoDB Cloud took this snapshot. The resource returns this parameter when "type": "replicaSet".

    • snapshotType string

      Human-readable label that identifies when this snapshot triggers.

      Values are onDemand, scheduled, or fallback.

    • status string

      Human-readable label that indicates the stage of the backup process for this snapshot.

      Values are queued, inProgress, completed, or failed.

    • storageSizeBytes integer(int64)

      Number of bytes taken to store the backup at time of snapshot.

    • type string

      Human-readable label that categorizes the cluster as a replica set or sharded cluster.

      Values are replicaSet or shardedCluster.

  • 400 application/json

    Bad Request.

    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

      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.

    • reason string

      Application error message returned with this error.

  • 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

      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.

    • reason string

      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

      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.

    • reason string

      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

      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.

    • reason string

      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

      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.

    • reason string

      Application error message returned with this error.

GET /api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots/{snapshotId}
atlas api getReplicaSetBackup --help
import (
	"os"
	"context"
	"log"
	sdk "go.mongodb.org/atlas-sdk/v20250312001/admin"
)

func main() {
	ctx := context.Background()
	clientID := os.Getenv("MONGODB_ATLAS_CLIENT_ID")
	clientSecret := os.Getenv("MONGODB_ATLAS_CLIENT_SECRET")

	client, err := sdk.NewClient(
		sdk.UseOAuthAuth(clientID, clientSecret),
		sdk.UseBaseURL(url))

	if err != nil {
		log.Fatalf("Error: %v", err)
	}

	params = &sdk.GetReplicaSetBackupApiParams{}
	sdkResp, httpResp, err := client.CloudBackupsApi.
		GetReplicaSetBackupWithParams(ctx, params).
		Execute()
}
curl --header "Authorization: Bearer ${ACCESS_TOKEN}" \
  --header "Accept: application/vnd.atlas.2025-03-12+json" \
  -X GET "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots/{snapshotId}?pretty=true"
curl --user "${PUBLIC_KEY}:${PRIVATE_KEY}" \
  --digest \
  --header "Accept: application/vnd.atlas.2025-03-12+json" \
  -X GET "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots/{snapshotId}?pretty=true"
Response examples (200)
{
  "cloudProvider": "AWS",
  "copyRegions": [
    "string"
  ],
  "createdAt": "2025-05-04T09:42:00Z",
  "description": "string",
  "expiresAt": "2025-05-04T09:42:00Z",
  "frequencyType": "hourly",
  "id": "32b6e34b3d91647abb20e7b8",
  "links": [
    {
      "href": "https://cloud.mongodb.com/api/atlas",
      "rel": "self"
    }
  ],
  "masterKeyUUID": "string",
  "mongodVersion": "string",
  "policyItems": [
    "32b6e34b3d91647abb20e7b8"
  ],
  "replicaSetName": "string",
  "snapshotType": "onDemand",
  "status": "queued",
  "storageSizeBytes": 42,
  "type": "replicaSet"
}
Response examples (400)
{
  "error": 400,
  "detail": "(This is just an example, the exception may not be related to this endpoint) No provider AWS exists.",
  "reason": "Bad Request",
  "errorCode": "VALIDATION_ERROR"
}
Response examples (401)
{
  "error": 401,
  "detail": "(This is just an example, the exception may not be related to this endpoint)",
  "reason": "Unauthorized",
  "errorCode": "NOT_ORG_GROUP_CREATOR"
}
Response examples (403)
{
  "error": 403,
  "detail": "(This is just an example, the exception may not be related to this endpoint)",
  "reason": "Forbidden",
  "errorCode": "CANNOT_CHANGE_GROUP_NAME"
}
Response examples (404)
{
  "error": 404,
  "detail": "(This is just an example, the exception may not be related to this endpoint) Cannot find resource AWS",
  "reason": "Not Found",
  "errorCode": "RESOURCE_NOT_FOUND"
}
Response examples (500)
{
  "error": 500,
  "detail": "(This is just an example, the exception may not be related to this endpoint)",
  "reason": "Internal Server Error",
  "errorCode": "UNEXPECTED_ERROR"
}




Update Expiration Date for One Cloud Backup

PATCH /api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots/{snapshotId}

Changes the expiration date for one cloud backup snapshot for one cluster in the specified project, the requesting Service Account or API Key must have the Project Backup Manager role.

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.

    Format should match the following pattern: ^[a-zA-Z0-9][a-zA-Z0-9-]*$.

  • snapshotId string Required

    Unique 24-hexadecimal digit string that identifies the desired snapshot.

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

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.

  • pretty boolean

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

    Default value is false.

    Prettyprint
application/vnd.atlas.2023-01-01+json

Body Required

Changes the expiration date for one cloud backup snapshot for one cluster in the specified project.

  • retentionUnit string Required

    Quantity of time in which MongoDB Cloud measures snapshot retention.

    Values are DAYS, WEEKS, MONTHS, or YEARS.

  • retentionValue integer(int32) Required

    Number that indicates the amount of days, weeks, months, or years that MongoDB Cloud retains the snapshot. For less frequent policy items, MongoDB Cloud requires that you specify a value greater than or equal to the value specified for more frequent policy items. If the hourly policy item specifies a retention of two days, specify two days or greater for the retention of the weekly policy item.

Responses

  • 200 application/vnd.atlas.2023-01-01+json

    OK

    Hide response attributes Show response attributes object
    • cloudProvider string

      Human-readable label that identifies the cloud provider that stores this snapshot. The resource returns this parameter when "type": "replicaSet".

      Values are AWS, AZURE, or GCP.

    • copyRegions array[string]

      List that identifies the regions to which MongoDB Cloud copies the snapshot.

    • createdAt string(date-time)

      Date and time when MongoDB Cloud took the snapshot. This parameter expresses its value in the ISO 8601 timestamp format in UTC.

    • description string

      Human-readable phrase or sentence that explains the purpose of the snapshot. The resource returns this parameter when "status": "onDemand".

    • expiresAt string(date-time)

      Date and time when MongoDB Cloud deletes the snapshot. This parameter expresses its value in the ISO 8601 timestamp format in UTC.

    • frequencyType string

      Human-readable label that identifies how often this snapshot triggers.

      Values are hourly, daily, weekly, monthly, or yearly.

    • id string

      Unique 24-hexadecimal digit string that identifies the snapshot.

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

    • masterKeyUUID string(uuid)

      Unique string that identifies the Amazon Web Services (AWS) Key Management Service (KMS) Customer Master Key (CMK) used to encrypt the snapshot. The resource returns this value when "encryptionEnabled" : true.

    • mongodVersion string

      Version of the MongoDB host that this snapshot backs up.

      Format should match the following pattern: ([\d]+\.[\d]+\.[\d]+).

    • policyItems array[string]

      List that contains unique identifiers for the policy items.

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

    • replicaSetName string

      Human-readable label that identifies the replica set from which MongoDB Cloud took this snapshot. The resource returns this parameter when "type": "replicaSet".

    • snapshotType string

      Human-readable label that identifies when this snapshot triggers.

      Values are onDemand, scheduled, or fallback.

    • status string

      Human-readable label that indicates the stage of the backup process for this snapshot.

      Values are queued, inProgress, completed, or failed.

    • storageSizeBytes integer(int64)

      Number of bytes taken to store the backup at time of snapshot.

    • type string

      Human-readable label that categorizes the cluster as a replica set or sharded cluster.

      Values are replicaSet or shardedCluster.

  • 400 application/json

    Bad Request.

    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

      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.

    • reason string

      Application error message returned with this error.

  • 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

      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.

    • reason string

      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

      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.

    • reason string

      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

      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.

    • reason string

      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

      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.

    • reason string

      Application error message returned with this error.

PATCH /api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots/{snapshotId}
atlas api updateSnapshotRetention --help
import (
	"os"
	"context"
	"log"
	sdk "go.mongodb.org/atlas-sdk/v20250312001/admin"
)

func main() {
	ctx := context.Background()
	clientID := os.Getenv("MONGODB_ATLAS_CLIENT_ID")
	clientSecret := os.Getenv("MONGODB_ATLAS_CLIENT_SECRET")

	client, err := sdk.NewClient(
		sdk.UseOAuthAuth(clientID, clientSecret),
		sdk.UseBaseURL(url))

	if err != nil {
		log.Fatalf("Error: %v", err)
	}

	params = &sdk.UpdateSnapshotRetentionApiParams{}
	sdkResp, httpResp, err := client.CloudBackupsApi.
		UpdateSnapshotRetentionWithParams(ctx, params).
		Execute()
}
curl --header "Authorization: Bearer ${ACCESS_TOKEN}" \
  --header "Accept: application/vnd.atlas.2025-03-12+json" \
  --header "Content-Type: application/json" \
  -X PATCH "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots/{snapshotId}" \
  -d '{ <Payload> }'
curl --user "${PUBLIC_KEY}:${PRIVATE_KEY}" \
  --digest \
  --header "Accept: application/vnd.atlas.2025-03-12+json" \
  --header "Content-Type: application/json" \
  -X PATCH "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/snapshots/{snapshotId}" \
  -d '{ <Payload> }'
Request examples
{
  "retentionUnit": "DAYS",
  "retentionValue": 5
}
Response examples (200)
{
  "cloudProvider": "AWS",
  "copyRegions": [
    "string"
  ],
  "createdAt": "2025-05-04T09:42:00Z",
  "description": "string",
  "expiresAt": "2025-05-04T09:42:00Z",
  "frequencyType": "hourly",
  "id": "32b6e34b3d91647abb20e7b8",
  "links": [
    {
      "href": "https://cloud.mongodb.com/api/atlas",
      "rel": "self"
    }
  ],
  "masterKeyUUID": "string",
  "mongodVersion": "string",
  "policyItems": [
    "32b6e34b3d91647abb20e7b8"
  ],
  "replicaSetName": "string",
  "snapshotType": "onDemand",
  "status": "queued",
  "storageSizeBytes": 42,
  "type": "replicaSet"
}
Response examples (400)
{
  "error": 400,
  "detail": "(This is just an example, the exception may not be related to this endpoint) No provider AWS exists.",
  "reason": "Bad Request",
  "errorCode": "VALIDATION_ERROR"
}
Response examples (401)
{
  "error": 401,
  "detail": "(This is just an example, the exception may not be related to this endpoint)",
  "reason": "Unauthorized",
  "errorCode": "NOT_ORG_GROUP_CREATOR"
}
Response examples (403)
{
  "error": 403,
  "detail": "(This is just an example, the exception may not be related to this endpoint)",
  "reason": "Forbidden",
  "errorCode": "CANNOT_CHANGE_GROUP_NAME"
}
Response examples (404)
{
  "error": 404,
  "detail": "(This is just an example, the exception may not be related to this endpoint) Cannot find resource AWS",
  "reason": "Not Found",
  "errorCode": "RESOURCE_NOT_FOUND"
}
Response examples (500)
{
  "error": 500,
  "detail": "(This is just an example, the exception may not be related to this endpoint)",
  "reason": "Internal Server Error",
  "errorCode": "UNEXPECTED_ERROR"
}
















Return One Snapshot of One Serverless Instance

GET /api/atlas/v2/groups/{groupId}/serverless/{clusterName}/backup/snapshots/{snapshotId}

Returns one snapshot of one serverless instance from the specified project. To use this resource, the requesting Service Account or API Key must have the Project Read Only role.

This endpoint can also be used on Flex clusters that were created with the createServerlessInstance API or Flex clusters that were migrated from Serverless instances. This endpoint will be sunset in January 2026. Please use the getFlexBackup endpoint instead.

getFlexBackup

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 serverless instance.

    Format should match the following pattern: ^[a-zA-Z0-9][a-zA-Z0-9-]*$.

  • snapshotId string Required

    Unique 24-hexadecimal digit string that identifies the desired snapshot.

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

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.

Responses

  • 200 application/vnd.atlas.2023-01-01+json

    OK

    Hide response attributes Show response attributes object
    • createdAt string(date-time)

      Date and time when MongoDB Cloud took the snapshot. This parameter expresses its value in the ISO 8601 timestamp format in UTC.

    • expiresAt string(date-time)

      Date and time when MongoDB Cloud deletes the snapshot. This parameter expresses its value in the ISO 8601 timestamp format in UTC.

    • frequencyType string

      Human-readable label that identifies how often this snapshot triggers.

      Values are hourly, daily, weekly, or monthly.

    • id string

      Unique 24-hexadecimal digit string that identifies the snapshot.

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

    • mongodVersion string

      Version of the MongoDB host that this snapshot backs up.

      Format should match the following pattern: ([\d]+\.[\d]+\.[\d]+).

    • serverlessInstanceName string

      Human-readable label given to the serverless instance from which MongoDB Cloud took this snapshot.

      Format should match the following pattern: ^[a-zA-Z0-9][a-zA-Z0-9-]*$.

    • snapshotType string

      Human-readable label that identifies when this snapshot triggers.

      Values are onDemand or scheduled.

    • status string

      Human-readable label that indicates the stage of the backup process for this snapshot.

      Values are queued, inProgress, completed, or failed.

    • storageSizeBytes integer(int64)

      Number of bytes taken to store the backup snapshot.

  • 400 application/json

    Bad Request.

    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

      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.

    • reason string

      Application error message returned with this error.

  • 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

      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.

    • reason string

      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

      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.

    • reason string

      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

      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.

    • reason string

      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

      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.

    • reason string

      Application error message returned with this error.

GET /api/atlas/v2/groups/{groupId}/serverless/{clusterName}/backup/snapshots/{snapshotId}
atlas api getServerlessBackup --help
import (
	"os"
	"context"
	"log"
	sdk "go.mongodb.org/atlas-sdk/v20250312001/admin"
)

func main() {
	ctx := context.Background()
	clientID := os.Getenv("MONGODB_ATLAS_CLIENT_ID")
	clientSecret := os.Getenv("MONGODB_ATLAS_CLIENT_SECRET")

	client, err := sdk.NewClient(
		sdk.UseOAuthAuth(clientID, clientSecret),
		sdk.UseBaseURL(url))

	if err != nil {
		log.Fatalf("Error: %v", err)
	}

	params = &sdk.GetServerlessBackupApiParams{}
	sdkResp, httpResp, err := client.CloudBackupsApi.
		GetServerlessBackupWithParams(ctx, params).
		Execute()
}
curl --header "Authorization: Bearer ${ACCESS_TOKEN}" \
  --header "Accept: application/vnd.atlas.2025-03-12+json" \
  -X GET "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/serverless/{clusterName}/backup/snapshots/{snapshotId}?pretty=true"
curl --user "${PUBLIC_KEY}:${PRIVATE_KEY}" \
  --digest \
  --header "Accept: application/vnd.atlas.2025-03-12+json" \
  -X GET "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/serverless/{clusterName}/backup/snapshots/{snapshotId}?pretty=true"
Response examples (200)
{
  "createdAt": "2025-05-04T09:42:00Z",
  "expiresAt": "2025-05-04T09:42:00Z",
  "frequencyType": "hourly",
  "id": "32b6e34b3d91647abb20e7b8",
  "links": [
    {
      "href": "https://cloud.mongodb.com/api/atlas",
      "rel": "self"
    }
  ],
  "mongodVersion": "string",
  "serverlessInstanceName": "string",
  "snapshotType": "onDemand",
  "status": "queued",
  "storageSizeBytes": 42
}
Response examples (400)
{
  "error": 400,
  "detail": "(This is just an example, the exception may not be related to this endpoint) No provider AWS exists.",
  "reason": "Bad Request",
  "errorCode": "VALIDATION_ERROR"
}
Response examples (401)
{
  "error": 401,
  "detail": "(This is just an example, the exception may not be related to this endpoint)",
  "reason": "Unauthorized",
  "errorCode": "NOT_ORG_GROUP_CREATOR"
}
Response examples (403)
{
  "error": 403,
  "detail": "(This is just an example, the exception may not be related to this endpoint)",
  "reason": "Forbidden",
  "errorCode": "CANNOT_CHANGE_GROUP_NAME"
}
Response examples (404)
{
  "error": 404,
  "detail": "(This is just an example, the exception may not be related to this endpoint) Cannot find resource AWS",
  "reason": "Not Found",
  "errorCode": "RESOURCE_NOT_FOUND"
}
Response examples (500)
{
  "error": 500,
  "detail": "(This is just an example, the exception may not be related to this endpoint)",
  "reason": "Internal Server Error",
  "errorCode": "UNEXPECTED_ERROR"
}


































Return All Cloud Provider Access Roles

GET /api/atlas/v2/groups/{groupId}/cloudProviderAccess

Returns all cloud provider access roles with access to the specified project. To use this resource, the requesting Service Account or API Key must have the Project Owner role.

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})$.

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.

  • pretty boolean

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

    Default value is false.

    Prettyprint

Responses

  • 200 application/vnd.atlas.2023-01-01+json

    OK

    Hide response attributes Show response attributes object
    • awsIamRoles array[object]

      List that contains the Amazon Web Services (AWS) IAM roles registered and authorized with MongoDB Cloud.

      Details that describe the features linked to the Amazon Web Services (AWS) Identity and Access Management (IAM) role.

      Hide awsIamRoles attributes Show awsIamRoles attributes object

      Details that describe the features linked to the Amazon Web Services (AWS) Identity and Access Management (IAM) role.

      • providerName string Required

        Human-readable label that identifies the cloud provider of the role.

        Values are AWS, AZURE, or GCP.

      • atlasAWSAccountArn string

        Amazon Resource Name that identifies the Amazon Web Services (AWS) user account that MongoDB Cloud uses when it assumes the Identity and Access Management (IAM) role.

        Minimum length is 20, maximum length is 2048.

      • atlasAssumedRoleExternalId string(uuid)

        Unique external ID that MongoDB Cloud uses when it assumes the IAM role in your Amazon Web Services (AWS) account.

      • authorizedDate string(date-time)

        Date and time when someone authorized this role for the specified cloud service provider. This parameter expresses its value in the ISO 8601 timestamp format in UTC.

      • createdDate string(date-time)

        Date and time when someone created this role for the specified cloud service provider. This parameter expresses its value in the ISO 8601 timestamp format in UTC.

      • featureUsages array[object]

        List that contains application features associated with this Amazon Web Services (AWS) Identity and Access Management (IAM) role.

        One of:

        Details that describe the Atlas Data Lakes linked to this Amazon Web Services (AWS) Identity and Access Management (IAM) role.

        Hide attributes Show attributes
        • featureType string Discriminator

          Human-readable label that describes one MongoDB Cloud feature linked to this Amazon Web Services (AWS) Identity and Access Management (IAM) role.

          Value is ATLAS_DATA_LAKE.

        • featureId object

          Identifying characteristics about the data lake linked to this Amazon Web Services (AWS) Identity and Access Management (IAM) role.

          Hide featureId attributes Show featureId attributes object
          • groupId string

            Unique 24-hexadecimal digit string that identifies your project.

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

          • name string

            Human-readable label that identifies the data lake.

      • iamAssumedRoleArn string

        Amazon Resource Name (ARN) that identifies the Amazon Web Services (AWS) Identity and Access Management (IAM) role that MongoDB Cloud assumes when it accesses resources in your AWS account.

        Minimum length is 20, maximum length is 2048.

      • roleId string

        Unique 24-hexadecimal digit string that identifies the role.

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

    • azureServicePrincipals array[object]

      List that contains the Azure Service Principals registered with MongoDB Cloud.

      Details that describe the features linked to the Azure Service Principal.

      Hide azureServicePrincipals attributes Show azureServicePrincipals attributes object

      Details that describe the features linked to the Azure Service Principal.

      • providerName string Required

        Human-readable label that identifies the cloud provider of the role.

        Values are AWS, AZURE, or GCP.

      • _id string

        Unique 24-hexadecimal digit string that identifies the role.

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

      • atlasAzureAppId string(uuid)

        Azure Active Directory Application ID of Atlas.

      • createdDate string(date-time)

        Date and time when this Azure Service Principal was created. This parameter expresses its value in the ISO 8601 timestamp format in UTC.

      • featureUsages array[object]

        List that contains application features associated with this Azure Service Principal.

        One of:

        Details that describe the Atlas Data Lakes linked to this Amazon Web Services (AWS) Identity and Access Management (IAM) role.

        Hide attributes Show attributes
        • featureType string Discriminator

          Human-readable label that describes one MongoDB Cloud feature linked to this Amazon Web Services (AWS) Identity and Access Management (IAM) role.

          Value is ATLAS_DATA_LAKE.

        • featureId object

          Identifying characteristics about the data lake linked to this Amazon Web Services (AWS) Identity and Access Management (IAM) role.

          Hide featureId attributes Show featureId attributes object
          • groupId string

            Unique 24-hexadecimal digit string that identifies your project.

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

          • name string

            Human-readable label that identifies the data lake.

      • lastUpdatedDate string(date-time)

        Date and time when this Azure Service Principal was last updated. This parameter expresses its value in the ISO 8601 timestamp format in UTC.

      • servicePrincipalId string(uuid)

        UUID string that identifies the Azure Service Principal.

      • tenantId string(uuid)

        UUID String that identifies the Azure Active Directory Tenant ID.

  • 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

      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.

    • reason string

      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

      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.

    • reason string

      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

      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.

    • reason string

      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

      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.

    • reason string

      Application error message returned with this error.

GET /api/atlas/v2/groups/{groupId}/cloudProviderAccess
atlas api listCloudProviderAccessRoles --help
import (
	"os"
	"context"
	"log"
	sdk "go.mongodb.org/atlas-sdk/v20250312001/admin"
)

func main() {
	ctx := context.Background()
	clientID := os.Getenv("MONGODB_ATLAS_CLIENT_ID")
	clientSecret := os.Getenv("MONGODB_ATLAS_CLIENT_SECRET")

	client, err := sdk.NewClient(
		sdk.UseOAuthAuth(clientID, clientSecret),
		sdk.UseBaseURL(url))

	if err != nil {
		log.Fatalf("Error: %v", err)
	}

	params = &sdk.ListCloudProviderAccessRolesApiParams{}
	sdkResp, httpResp, err := client.CloudProviderAccessApi.
		ListCloudProviderAccessRolesWithParams(ctx, params).
		Execute()
}
curl --header "Authorization: Bearer ${ACCESS_TOKEN}" \
  --header "Accept: application/vnd.atlas.2025-03-12+json" \
  -X GET "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/cloudProviderAccess?pretty=true"
curl --user "${PUBLIC_KEY}:${PRIVATE_KEY}" \
  --digest \
  --header "Accept: application/vnd.atlas.2025-03-12+json" \
  -X GET "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/cloudProviderAccess?pretty=true"
Response examples (200)
{
  "awsIamRoles": [
    {
      "providerName": "AWS",
      "atlasAWSAccountArn": "arn:aws:iam::772401394250:role/my-test-aws-role",
      "atlasAssumedRoleExternalId": "string",
      "authorizedDate": "2025-05-04T09:42:00Z",
      "createdDate": "2025-05-04T09:42:00Z",
      "featureUsages": [
        {
          "featureType": "ATLAS_DATA_LAKE",
          "featureId": {
            "groupId": "32b6e34b3d91647abb20e7b8",
            "name": "string"
          }
        }
      ],
      "iamAssumedRoleArn": "arn:aws:iam::123456789012:root",
      "roleId": "32b6e34b3d91647abb20e7b8"
    }
  ],
  "azureServicePrincipals": [
    {
      "providerName": "AWS",
      "_id": "32b6e34b3d91647abb20e7b8",
      "atlasAzureAppId": "string",
      "createdDate": "2025-05-04T09:42:00Z",
      "featureUsages": [
        {
          "featureType": "ATLAS_DATA_LAKE",
          "featureId": {
            "groupId": "32b6e34b3d91647abb20e7b8",
            "name": "string"
          }
        }
      ],
      "lastUpdatedDate": "2025-05-04T09:42:00Z",
      "servicePrincipalId": "string",
      "tenantId": "string"
    }
  ]
}
Response examples (401)
{
  "error": 401,
  "detail": "(This is just an example, the exception may not be related to this endpoint)",
  "reason": "Unauthorized",
  "errorCode": "NOT_ORG_GROUP_CREATOR"
}
Response examples (403)
{
  "error": 403,
  "detail": "(This is just an example, the exception may not be related to this endpoint)",
  "reason": "Forbidden",
  "errorCode": "CANNOT_CHANGE_GROUP_NAME"
}
Response examples (404)
{
  "error": 404,
  "detail": "(This is just an example, the exception may not be related to this endpoint) Cannot find resource AWS",
  "reason": "Not Found",
  "errorCode": "RESOURCE_NOT_FOUND"
}
Response examples (500)
{
  "error": 500,
  "detail": "(This is just an example, the exception may not be related to this endpoint)",
  "reason": "Internal Server Error",
  "errorCode": "UNEXPECTED_ERROR"
}










































Return All Cloud Provider Regions

GET /api/atlas/v2/groups/{groupId}/clusters/provider/regions

Returns the list of regions available for the specified cloud provider at the specified tier. To use this resource, the requesting Service Account or API Key must have the Project Read Only role.

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})$.

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 the response returns the total number of items (totalCount) in the response.

    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
  • providers array[string]

    Cloud providers whose regions to retrieve. When you specify multiple providers, the response can return only tiers and regions that support multi-cloud clusters.

  • tier string

    Cluster tier for which to retrieve the regions.

Responses

  • 200 application/vnd.atlas.2023-01-01+json

    OK

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

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

      Hide results attributes Show results attributes object
      • instanceSizes array[object]

        List of instances sizes that this cloud provider supports.

        Hide instanceSizes attributes Show instanceSizes attributes object
        • availableRegions array[object]

          List of regions that this cloud provider supports for this instance size.

          Hide availableRegions attributes Show availableRegions attributes object
          • default boolean

            Flag that indicates whether the cloud provider sets this region as its default. AWS defaults to US_EAST_1, GCP defaults to CENTRAL_US, and AZURE defaults to US_WEST_2.

          • name string

            Human-readable label that identifies the supported region.

        • name string

          Human-readable label that identifies the instance size or cluster tier.

      • provider string

        Human-readable label that identifies the Cloud provider.

        Values are AWS, GCP, or AZURE.

    • totalCount integer(int32)

      Total number of documents available. MongoDB Cloud omits this value if includeCount is set to false. 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

      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.

    • reason string

      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

      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.

    • reason string

      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

      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.

    • reason string

      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

      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.

    • reason string

      Application error message returned with this error.

GET /api/atlas/v2/groups/{groupId}/clusters/provider/regions
atlas api listCloudProviderRegions --help
import (
	"os"
	"context"
	"log"
	sdk "go.mongodb.org/atlas-sdk/v20250312001/admin"
)

func main() {
	ctx := context.Background()
	clientID := os.Getenv("MONGODB_ATLAS_CLIENT_ID")
	clientSecret := os.Getenv("MONGODB_ATLAS_CLIENT_SECRET")

	client, err := sdk.NewClient(
		sdk.UseOAuthAuth(clientID, clientSecret),
		sdk.UseBaseURL(url))

	if err != nil {
		log.Fatalf("Error: %v", err)
	}

	params = &sdk.ListCloudProviderRegionsApiParams{}
	sdkResp, httpResp, err := client.ClustersApi.
		ListCloudProviderRegionsWithParams(ctx, params).
		Execute()
}
curl --header "Authorization: Bearer ${ACCESS_TOKEN}" \
  --header "Accept: application/vnd.atlas.2025-03-12+json" \
  -X GET "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/provider/regions?pretty=true"
curl --user "${PUBLIC_KEY}:${PRIVATE_KEY}" \
  --digest \
  --header "Accept: application/vnd.atlas.2025-03-12+json" \
  -X GET "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/provider/regions?pretty=true"
Response examples (200)
{
  "links": [
    {
      "href": "https://cloud.mongodb.com/api/atlas",
      "rel": "self"
    }
  ],
  "results": [
    {
      "instanceSizes": [
        {
          "availableRegions": [
            {
              "default": true,
              "name": "string"
            }
          ],
          "name": "string"
        }
      ],
      "provider": "AWS"
    }
  ],
  "totalCount": 42
}
Response examples (401)
{
  "error": 401,
  "detail": "(This is just an example, the exception may not be related to this endpoint)",
  "reason": "Unauthorized",
  "errorCode": "NOT_ORG_GROUP_CREATOR"
}
Response examples (403)
{
  "error": 403,
  "detail": "(This is just an example, the exception may not be related to this endpoint)",
  "reason": "Forbidden",
  "errorCode": "CANNOT_CHANGE_GROUP_NAME"
}
Response examples (404)
{
  "error": 404,
  "detail": "(This is just an example, the exception may not be related to this endpoint) Cannot find resource AWS",
  "reason": "Not Found",
  "errorCode": "RESOURCE_NOT_FOUND"
}
Response examples (500)
{
  "error": 500,
  "detail": "(This is just an example, the exception may not be related to this endpoint)",
  "reason": "Internal Server Error",
  "errorCode": "UNEXPECTED_ERROR"
}




















































Unpin Feature Compatibility Version for One Cluster in One Project

POST /api/atlas/v2/groups/{groupId}/clusters/{clusterName}:unpinFeatureCompatibilityVersion

Unpins the current fixed Feature Compatibility Version (FCV). This feature is not available for clusters on rapid release.

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 this cluster.

    Format should match the following pattern: ^[a-zA-Z0-9][a-zA-Z0-9-]*$.

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.

  • pretty boolean

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

    Default value is false.

    Prettyprint

Responses

  • 204 application/vnd.atlas.2024-05-30+json

    This endpoint does not return a response body.

  • 400 application/json

    Bad Request.

    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

      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.

    • reason string

      Application error message returned with this error.

  • 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

      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.

    • reason string

      Application error message returned with this error.

  • 402 application/json

    Payment Required.

    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

      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.

    • reason string

      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

      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.

    • reason string

      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

      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.

    • reason string

      Application error message returned with this error.

  • 409 application/json

    Conflict.

    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

      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.

    • reason string

      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

      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.

    • reason string

      Application error message returned with this error.

POST /api/atlas/v2/groups/{groupId}/clusters/{clusterName}:unpinFeatureCompatibilityVersion
atlas api unpinFeatureCompatibilityVersion --help
import (
	"os"
	"context"
	"log"
	sdk "go.mongodb.org/atlas-sdk/v20250312001/admin"
)

func main() {
	ctx := context.Background()
	clientID := os.Getenv("MONGODB_ATLAS_CLIENT_ID")
	clientSecret := os.Getenv("MONGODB_ATLAS_CLIENT_SECRET")

	client, err := sdk.NewClient(
		sdk.UseOAuthAuth(clientID, clientSecret),
		sdk.UseBaseURL(url))

	if err != nil {
		log.Fatalf("Error: %v", err)
	}

	params = &sdk.UnpinFeatureCompatibilityVersionApiParams{}
	sdkResp, httpResp, err := client.ClustersApi.
		UnpinFeatureCompatibilityVersionWithParams(ctx, params).
		Execute()
}
curl --header "Authorization: Bearer ${ACCESS_TOKEN}" \
  --header "Accept: application/vnd.atlas.2025-03-12+json" \
  --header "Content-Type: application/json" \
  -X POST "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}:unpinFeatureCompatibilityVersion" \
  -d '{ <Payload> }'
curl --user "${PUBLIC_KEY}:${PRIVATE_KEY}" \
  --digest \
  --header "Accept: application/vnd.atlas.2025-03-12+json" \
  --header "Content-Type: application/json" \
  -X POST "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}:unpinFeatureCompatibilityVersion" \
  -d '{ <Payload> }'
Response examples (400)
{
  "error": 400,
  "detail": "(This is just an example, the exception may not be related to this endpoint) No provider AWS exists.",
  "reason": "Bad Request",
  "errorCode": "VALIDATION_ERROR"
}
Response examples (401)
{
  "error": 401,
  "detail": "(This is just an example, the exception may not be related to this endpoint)",
  "reason": "Unauthorized",
  "errorCode": "NOT_ORG_GROUP_CREATOR"
}
Response examples (402)
{
  "error": 402,
  "detail": "(This is just an example, the exception may not be related to this endpoint)",
  "reason": "Payment Required",
  "errorCode": "NO_PAYMENT_INFORMATION_FOUND"
}
Response examples (403)
{
  "error": 403,
  "detail": "(This is just an example, the exception may not be related to this endpoint)",
  "reason": "Forbidden",
  "errorCode": "CANNOT_CHANGE_GROUP_NAME"
}
Response examples (404)
{
  "error": 404,
  "detail": "(This is just an example, the exception may not be related to this endpoint) Cannot find resource AWS",
  "reason": "Not Found",
  "errorCode": "RESOURCE_NOT_FOUND"
}
Response examples (409)
{
  "error": 409,
  "detail": "(This is just an example, the exception may not be related to this endpoint) Cannot delete organization link while there is active migration in following project ids: 60c4fd418ebe251047c50554",
  "reason": "Conflict",
  "errorCode": "CANNOT_DELETE_ORG_ACTIVE_LIVE_MIGRATION_ATLAS_ORG_LINK"
}
Response examples (500)
{
  "error": 500,
  "detail": "(This is just an example, the exception may not be related to this endpoint)",
  "reason": "Internal Server Error",
  "errorCode": "UNEXPECTED_ERROR"
}



































































Return All Federated Database Instances in One Project

GET /api/atlas/v2/groups/{groupId}/dataFederation

Returns the details of all federated database instances in the specified project. To use this resource, the requesting Service Account or API Key must have the Project Read Only or higher role.

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})$.

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.

  • pretty boolean

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

    Default value is false.

    Prettyprint
  • type string

    Type of Federated Database Instances to return.

    Values are USER or ONLINE_ARCHIVE. Default value is USER.

Responses

  • 200 application/vnd.atlas.2023-01-01+json

    OK

    Hide response attributes Show response attributes object
    • cloudProviderConfig object

      Cloud provider where this Federated Database Instance is hosted.

      Hide cloudProviderConfig attributes Show cloudProviderConfig attributes object
      • aws object

        Configuration for running Data Federation in AWS.

        Hide aws attributes Show aws attributes object
        • externalId string

          Unique identifier associated with the Identity and Access Management (IAM) role that the data lake assumes when accessing the data stores.

        • iamAssumedRoleARN string

          Amazon Resource Name (ARN) of the Identity and Access Management (IAM) role that the data lake assumes when accessing data stores.

          Minimum length is 20, maximum length is 2048.

        • iamUserARN string

          Amazon Resource Name (ARN) of the user that the data lake assumes when accessing data stores.

        • roleId string Required

          Unique identifier of the role that the data lake can use to access the data stores.Required if specifying cloudProviderConfig.

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

      • azure object

        Configuration for running Data Federation in Azure.

        Hide azure attributes Show azure attributes object
        • atlasAppId string

          The App ID generated by Atlas for the Service Principal's access policy.

        • roleId string Required

          Unique identifier of the role that Data Federation can use to access the data stores. Required if specifying cloudProviderConfig.

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

        • servicePrincipalId string

          The ID of the Service Principal for which there is an access policy for Atlas to access Azure resources.

        • tenantId string

          The Azure Active Directory / Entra ID tenant ID associated with the Service Principal.

      • gcp object

        Configuration for running Data Federation in GCP.

        Hide gcp attributes Show gcp attributes object
        • gcpServiceAccount string

          The email address of the Google Cloud Platform (GCP) service account created by Atlas which should be authorized to allow Atlas to access Google Cloud Storage.

        • roleId string Required

          Unique identifier of the role that Data Federation can use to access the data stores. Required if specifying cloudProviderConfig.

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

    • dataProcessRegion object

      Information about the cloud provider region to which the Federated Database Instance routes client connections.

      Hide dataProcessRegion attributes Show dataProcessRegion attributes object
      • cloudProvider string Required

        Name of the cloud service that hosts the Federated Database Instance's infrastructure.

        Values are AWS, AZURE, or GCP.

      • region string Required

        Name of the region to which the data lake routes client connections.

        One of:

        Atlas Data Federation AWS Regions.

        Values are SYDNEY_AUS, MUMBAI_IND, FRANKFURT_DEU, DUBLIN_IRL, LONDON_GBR, VIRGINIA_USA, OREGON_USA, SAOPAULO_BRA, MONTREAL_CAN, TOKYO_JPN, or SINGAPORE_SGP.

    • groupId string

      Unique 24-hexadecimal character string that identifies the project.

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

    • hostnames array[string]

      List that contains the hostnames assigned to the Federated Database Instance.

    • name string

      Human-readable label that identifies the Federated Database Instance.

    • privateEndpointHostnames array[object]

      List that contains the sets of private endpoints and hostnames.

      Set of Private endpoint and hostnames.

      Hide privateEndpointHostnames attributes Show privateEndpointHostnames attributes object
      • hostname string

        Human-readable label that identifies the hostname.

      • privateEndpoint string

        Human-readable label that identifies private endpoint.

    • state string

      Label that indicates the status of the Federated Database Instance.

      Values are UNVERIFIED, ACTIVE, or DELETED.

    • storage object

      Configuration information for each data store and its mapping to MongoDB Cloud databases.

      Hide storage attributes Show storage attributes object
      • databases array[object]

        Array that contains the queryable databases and collections for this data lake.

        Database associated with this data lake. Databases contain collections and views.

        Hide databases attributes Show databases attributes object
        • collections array[object]

          Array of collections and data sources that map to a stores data store.

          A collection and data sources that map to a stores data store.

          Hide collections attributes Show collections attributes object
          • dataSources array[object]

            Array that contains the data stores that map to a collection for this data lake.

            Data store that maps to a collection for this data lake.

            Hide dataSources attributes Show dataSources attributes object
            • allowInsecure boolean

              Flag that validates the scheme in the specified URLs. If true, allows insecure HTTP scheme, doesn't verify the server's certificate chain and hostname, and accepts any certificate with any hostname presented by the server. If false, allows secure HTTPS scheme only.

              Default value is false.

            • collection string

              Human-readable label that identifies the collection in the database. For creating a wildcard (*) collection, you must omit this parameter.

            • collectionRegex string

              Regex pattern to use for creating the wildcard (*) collection. To learn more about the regex syntax, see Go programming language.

            • database string

              Human-readable label that identifies the database, which contains the collection in the cluster. You must omit this parameter to generate wildcard (*) collections for dynamically generated databases.

            • databaseRegex string

              Regex pattern to use for creating the wildcard (*) database. To learn more about the regex syntax, see Go programming language.

            • datasetName string

              Human-readable label that identifies the dataset that Atlas generates for an ingestion pipeline run or Online Archive.

            • datasetPrefix string

              Human-readable label that matches against the dataset names for ingestion pipeline runs or Online Archives.

            • defaultFormat string

              File format that MongoDB Cloud uses if it encounters a file without a file extension while searching storeName.

              Values are .avro, .avro.bz2, .avro.gz, .bson, .bson.bz2, .bson.gz, .bsonx, .csv, .csv.bz2, .csv.gz, .json, .json.bz2, .json.gz, .orc, .parquet, .tsv, .tsv.bz2, or .tsv.gz.

            • path string

              File path that controls how MongoDB Cloud searches for and parses files in the storeName before mapping them to a collection.Specify / to capture all files and folders from the prefix path.

            • provenanceFieldName string

              Name for the field that includes the provenance of the documents in the results. MongoDB Cloud returns different fields in the results for each supported provider.

            • storeName string

              Human-readable label that identifies the data store that MongoDB Cloud maps to the collection.

            • trimLevel integer(int32)

              Unsigned integer that specifies how many fields of the dataset name to trim from the left of the dataset name before mapping the remaining fields to a wildcard collection name.

            • urls array[string]

              URLs of the publicly accessible data files. You can't specify URLs that require authentication. Atlas Data Lake creates a partition for each URL. If empty or omitted, Data Lake uses the URLs from the store specified in the dataSources.storeName parameter.

          • name string

            Human-readable label that identifies the collection to which MongoDB Cloud maps the data in the data stores.

        • maxWildcardCollections integer(int32)

          Maximum number of wildcard collections in the database. This only applies to S3 data sources.

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

        • name string

          Human-readable label that identifies the database to which the data lake maps data.

        • views array[object]

          Array of aggregation pipelines that apply to the collection. This only applies to S3 data sources.

          An aggregation pipeline that applies to the collection.

          Hide views attributes Show views attributes object
          • name string

            Human-readable label that identifies the view, which corresponds to an aggregation pipeline on a collection.

          • pipeline string

            Aggregation pipeline stages to apply to the source collection.

            Aggregation Pipelines
          • source string

            Human-readable label that identifies the source collection for the view.

      • stores array[object]

        Array that contains the data stores for the data lake.

        One of:

        Group of settings that define where the data is stored.

        Hide attributes Show attributes
        • name string

          Human-readable label that identifies the data store. The databases.[n].collections.[n].dataSources.[n].storeName field references this values as part of the mapping configuration. To use MongoDB Cloud as a data store, the data lake requires a serverless instance or an M10 or higher cluster.

        • provider string Required Discriminator

          Value is object.

        • additionalStorageClasses array[string]

          Collection of AWS S3 storage classes. Atlas Data Lake includes the files in these storage classes in the query results.

          Values are STANDARD, INTELLIGENT_TIERING, or STANDARD_IA.

        • bucket string

          Human-readable label that identifies the AWS S3 bucket. This label must exactly match the name of an S3 bucket that the data lake can access with the configured AWS Identity and Access Management (IAM) credentials.

        • delimiter string

          The delimiter that separates databases.[n].collections.[n].dataSources.[n].path segments in the data store. MongoDB Cloud uses the delimiter to efficiently traverse S3 buckets with a hierarchical directory structure. You can specify any character supported by the S3 object keys as the delimiter. For example, you can specify an underscore () or a plus sign (+) or multiple characters, such as double underscores (_) as the delimiter. If omitted, defaults to /.

        • includeTags boolean

          Flag that indicates whether to use S3 tags on the files in the given path as additional partition attributes. If set to true, data lake adds the S3 tags as additional partition attributes and adds new top-level BSON elements associating each tag to each document.

          Default value is false.

        • prefix string

          Prefix that MongoDB Cloud applies when searching for files in the S3 bucket. The data store prepends the value of prefix to the databases.[n].collections.[n].dataSources.[n].path to create the full path for files to ingest. If omitted, MongoDB Cloud searches all files from the root of the S3 bucket.

        • public boolean

          Flag that indicates whether the bucket is public. If set to true, MongoDB Cloud doesn't use the configured AWS Identity and Access Management (IAM) role to access the S3 bucket. If set to false, the configured AWS IAM role must include permissions to access the S3 bucket.

          Default value is false.

        • region string

          Physical location where MongoDB Cloud deploys your AWS-hosted MongoDB cluster nodes. The region you choose can affect network latency for clients accessing your databases. When MongoDB Cloud deploys a dedicated cluster, it checks if a VPC or VPC connection exists for that provider and region. If not, MongoDB Cloud creates them as part of the deployment. MongoDB Cloud assigns the VPC a CIDR block. To limit a new VPC peering connection to one CIDR block and region, create the connection first. Deploy the cluster after the connection starts.

          Values are US_GOV_WEST_1, US_GOV_EAST_1, US_EAST_1, US_EAST_2, US_WEST_1, US_WEST_2, CA_CENTRAL_1, EU_NORTH_1, EU_WEST_1, EU_WEST_2, EU_WEST_3, EU_CENTRAL_1, EU_CENTRAL_2, AP_EAST_1, AP_NORTHEAST_1, AP_NORTHEAST_2, AP_NORTHEAST_3, AP_SOUTHEAST_1, AP_SOUTHEAST_2, AP_SOUTHEAST_3, AP_SOUTHEAST_4, AP_SOUTH_1, AP_SOUTH_2, SA_EAST_1, CN_NORTH_1, CN_NORTHWEST_1, ME_SOUTH_1, ME_CENTRAL_1, AF_SOUTH_1, EU_SOUTH_1, EU_SOUTH_2, IL_CENTRAL_1, CA_WEST_1, or GLOBAL.

  • 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

      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.

    • reason string

      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

      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.

    • reason string

      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

      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.

    • reason string

      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

      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.

    • reason string

      Application error message returned with this error.

GET /api/atlas/v2/groups/{groupId}/dataFederation
atlas api listFederatedDatabases --help
import (
	"os"
	"context"
	"log"
	sdk "go.mongodb.org/atlas-sdk/v20250312001/admin"
)

func main() {
	ctx := context.Background()
	clientID := os.Getenv("MONGODB_ATLAS_CLIENT_ID")
	clientSecret := os.Getenv("MONGODB_ATLAS_CLIENT_SECRET")

	client, err := sdk.NewClient(
		sdk.UseOAuthAuth(clientID, clientSecret),
		sdk.UseBaseURL(url))

	if err != nil {
		log.Fatalf("Error: %v", err)
	}

	params = &sdk.ListFederatedDatabasesApiParams{}
	sdkResp, httpResp, err := client.DataFederationApi.
		ListFederatedDatabasesWithParams(ctx, params).
		Execute()
}
curl --header "Authorization: Bearer ${ACCESS_TOKEN}" \
  --header "Accept: application/vnd.atlas.2025-03-12+json" \
  -X GET "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/dataFederation?pretty=true"
curl --user "${PUBLIC_KEY}:${PRIVATE_KEY}" \
  --digest \
  --header "Accept: application/vnd.atlas.2025-03-12+json" \
  -X GET "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/dataFederation?pretty=true"
Response examples (200)
[
  {
    "cloudProviderConfig": {
      "aws": {
        "externalId": "string",
        "iamAssumedRoleARN": "arn:aws:iam::123456789012:root",
        "iamUserARN": "string",
        "roleId": "32b6e34b3d91647abb20e7b8"
      },
      "azure": {
        "atlasAppId": "string",
        "roleId": "32b6e34b3d91647abb20e7b8",
        "servicePrincipalId": "string",
        "tenantId": "string"
      },
      "gcp": {
        "gcpServiceAccount": "string",
        "roleId": "32b6e34b3d91647abb20e7b8"
      }
    },
    "dataProcessRegion": {
      "cloudProvider": "AWS",
      "": "SYDNEY_AUS"
    },
    "groupId": "32b6e34b3d91647abb20e7b8",
    "hostnames": [
      "string"
    ],
    "name": "string",
    "privateEndpointHostnames": [
      {
        "hostname": "string",
        "privateEndpoint": "string"
      }
    ],
    "state": "UNVERIFIED",
    "storage": {
      "databases": [
        {
          "collections": [
            {
              "dataSources": [
                {
                  "allowInsecure": false,
                  "collection": "string",
                  "collectionRegex": "string",
                  "database": "string",
                  "databaseRegex": "string",
                  "datasetName": "v1$atlas$snapshot$Cluster0$myDatabase$myCollection$19700101T000000Z",
                  "datasetPrefix": "string",
                  "defaultFormat": ".avro",
                  "path": "string",
                  "provenanceFieldName": "string",
                  "storeName": "string",
                  "trimLevel": 42,
                  "urls": [
                    "string"
                  ]
                }
              ],
              "name": "string"
            }
          ],
          "maxWildcardCollections": 100,
          "name": "string",
          "views": [
            {
              "name": "string",
              "pipeline": "string",
              "source": "string"
            }
          ]
        }
      ],
      "stores": [
        {
          "name": "string",
          "provider": "object",
          "additionalStorageClasses": [
            "STANDARD"
          ],
          "bucket": "string",
          "delimiter": "string",
          "includeTags": false,
          "prefix": "string",
          "public": false,
          "region": "US_GOV_WEST_1"
        }
      ]
    }
  }
]
Response examples (401)
{
  "error": 401,
  "detail": "(This is just an example, the exception may not be related to this endpoint)",
  "reason": "Unauthorized",
  "errorCode": "NOT_ORG_GROUP_CREATOR"
}
Response examples (403)
{
  "error": 403,
  "detail": "(This is just an example, the exception may not be related to this endpoint)",
  "reason": "Forbidden",
  "errorCode": "CANNOT_CHANGE_GROUP_NAME"
}
Response examples (404)
{
  "error": 404,
  "detail": "(This is just an example, the exception may not be related to this endpoint) Cannot find resource AWS",
  "reason": "Not Found",
  "errorCode": "RESOURCE_NOT_FOUND"
}
Response examples (500)
{
  "error": 500,
  "detail": "(This is just an example, the exception may not be related to this endpoint)",
  "reason": "Internal Server Error",
  "errorCode": "UNEXPECTED_ERROR"
}
































Download Query Logs for One Federated Database Instance

GET /api/atlas/v2/groups/{groupId}/dataFederation/{tenantName}/queryLogs.gz

Downloads the query logs for the specified federated database instance. To use this resource, the requesting Service Account or API Key must have the Project Owner or Project Data Access Read Write roles. The API does not support direct calls with the json response schema. You must request a gzip response schema using an accept header of the format: "Accept: application/vnd.atlas.YYYY-MM-DD+gzip".

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})$.

  • tenantName string Required

    Human-readable label that identifies the federated database instance for which you want to download query logs.

Query parameters

  • endDate integer(int64)

    Timestamp that specifies the end point for the range of log messages to download. MongoDB Cloud expresses this timestamp in the number of seconds that have elapsed since the UNIX epoch.

    Format should match the following pattern: 1199145600.

  • startDate integer(int64)

    Timestamp that specifies the starting point for the range of log messages to download. MongoDB Cloud expresses this timestamp in the number of seconds that have elapsed since the UNIX epoch.

    Format should match the following pattern: 1199145600.

Responses

  • 200 application/vnd.atlas.2023-01-01+gzip

    OK

    Compressed archive labeled queryLogs.gz downloads

  • 400 application/json

    Bad Request.

    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

      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.

    • reason string

      Application error message returned with this error.

  • 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

      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.

    • reason string

      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

      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.

    • reason string

      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

      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.

    • reason string

      Application error message returned with this error.

  • 409 application/json

    Conflict.

    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

      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.

    • reason string

      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

      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.

    • reason string

      Application error message returned with this error.

GET /api/atlas/v2/groups/{groupId}/dataFederation/{tenantName}/queryLogs.gz
atlas api downloadFederatedDatabaseQueryLogs --help
import (
	"os"
	"context"
	"log"
	sdk "go.mongodb.org/atlas-sdk/v20250312001/admin"
)

func main() {
	ctx := context.Background()
	clientID := os.Getenv("MONGODB_ATLAS_CLIENT_ID")
	clientSecret := os.Getenv("MONGODB_ATLAS_CLIENT_SECRET")

	client, err := sdk.NewClient(
		sdk.UseOAuthAuth(clientID, clientSecret),
		sdk.UseBaseURL(url))

	if err != nil {
		log.Fatalf("Error: %v", err)
	}

	params = &sdk.DownloadFederatedDatabaseQueryLogsApiParams{}
	sdkResp, httpResp, err := client.DataFederationApi.
		DownloadFederatedDatabaseQueryLogsWithParams(ctx, params).
		Execute()
}
curl --header "Authorization: Bearer ${ACCESS_TOKEN}" \
  --header "Accept: application/vnd.atlas.2025-03-12+json" \
  -X GET "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/dataFederation/{tenantName}/queryLogs.gz?pretty=true"
curl --user "${PUBLIC_KEY}:${PRIVATE_KEY}" \
  --digest \
  --header "Accept: application/vnd.atlas.2025-03-12+json" \
  -X GET "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/dataFederation/{tenantName}/queryLogs.gz?pretty=true"
Response examples (400)
{
  "error": 400,
  "detail": "(This is just an example, the exception may not be related to this endpoint) No provider AWS exists.",
  "reason": "Bad Request",
  "errorCode": "VALIDATION_ERROR"
}
Response examples (401)
{
  "error": 401,
  "detail": "(This is just an example, the exception may not be related to this endpoint)",
  "reason": "Unauthorized",
  "errorCode": "NOT_ORG_GROUP_CREATOR"
}
Response examples (403)
{
  "error": 403,
  "detail": "(This is just an example, the exception may not be related to this endpoint)",
  "reason": "Forbidden",
  "errorCode": "CANNOT_CHANGE_GROUP_NAME"
}
Response examples (404)
{
  "error": 404,
  "detail": "(This is just an example, the exception may not be related to this endpoint) Cannot find resource AWS",
  "reason": "Not Found",
  "errorCode": "RESOURCE_NOT_FOUND"
}
Response examples (409)
{
  "error": 409,
  "detail": "(This is just an example, the exception may not be related to this endpoint) Cannot delete organization link while there is active migration in following project ids: 60c4fd418ebe251047c50554",
  "reason": "Conflict",
  "errorCode": "CANNOT_DELETE_ORG_ACTIVE_LIVE_MIGRATION_ATLAS_ORG_LINK"
}
Response examples (500)
{
  "error": 500,
  "detail": "(This is just an example, the exception may not be related to this endpoint)",
  "reason": "Internal Server Error",
  "errorCode": "UNEXPECTED_ERROR"
}

Return All Federated Database Instance and Online Archive Private Endpoints in One Project

GET /api/atlas/v2/groups/{groupId}/privateNetworkSettings/endpointIds

Returns all private endpoints for Federated Database Instances and Online Archives in the specified project. To use this resource, the requesting Service Account or API Key must have the Project Read Only or Project Charts Admin roles.

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})$.

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 the response returns the total number of items (totalCount) in the response.

    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

Responses

  • 200 application/vnd.atlas.2023-01-01+json

    OK

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

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

      Hide results attributes Show results attributes object
      • azureLinkId string

        Link ID that identifies the Azure private endpoint connection.

      • comment string

        Human-readable string to associate with this private endpoint.

      • customerEndpointDNSName string

        Human-readable label to identify customer's VPC endpoint DNS name. If defined, you must also specify a value for region.

      • customerEndpointIPAddress string

        IP address used to connect to the Azure private endpoint.

        Format should match the following pattern: ^((25[0-5]|(2[0-4]|1\d|[1-9]|)\d)(\.(?!$)|$)){4}|([0-9a-f]{1,4}:){7}[0-9a-f]{1,4}$.

      • endpointId string Required

        Unique 22-character alphanumeric string that identifies the private endpoint.

        Format should match the following pattern: ^vpce-[0-9a-f]{17}$.

        Atlas Data Lake supports Amazon Web Services private endpoints using the AWS PrivateLink feature
      • errorMessage string

        Error message describing a failure approving the private endpoint request.

      • provider string

        Human-readable label that identifies the cloud service provider. Atlas Data Lake supports Amazon Web Services only.

        Value is AWS. Default value is AWS.

      • region string

        Human-readable label to identify the region of customer's VPC endpoint. If defined, you must also specify a value for customerEndpointDNSName.

      • status string

        Status of the private endpoint connection request.

        Values are PENDING, OK, FAILED, or DELETING.

      • type string

        Human-readable label that identifies the resource type associated with this private endpoint.

        Value is DATA_LAKE. Default value is DATA_LAKE.

    • totalCount integer(int32)

      Total number of documents available. MongoDB Cloud omits this value if includeCount is set to false. The total number is an estimate and may not be exact.

      Minimum value is 0.

  • 400 application/json

    Bad Request.

    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

      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.

    • reason string

      Application error message returned with this error.

  • 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

      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.

    • reason string

      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

      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.

    • reason string

      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

      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.

    • reason string

      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

      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.

    • reason string

      Application error message returned with this error.

GET /api/atlas/v2/groups/{groupId}/privateNetworkSettings/endpointIds
atlas api listDataFederationPrivateEndpoints --help
import (
	"os"
	"context"
	"log"
	sdk "go.mongodb.org/atlas-sdk/v20250312001/admin"
)

func main() {
	ctx := context.Background()
	clientID := os.Getenv("MONGODB_ATLAS_CLIENT_ID")
	clientSecret := os.Getenv("MONGODB_ATLAS_CLIENT_SECRET")

	client, err := sdk.NewClient(
		sdk.UseOAuthAuth(clientID, clientSecret),
		sdk.UseBaseURL(url))

	if err != nil {
		log.Fatalf("Error: %v", err)
	}

	params = &sdk.ListDataFederationPrivateEndpointsApiParams{}
	sdkResp, httpResp, err := client.DataFederationApi.
		ListDataFederationPrivateEndpointsWithParams(ctx, params).
		Execute()
}
curl --header "Authorization: Bearer ${ACCESS_TOKEN}" \
  --header "Accept: application/vnd.atlas.2025-03-12+json" \
  -X GET "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/privateNetworkSettings/endpointIds?pretty=true"
curl --user "${PUBLIC_KEY}:${PRIVATE_KEY}" \
  --digest \
  --header "Accept: application/vnd.atlas.2025-03-12+json" \
  -X GET "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/privateNetworkSettings/endpointIds?pretty=true"
Response examples (200)
{
  "links": [
    {
      "href": "https://cloud.mongodb.com/api/atlas",
      "rel": "self"
    }
  ],
  "results": [
    {
      "azureLinkId": "string",
      "comment": "string",
      "customerEndpointDNSName": "string",
      "customerEndpointIPAddress": "string",
      "endpointId": "vpce-3bf78b0ddee411ba1",
      "errorMessage": "string",
      "provider": "AWS",
      "region": "US_EAST_1",
      "status": "PENDING",
      "type": "DATA_LAKE"
    }
  ],
  "totalCount": 42
}
Response examples (400)
{
  "error": 400,
  "detail": "(This is just an example, the exception may not be related to this endpoint) No provider AWS exists.",
  "reason": "Bad Request",
  "errorCode": "VALIDATION_ERROR"
}
Response examples (401)
{
  "error": 401,
  "detail": "(This is just an example, the exception may not be related to this endpoint)",
  "reason": "Unauthorized",
  "errorCode": "NOT_ORG_GROUP_CREATOR"
}
Response examples (403)
{
  "error": 403,
  "detail": "(This is just an example, the exception may not be related to this endpoint)",
  "reason": "Forbidden",
  "errorCode": "CANNOT_CHANGE_GROUP_NAME"
}
Response examples (404)
{
  "error": 404,
  "detail": "(This is just an example, the exception may not be related to this endpoint) Cannot find resource AWS",
  "reason": "Not Found",
  "errorCode": "RESOURCE_NOT_FOUND"
}
Response examples (500)
{
  "error": 500,
  "detail": "(This is just an example, the exception may not be related to this endpoint)",
  "reason": "Internal Server Error",
  "errorCode": "UNEXPECTED_ERROR"
}

































Return All Ingestion Schedules for One Data Lake Pipeline Deprecated

GET /api/atlas/v2/groups/{groupId}/pipelines/{pipelineName}/availableSchedules

Returns a list of backup schedule policy items that you can use as a Data Lake Pipeline source. To use this resource, the requesting Service Account or API Key must have the Project Read Only role.

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})$.

  • pipelineName string Required

    Human-readable label that identifies the Data Lake Pipeline.

    Format should match the following pattern: ^[^/\\ "$]{1,64}$.

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.

  • pretty boolean

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

    Default value is false.

    Prettyprint

Responses

  • 200 application/vnd.atlas.2023-01-01+json

    OK

    Hide response attributes Show response attributes object
    • frequencyInterval integer(int32) Required

      Number that indicates the frequency interval for a set of Snapshots. A value of 1 specifies the first instance of the corresponding frequencyType.

      • In a yearly policy item, 1 indicates that the yearly Snapshot occurs on the first day of January and 12 indicates the first day of December.

      • In a monthly policy item, 1 indicates that the monthly Snapshot occurs on the first day of the month and 40 indicates the last day of the month.

      • In a weekly policy item, 1 indicates that the weekly Snapshot occurs on Monday and 7 indicates Sunday.

      • In an hourly policy item, you can set the frequency interval to 1, 2, 4, 6, 8, or 12. For hourly policy items for NVMe clusters, MongoDB Cloud accepts only 12 as the frequency interval value.

      MongoDB Cloud ignores this setting for non-hourly policy items in Backup Compliance Policy settings.

      Values are 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, or 40.

    • frequencyType string Required

      Human-readable label that identifies the frequency type associated with the backup policy.

      Values are daily, hourly, weekly, monthly, yearly, or ondemand.

    • id string

      Unique 24-hexadecimal digit string that identifies this backup policy item.

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

    • retentionUnit string Required

      Unit of time in which MongoDB Cloud measures Snapshot retention.

      Values are days, weeks, months, or years.

    • retentionValue integer(int32) Required

      Duration in days, weeks, months, or years that MongoDB Cloud retains the Snapshot. For less frequent policy items, MongoDB Cloud requires that you specify a value greater than or equal to the value specified for more frequent policy items.

      For example: If the hourly policy item specifies a retention of two days, you must specify two days or greater for the retention of the weekly policy item.

  • 400 application/json

    Bad Request.

    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

      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.

    • reason string

      Application error message returned with this error.

  • 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

      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.

    • reason string

      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

      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.

    • reason string

      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

      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.

    • reason string

      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

      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.

    • reason string

      Application error message returned with this error.

GET /api/atlas/v2/groups/{groupId}/pipelines/{pipelineName}/availableSchedules
atlas api listPipelineSchedules --help
import (
	"os"
	"context"
	"log"
	sdk "go.mongodb.org/atlas-sdk/v20250312001/admin"
)

func main() {
	ctx := context.Background()
	clientID := os.Getenv("MONGODB_ATLAS_CLIENT_ID")
	clientSecret := os.Getenv("MONGODB_ATLAS_CLIENT_SECRET")

	client, err := sdk.NewClient(
		sdk.UseOAuthAuth(clientID, clientSecret),
		sdk.UseBaseURL(url))

	if err != nil {
		log.Fatalf("Error: %v", err)
	}

	params = &sdk.ListPipelineSchedulesApiParams{}
	sdkResp, httpResp, err := client.DataLakePipelinesApi.
		ListPipelineSchedulesWithParams(ctx, params).
		Execute()
}
curl --header "Authorization: Bearer ${ACCESS_TOKEN}" \
  --header "Accept: application/vnd.atlas.2025-03-12+json" \
  -X GET "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/pipelines/{pipelineName}/availableSchedules?pretty=true"
curl --user "${PUBLIC_KEY}:${PRIVATE_KEY}" \
  --digest \
  --header "Accept: application/vnd.atlas.2025-03-12+json" \
  -X GET "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/pipelines/{pipelineName}/availableSchedules?pretty=true"
Response examples (200)
[
  {
    "frequencyInterval": 1,
    "frequencyType": "daily",
    "id": "32b6e34b3d91647abb20e7b8",
    "retentionUnit": "days",
    "retentionValue": 42
  }
]
Response examples (400)
{
  "error": 400,
  "detail": "(This is just an example, the exception may not be related to this endpoint) No provider AWS exists.",
  "reason": "Bad Request",
  "errorCode": "VALIDATION_ERROR"
}
Response examples (401)
{
  "error": 401,
  "detail": "(This is just an example, the exception may not be related to this endpoint)",
  "reason": "Unauthorized",
  "errorCode": "NOT_ORG_GROUP_CREATOR"
}
Response examples (403)
{
  "error": 403,
  "detail": "(This is just an example, the exception may not be related to this endpoint)",
  "reason": "Forbidden",
  "errorCode": "CANNOT_CHANGE_GROUP_NAME"
}
Response examples (404)
{
  "error": 404,
  "detail": "(This is just an example, the exception may not be related to this endpoint) Cannot find resource AWS",
  "reason": "Not Found",
  "errorCode": "RESOURCE_NOT_FOUND"
}
Response examples (500)
{
  "error": 500,
  "detail": "(This is just an example, the exception may not be related to this endpoint)",
  "reason": "Internal Server Error",
  "errorCode": "UNEXPECTED_ERROR"
}





























Return All Database Users in One Project

GET /api/atlas/v2/groups/{groupId}/databaseUsers

Returns all database users that belong to the specified project. To use this resource, the requesting Service Account or API Key must have the Project Read Only role.

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})$.

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 the response returns the total number of items (totalCount) in the response.

    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

Responses

  • 200 application/vnd.atlas.2023-01-01+json

    OK

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

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

      Hide results attributes Show results attributes object
      • awsIAMType string

        Human-readable label that indicates whether the new database user authenticates with the Amazon Web Services (AWS) Identity and Access Management (IAM) credentials associated with the user or the user's role.

        Values are NONE, USER, or ROLE. Default value is NONE.

      • databaseName string Required

        The database against which the database user authenticates. Database users must provide both a username and authentication database to log into MongoDB. If the user authenticates with AWS IAM, x.509, LDAP, or OIDC Workload this value should be $external. If the user authenticates with SCRAM-SHA or OIDC Workforce, this value should be admin.

        Values are admin or $external. Default value is admin.

      • deleteAfterDate string(date-time)

        Date and time when MongoDB Cloud deletes the user. This parameter expresses its value in the ISO 8601 timestamp format in UTC and can include the time zone designation. You must specify a future date that falls within one week of making the Application Programming Interface (API) request.

      • description string

        Description of this database user.

        Maximum length is 100.

      • labels array[object]

        List that contains the key-value pairs for tagging and categorizing the MongoDB database user. The labels that you define do not appear in the console.

        Human-readable labels applied to this MongoDB Cloud component.

        Hide labels attributes Show labels attributes object
        • key string

          Key applied to tag and categorize this component.

          Minimum length is 1, maximum length is 255.

        • value string

          Value set to the Key applied to tag and categorize this component.

          Minimum length is 1, maximum length is 255.

      • ldapAuthType string

        Part of the Lightweight Directory Access Protocol (LDAP) record that the database uses to authenticate this database user on the LDAP host.

        Values are NONE, GROUP, or USER. Default value is NONE.

      • oidcAuthType string

        Human-readable label that indicates whether the new database user or group authenticates with OIDC federated authentication. To create a federated authentication user, specify the value of USER in this field. To create a federated authentication group, specify the value of IDP_GROUP in this field.

        Values are NONE, IDP_GROUP, or USER. Default value is NONE.

      • roles array[object]

        List that provides the pairings of one role with one applicable database.

        Range of resources available to this database user.

        Hide roles attributes Show roles attributes object
        • collectionName string

          Collection on which this role applies.

        • databaseName string Required

          Database to which the user is granted access privileges.

        • roleName string Required

          Human-readable label that identifies a group of privileges assigned to a database user. This value can either be a built-in role or a custom role.

          Values are atlasAdmin, backup, clusterMonitor, dbAdmin, dbAdminAnyDatabase, enableSharding, read, readAnyDatabase, readWrite, readWriteAnyDatabase, or <a custom role name>.

      • scopes array[object]

        List that contains clusters, MongoDB Atlas Data Lakes, and MongoDB Atlas Streams Instances that this database user can access. If omitted, MongoDB Cloud grants the database user access to all the clusters, MongoDB Atlas Data Lakes, and MongoDB Atlas Streams Instances in the project.

        Range of resources available to this database user.

        Hide scopes attributes Show scopes attributes object
        • name string Required

          Human-readable label that identifies the cluster or MongoDB Atlas Data Lake that this database user can access.

          Format should match the following pattern: ^[a-zA-Z0-9][a-zA-Z0-9-]*$.

        • type string Required

          Category of resource that this database user can access.

          Values are CLUSTER, DATA_LAKE, or STREAM.

      • username string Required

        Human-readable label that represents the user that authenticates to MongoDB. The format of this label depends on the method of authentication:

        Authentication Method Parameter Needed Parameter Value username Format
        AWS IAM awsIAMType ROLE ARN
        AWS IAM awsIAMType USER ARN
        x.509 x509Type CUSTOMER RFC 2253 Distinguished Name
        x.509 x509Type MANAGED RFC 2253 Distinguished Name
        LDAP ldapAuthType USER RFC 2253 Distinguished Name
        LDAP ldapAuthType GROUP RFC 2253 Distinguished Name
        OIDC Workforce oidcAuthType IDP_GROUP Atlas OIDC IdP ID (found in federation settings), followed by a '/', followed by the IdP group name
        OIDC Workload oidcAuthType USER Atlas OIDC IdP ID (found in federation settings), followed by a '/', followed by the IdP user name
        SCRAM-SHA awsIAMType, x509Type, ldapAuthType, oidcAuthType NONE Alphanumeric string

        Maximum length is 1024.

      • x509Type string

        X.509 method that MongoDB Cloud uses to authenticate the database user.

        • For application-managed X.509, specify MANAGED.
        • For self-managed X.509, specify CUSTOMER.

        Users created with the CUSTOMER method require a Common Name (CN) in the username parameter. You must create externally authenticated users on the $external database.

        Values are NONE, CUSTOMER, or MANAGED. Default value is NONE.

    • totalCount integer(int32)

      Total number of documents available. MongoDB Cloud omits this value if includeCount is set to false. 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

      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.

    • reason string

      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

      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.

    • reason string

      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

      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.

    • reason string

      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

      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.

    • reason string

      Application error message returned with this error.

GET /api/atlas/v2/groups/{groupId}/databaseUsers
atlas api listDatabaseUsers --help
import (
	"os"
	"context"
	"log"
	sdk "go.mongodb.org/atlas-sdk/v20250312001/admin"
)

func main() {
	ctx := context.Background()
	clientID := os.Getenv("MONGODB_ATLAS_CLIENT_ID")
	clientSecret := os.Getenv("MONGODB_ATLAS_CLIENT_SECRET")

	client, err := sdk.NewClient(
		sdk.UseOAuthAuth(clientID, clientSecret),
		sdk.UseBaseURL(url))

	if err != nil {
		log.Fatalf("Error: %v", err)
	}

	params = &sdk.ListDatabaseUsersApiParams{}
	sdkResp, httpResp, err := client.DatabaseUsersApi.
		ListDatabaseUsersWithParams(ctx, params).
		Execute()
}
curl --header "Authorization: Bearer ${ACCESS_TOKEN}" \
  --header "Accept: application/vnd.atlas.2025-03-12+json" \
  -X GET "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/databaseUsers?pretty=true"
curl --user "${PUBLIC_KEY}:${PRIVATE_KEY}" \
  --digest \
  --header "Accept: application/vnd.atlas.2025-03-12+json" \
  -X GET "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/databaseUsers?pretty=true"
Response examples (200)
{
  "links": [
    {
      "href": "https://cloud.mongodb.com/api/atlas",
      "rel": "self"
    }
  ],
  "results": [
    {
      "awsIAMType": "NONE",
      "databaseName": "admin",
      "deleteAfterDate": "2025-05-04T09:42:00Z",
      "description": "string",
      "labels": [
        {
          "key": "string",
          "value": "string"
        }
      ],
      "ldapAuthType": "NONE",
      "links": [
        {
          "href": "https://cloud.mongodb.com/api/atlas",
          "rel": "self"
        }
      ],
      "oidcAuthType": "NONE",
      "roles": [
        {
          "collectionName": "string",
          "databaseName": "string",
          "roleName": "atlasAdmin"
        }
      ],
      "scopes": [
        {
          "name": "string",
          "type": "CLUSTER"
        }
      ],
      "username": "string",
      "x509Type": "NONE"
    }
  ],
  "totalCount": 42
}
Response examples (401)
{
  "error": 401,
  "detail": "(This is just an example, the exception may not be related to this endpoint)",
  "reason": "Unauthorized",
  "errorCode": "NOT_ORG_GROUP_CREATOR"
}
Response examples (403)
{
  "error": 403,
  "detail": "(This is just an example, the exception may not be related to this endpoint)",
  "reason": "Forbidden",
  "errorCode": "CANNOT_CHANGE_GROUP_NAME"
}
Response examples (404)
{
  "error": 404,
  "detail": "(This is just an example, the exception may not be related to this endpoint) Cannot find resource AWS",
  "reason": "Not Found",
  "errorCode": "RESOURCE_NOT_FOUND"
}
Response examples (500)
{
  "error": 500,
  "detail": "(This is just an example, the exception may not be related to this endpoint)",
  "reason": "Internal Server Error",
  "errorCode": "UNEXPECTED_ERROR"
}












Update One Database User in One Project

PATCH /api/atlas/v2/groups/{groupId}/databaseUsers/{databaseName}/{username}

Updates one database user that belongs to the specified project. To use this resource, the requesting Service Account or API Key must have the Project Owner role, Project Charts Admin role, Project Stream Processing Owner role, or the Project Database Access Admin role.

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})$.

  • databaseName string Required

    The database against which the database user authenticates. Database users must provide both a username and authentication database to log into MongoDB. If the user authenticates with AWS IAM, x.509, LDAP, or OIDC Workload this value should be $external. If the user authenticates with SCRAM-SHA or OIDC Workforce, this value should be admin.

  • username string Required

    Human-readable label that represents the user that authenticates to MongoDB. The format of this label depends on the method of authentication:

    Authentication Method Parameter Needed Parameter Value username Format
    AWS IAM awsIAMType ROLE ARN
    AWS IAM awsIAMType USER ARN
    x.509 x509Type CUSTOMER RFC 2253 Distinguished Name
    x.509 x509Type MANAGED RFC 2253 Distinguished Name
    LDAP ldapAuthType USER RFC 2253 Distinguished Name
    LDAP ldapAuthType GROUP RFC 2253 Distinguished Name
    OIDC Workforce oidcAuthType IDP_GROUP Atlas OIDC IdP ID (found in federation settings), followed by a '/', followed by the IdP group name
    OIDC Workload oidcAuthType USER Atlas OIDC IdP ID (found in federation settings), followed by a '/', followed by the IdP user name
    SCRAM-SHA awsIAMType, x509Type, ldapAuthType, oidcAuthType NONE Alphanumeric string

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.

  • pretty boolean

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

    Default value is false.

    Prettyprint
application/vnd.atlas.2023-01-01+json

Body Required

Updates one database user that belongs to the specified project.

  • awsIAMType string

    Human-readable label that indicates whether the new database user authenticates with the Amazon Web Services (AWS) Identity and Access Management (IAM) credentials associated with the user or the user's role.

    Values are NONE, USER, or ROLE. Default value is NONE.

  • databaseName string Required

    The database against which the database user authenticates. Database users must provide both a username and authentication database to log into MongoDB. If the user authenticates with AWS IAM, x.509, LDAP, or OIDC Workload this value should be $external. If the user authenticates with SCRAM-SHA or OIDC Workforce, this value should be admin.

    Values are admin or $external. Default value is admin.

  • deleteAfterDate string(date-time)

    Date and time when MongoDB Cloud deletes the user. This parameter expresses its value in the ISO 8601 timestamp format in UTC and can include the time zone designation. You must specify a future date that falls within one week of making the Application Programming Interface (API) request.

  • description string

    Description of this database user.

    Maximum length is 100.

  • groupId string Required

    Unique 24-hexadecimal digit string that identifies the project.

  • labels array[object]

    List that contains the key-value pairs for tagging and categorizing the MongoDB database user. The labels that you define do not appear in the console.

    Human-readable labels applied to this MongoDB Cloud component.

    Hide labels attributes Show labels attributes object
    • key string

      Key applied to tag and categorize this component.

      Minimum length is 1, maximum length is 255.

    • value string

      Value set to the Key applied to tag and categorize this component.

      Minimum length is 1, maximum length is 255.

  • ldapAuthType string

    Part of the Lightweight Directory Access Protocol (LDAP) record that the database uses to authenticate this database user on the LDAP host.

    Values are NONE, GROUP, or USER. Default value is NONE.

  • oidcAuthType string

    Human-readable label that indicates whether the new database user or group authenticates with OIDC federated authentication. To create a federated authentication user, specify the value of USER in this field. To create a federated authentication group, specify the value of IDP_GROUP in this field.

    Values are NONE, IDP_GROUP, or USER. Default value is NONE.

  • password string

    Alphanumeric string that authenticates this database user against the database specified in databaseName. To authenticate with SCRAM-SHA, you must specify this parameter. This parameter doesn't appear in this response.

    Minimum length is 8.

    SCRAM-SHA
  • roles array[object]

    List that provides the pairings of one role with one applicable database.

    Range of resources available to this database user.

    Hide roles attributes Show roles attributes object
    • collectionName string

      Collection on which this role applies.

    • databaseName string Required

      Database to which the user is granted access privileges.

    • roleName string Required

      Human-readable label that identifies a group of privileges assigned to a database user. This value can either be a built-in role or a custom role.

      Values are atlasAdmin, backup, clusterMonitor, dbAdmin, dbAdminAnyDatabase, enableSharding, read, readAnyDatabase, readWrite, readWriteAnyDatabase, or <a custom role name>.

  • scopes array[object]

    List that contains clusters, MongoDB Atlas Data Lakes, and MongoDB Atlas Streams Instances that this database user can access. If omitted, MongoDB Cloud grants the database user access to all the clusters, MongoDB Atlas Data Lakes, and MongoDB Atlas Streams Instances in the project.

    Range of resources available to this database user.

    Hide scopes attributes Show scopes attributes object
    • name string Required

      Human-readable label that identifies the cluster or MongoDB Atlas Data Lake that this database user can access.

      Format should match the following pattern: ^[a-zA-Z0-9][a-zA-Z0-9-]*$.

    • type string Required

      Category of resource that this database user can access.

      Values are CLUSTER, DATA_LAKE, or STREAM.

  • username string Required

    Human-readable label that represents the user that authenticates to MongoDB. The format of this label depends on the method of authentication:

    Authentication Method Parameter Needed Parameter Value username Format
    AWS IAM awsIAMType ROLE ARN
    AWS IAM awsIAMType USER ARN
    x.509 x509Type CUSTOMER RFC 2253 Distinguished Name
    x.509 x509Type MANAGED RFC 2253 Distinguished Name
    LDAP ldapAuthType USER RFC 2253 Distinguished Name
    LDAP ldapAuthType GROUP RFC 2253 Distinguished Name
    OIDC Workforce oidcAuthType IDP_GROUP Atlas OIDC IdP ID (found in federation settings), followed by a '/', followed by the IdP group name
    OIDC Workload oidcAuthType USER Atlas OIDC IdP ID (found in federation settings), followed by a '/', followed by the IdP user name
    SCRAM-SHA awsIAMType, x509Type, ldapAuthType, oidcAuthType NONE Alphanumeric string

    Maximum length is 1024.

  • x509Type string

    X.509 method that MongoDB Cloud uses to authenticate the database user.

    • For application-managed X.509, specify MANAGED.
    • For self-managed X.509, specify CUSTOMER.

    Users created with the CUSTOMER method require a Common Name (CN) in the username parameter. You must create externally authenticated users on the $external database.

    Values are NONE, CUSTOMER, or MANAGED. Default value is NONE.

Responses

  • 200 application/vnd.atlas.2023-01-01+json

    OK

    Hide response attributes Show response attributes object
    • awsIAMType string

      Human-readable label that indicates whether the new database user authenticates with the Amazon Web Services (AWS) Identity and Access Management (IAM) credentials associated with the user or the user's role.

      Values are NONE, USER, or ROLE. Default value is NONE.

    • databaseName string Required

      The database against which the database user authenticates. Database users must provide both a username and authentication database to log into MongoDB. If the user authenticates with AWS IAM, x.509, LDAP, or OIDC Workload this value should be $external. If the user authenticates with SCRAM-SHA or OIDC Workforce, this value should be admin.

      Values are admin or $external. Default value is admin.

    • deleteAfterDate string(date-time)

      Date and time when MongoDB Cloud deletes the user. This parameter expresses its value in the ISO 8601 timestamp format in UTC and can include the time zone designation. You must specify a future date that falls within one week of making the Application Programming Interface (API) request.

    • description string

      Description of this database user.

      Maximum length is 100.

    • labels array[object]

      List that contains the key-value pairs for tagging and categorizing the MongoDB database user. The labels that you define do not appear in the console.

      Human-readable labels applied to this MongoDB Cloud component.

      Hide labels attributes Show labels attributes object
      • key string

        Key applied to tag and categorize this component.

        Minimum length is 1, maximum length is 255.

      • value string

        Value set to the Key applied to tag and categorize this component.

        Minimum length is 1, maximum length is 255.

    • ldapAuthType string

      Part of the Lightweight Directory Access Protocol (LDAP) record that the database uses to authenticate this database user on the LDAP host.

      Values are NONE, GROUP, or USER. Default value is NONE.

    • oidcAuthType string

      Human-readable label that indicates whether the new database user or group authenticates with OIDC federated authentication. To create a federated authentication user, specify the value of USER in this field. To create a federated authentication group, specify the value of IDP_GROUP in this field.

      Values are NONE, IDP_GROUP, or USER. Default value is NONE.

    • roles array[object]

      List that provides the pairings of one role with one applicable database.

      Range of resources available to this database user.

      Hide roles attributes Show roles attributes object
      • collectionName string

        Collection on which this role applies.

      • databaseName string Required

        Database to which the user is granted access privileges.

      • roleName string Required

        Human-readable label that identifies a group of privileges assigned to a database user. This value can either be a built-in role or a custom role.

        Values are atlasAdmin, backup, clusterMonitor, dbAdmin, dbAdminAnyDatabase, enableSharding, read, readAnyDatabase, readWrite, readWriteAnyDatabase, or <a custom role name>.

    • scopes array[object]

      List that contains clusters, MongoDB Atlas Data Lakes, and MongoDB Atlas Streams Instances that this database user can access. If omitted, MongoDB Cloud grants the database user access to all the clusters, MongoDB Atlas Data Lakes, and MongoDB Atlas Streams Instances in the project.

      Range of resources available to this database user.

      Hide scopes attributes Show scopes attributes object
      • name string Required

        Human-readable label that identifies the cluster or MongoDB Atlas Data Lake that this database user can access.

        Format should match the following pattern: ^[a-zA-Z0-9][a-zA-Z0-9-]*$.

      • type string Required

        Category of resource that this database user can access.

        Values are CLUSTER, DATA_LAKE, or STREAM.

    • username string Required

      Human-readable label that represents the user that authenticates to MongoDB. The format of this label depends on the method of authentication:

      Authentication Method Parameter Needed Parameter Value username Format
      AWS IAM awsIAMType ROLE ARN
      AWS IAM awsIAMType USER ARN
      x.509 x509Type CUSTOMER RFC 2253 Distinguished Name
      x.509 x509Type MANAGED RFC 2253 Distinguished Name
      LDAP ldapAuthType USER RFC 2253 Distinguished Name
      LDAP ldapAuthType GROUP RFC 2253 Distinguished Name
      OIDC Workforce oidcAuthType IDP_GROUP Atlas OIDC IdP ID (found in federation settings), followed by a '/', followed by the IdP group name
      OIDC Workload oidcAuthType USER Atlas OIDC IdP ID (found in federation settings), followed by a '/', followed by the IdP user name
      SCRAM-SHA awsIAMType, x509Type, ldapAuthType, oidcAuthType NONE Alphanumeric string

      Maximum length is 1024.

    • x509Type string

      X.509 method that MongoDB Cloud uses to authenticate the database user.

      • For application-managed X.509, specify MANAGED.
      • For self-managed X.509, specify CUSTOMER.

      Users created with the CUSTOMER method require a Common Name (CN) in the username parameter. You must create externally authenticated users on the $external database.

      Values are NONE, CUSTOMER, or MANAGED. Default value is NONE.

  • 400 application/json

    Bad Request.

    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

      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.

    • reason string

      Application error message returned with this error.

  • 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

      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.

    • reason string

      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

      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.

    • reason string

      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

      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.

    • reason string

      Application error message returned with this error.

  • 409 application/json

    Conflict.

    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

      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.

    • reason string

      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

      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.

    • reason string

      Application error message returned with this error.

PATCH /api/atlas/v2/groups/{groupId}/databaseUsers/{databaseName}/{username}
atlas api updateDatabaseUser --help
import (
	"os"
	"context"
	"log"
	sdk "go.mongodb.org/atlas-sdk/v20250312001/admin"
)

func main() {
	ctx := context.Background()
	clientID := os.Getenv("MONGODB_ATLAS_CLIENT_ID")
	clientSecret := os.Getenv("MONGODB_ATLAS_CLIENT_SECRET")

	client, err := sdk.NewClient(
		sdk.UseOAuthAuth(clientID, clientSecret),
		sdk.UseBaseURL(url))

	if err != nil {
		log.Fatalf("Error: %v", err)
	}

	params = &sdk.UpdateDatabaseUserApiParams{}
	sdkResp, httpResp, err := client.DatabaseUsersApi.
		UpdateDatabaseUserWithParams(ctx, params).
		Execute()
}
curl --header "Authorization: Bearer ${ACCESS_TOKEN}" \
  --header "Accept: application/vnd.atlas.2025-03-12+json" \
  --header "Content-Type: application/json" \
  -X PATCH "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/databaseUsers/{databaseName}/{username}" \
  -d '{ <Payload> }'
curl --user "${PUBLIC_KEY}:${PRIVATE_KEY}" \
  --digest \
  --header "Accept: application/vnd.atlas.2025-03-12+json" \
  --header "Content-Type: application/json" \
  -X PATCH "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/databaseUsers/{databaseName}/{username}" \
  -d '{ <Payload> }'
Request examples
{
  "awsIAMType": "NONE",
  "databaseName": "admin",
  "deleteAfterDate": "2025-05-04T09:42:00Z",
  "description": "string",
  "groupId": "string",
  "labels": [
    {
      "key": "string",
      "value": "string"
    }
  ],
  "ldapAuthType": "NONE",
  "oidcAuthType": "NONE",
  "password": "string",
  "roles": [
    {
      "collectionName": "string",
      "databaseName": "string",
      "roleName": "atlasAdmin"
    }
  ],
  "scopes": [
    {
      "name": "string",
      "type": "CLUSTER"
    }
  ],
  "username": "string",
  "x509Type": "NONE"
}
Response examples (200)
{
  "awsIAMType": "NONE",
  "databaseName": "admin",
  "deleteAfterDate": "2025-05-04T09:42:00Z",
  "description": "string",
  "labels": [
    {
      "key": "string",
      "value": "string"
    }
  ],
  "ldapAuthType": "NONE",
  "links": [
    {
      "href": "https://cloud.mongodb.com/api/atlas",
      "rel": "self"
    }
  ],
  "oidcAuthType": "NONE",
  "roles": [
    {
      "collectionName": "string",
      "databaseName": "string",
      "roleName": "atlasAdmin"
    }
  ],
  "scopes": [
    {
      "name": "string",
      "type": "CLUSTER"
    }
  ],
  "username": "string",
  "x509Type": "NONE"
}
Response examples (400)
{
  "error": 400,
  "detail": "(This is just an example, the exception may not be related to this endpoint) No provider AWS exists.",
  "reason": "Bad Request",
  "errorCode": "VALIDATION_ERROR"
}
Response examples (401)
{
  "error": 401,
  "detail": "(This is just an example, the exception may not be related to this endpoint)",
  "reason": "Unauthorized",
  "errorCode": "NOT_ORG_GROUP_CREATOR"
}
Response examples (403)
{
  "error": 403,
  "detail": "(This is just an example, the exception may not be related to this endpoint)",
  "reason": "Forbidden",
  "errorCode": "CANNOT_CHANGE_GROUP_NAME"
}
Response examples (404)
{
  "error": 404,
  "detail": "(This is just an example, the exception may not be related to this endpoint) Cannot find resource AWS",
  "reason": "Not Found",
  "errorCode": "RESOURCE_NOT_FOUND"
}
Response examples (409)
{
  "error": 409,
  "detail": "(This is just an example, the exception may not be related to this endpoint) Cannot delete organization link while there is active migration in following project ids: 60c4fd418ebe251047c50554",
  "reason": "Conflict",
  "errorCode": "CANNOT_DELETE_ORG_ACTIVE_LIVE_MIGRATION_ATLAS_ORG_LINK"
}
Response examples (500)
{
  "error": 500,
  "detail": "(This is just an example, the exception may not be related to this endpoint)",
  "reason": "Internal Server Error",
  "errorCode": "UNEXPECTED_ERROR"
}





Update Encryption at Rest Configuration for One Project

PATCH /api/atlas/v2/groups/{groupId}/encryptionAtRest

Updates the configuration for encryption at rest using the keys you manage through your cloud provider. MongoDB Cloud encrypts all storage even if you don't use your own key management. This resource requires the requesting Service Account or API Key to have the Project Owner role. This feature isn't available for M0 free clusters, M2, M5, or serverless clusters.

After you configure at least one Encryption at Rest using a Customer Key Management provider for the MongoDB Cloud project, Project Owners can enable Encryption at Rest using Customer Key Management for each MongoDB Cloud cluster for which they require encryption. The Encryption at Rest using Customer Key Management provider doesn't have to match the cluster cloud service provider. MongoDB Cloud doesn't automatically rotate user-managed encryption keys. Defer to your preferred Encryption at Rest using Customer Key Management provider's documentation and guidance for best practices on key rotation. MongoDB Cloud automatically creates a 90-day key rotation alert when you configure Encryption at Rest using Customer Key Management using your Key Management in an MongoDB Cloud project. MongoDB Cloud encrypts all storage whether or not you use your own key management.

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})$.

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.

  • pretty boolean

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

    Default value is false.

    Prettyprint
application/vnd.atlas.2023-01-01+json

Body Required

Required parameters depend on whether someone has enabled Encryption at Rest using Customer Key Management:

If you have enabled Encryption at Rest using Customer Key Management (CMK), Atlas requires all of the parameters for the desired encryption provider.

  • To use AWS Key Management Service (KMS), MongoDB Cloud requires all the fields in the awsKms object.
  • To use Azure Key Vault, MongoDB Cloud requires all the fields in the azureKeyVault object.
  • To use Google Cloud Key Management Service (KMS), MongoDB Cloud requires all the fields in the googleCloudKms object.

If you enabled Encryption at Rest using Customer Key Management, administrators can pass only the changed fields for the awsKms, azureKeyVault, or googleCloudKms object to update the configuration to this endpoint.

  • awsKms object

    Amazon Web Services (AWS) KMS configuration details and encryption at rest configuration set for the specified project.

    Amazon Web Services Key Management Service
    Hide awsKms attributes Show awsKms attributes object
    • accessKeyID string

      Unique alphanumeric string that identifies an Identity and Access Management (IAM) access key with permissions required to access your Amazon Web Services (AWS) Customer Master Key (CMK).

      Minimum length is 16, maximum length is 128.

    • customerMasterKeyID string

      Unique alphanumeric string that identifies the Amazon Web Services (AWS) Customer Master Key (CMK) you used to encrypt and decrypt the MongoDB master keys.

      Minimum length is 1, maximum length is 2048.

    • enabled boolean

      Flag that indicates whether someone enabled encryption at rest for the specified project through Amazon Web Services (AWS) Key Management Service (KMS). To disable encryption at rest using customer key management and remove the configuration details, pass only this parameter with a value of false.

    • region string

      Physical location where MongoDB Cloud deploys your AWS-hosted MongoDB cluster nodes. The region you choose can affect network latency for clients accessing your databases. When MongoDB Cloud deploys a dedicated cluster, it checks if a VPC or VPC connection exists for that provider and region. If not, MongoDB Cloud creates them as part of the deployment. MongoDB Cloud assigns the VPC a CIDR block. To limit a new VPC peering connection to one CIDR block and region, create the connection first. Deploy the cluster after the connection starts.

      Values are US_GOV_WEST_1, US_GOV_EAST_1, US_EAST_1, US_EAST_2, US_WEST_1, US_WEST_2, CA_CENTRAL_1, EU_NORTH_1, EU_WEST_1, EU_WEST_2, EU_WEST_3, EU_CENTRAL_1, EU_CENTRAL_2, AP_EAST_1, AP_NORTHEAST_1, AP_NORTHEAST_2, AP_NORTHEAST_3, AP_SOUTHEAST_1, AP_SOUTHEAST_2, AP_SOUTHEAST_3, AP_SOUTHEAST_4, AP_SOUTH_1, AP_SOUTH_2, SA_EAST_1, CN_NORTH_1, CN_NORTHWEST_1, ME_SOUTH_1, ME_CENTRAL_1, AF_SOUTH_1, EU_SOUTH_1, EU_SOUTH_2, IL_CENTRAL_1, CA_WEST_1, AP_SOUTHEAST_5, AP_SOUTHEAST_7, MX_CENTRAL_1, or GLOBAL.

    • requirePrivateNetworking boolean

      Enable connection to your Amazon Web Services (AWS) Key Management Service (KMS) over private networking.

    • roleId string

      Unique 24-hexadecimal digit string that identifies an Amazon Web Services (AWS) Identity and Access Management (IAM) role. This IAM role has the permissions required to manage your AWS customer master key.

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

    • secretAccessKey string

      Human-readable label of the Identity and Access Management (IAM) secret access key with permissions required to access your Amazon Web Services (AWS) customer master key.

  • azureKeyVault object

    Details that define the configuration of Encryption at Rest using Azure Key Vault (AKV).

    Azure Key Vault
    Hide azureKeyVault attributes Show azureKeyVault attributes object
    • azureEnvironment string

      Azure environment in which your account credentials reside.

      Values are AZURE or AZURE_CHINA.

    • clientID string(uuid)

      Unique 36-hexadecimal character string that identifies an Azure application associated with your Azure Active Directory tenant.

    • enabled boolean

      Flag that indicates whether someone enabled encryption at rest for the specified project. To disable encryption at rest using customer key management and remove the configuration details, pass only this parameter with a value of false.

    • keyIdentifier string

      Web address with a unique key that identifies for your Azure Key Vault.

    • keyVaultName string

      Unique string that identifies the Azure Key Vault that contains your key. This field cannot be modified when you enable and set up private endpoint connections to your Azure Key Vault.

    • requirePrivateNetworking boolean

      Enable connection to your Azure Key Vault over private networking.

    • resourceGroupName string

      Name of the Azure resource group that contains your Azure Key Vault. This field cannot be modified when you enable and set up private endpoint connections to your Azure Key Vault.

    • secret string

      Private data that you need secured and that belongs to the specified Azure Key Vault (AKV) tenant (azureKeyVault.tenantID). This data can include any type of sensitive data such as passwords, database connection strings, API keys, and the like. AKV stores this information as encrypted binary data.

      Azure Key Vault Secrets
    • subscriptionID string(uuid)

      Unique 36-hexadecimal character string that identifies your Azure subscription. This field cannot be modified when you enable and set up private endpoint connections to your Azure Key Vault.

    • tenantID string(uuid)

      Unique 36-hexadecimal character string that identifies the Azure Active Directory tenant within your Azure subscription.

  • enabledForSearchNodes boolean

    Flag that indicates whether Encryption at Rest for Dedicated Search Nodes is enabled in the specified project.

  • googleCloudKms object

    Details that define the configuration of Encryption at Rest using Google Cloud Key Management Service (KMS).

    Google Cloud Key Management Service
    Hide googleCloudKms attributes Show googleCloudKms attributes object
    • enabled boolean

      Flag that indicates whether someone enabled encryption at rest for the specified project. To disable encryption at rest using customer key management and remove the configuration details, pass only this parameter with a value of false.

    • keyVersionResourceID string

      Resource path that displays the key version resource ID for your Google Cloud KMS.

    • roleId string

      Unique 24-hexadecimal digit string that identifies the Google Cloud Provider Access Role that MongoDB Cloud uses to access the Google Cloud KMS.

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

    • serviceAccountKey string

      JavaScript Object Notation (JSON) object that contains the Google Cloud Key Management Service (KMS). Format the JSON as a string and not as an object.

      Google Cloud Authentication

Responses

  • 200 application/vnd.atlas.2023-01-01+json

    OK

    Hide response attributes Show response attributes object
    • awsKms object

      Amazon Web Services (AWS) KMS configuration details and encryption at rest configuration set for the specified project.

      Amazon Web Services Key Management Service
      Hide awsKms attributes Show awsKms attributes object
      • accessKeyID string

        Unique alphanumeric string that identifies an Identity and Access Management (IAM) access key with permissions required to access your Amazon Web Services (AWS) Customer Master Key (CMK).

        Minimum length is 16, maximum length is 128.

      • customerMasterKeyID string

        Unique alphanumeric string that identifies the Amazon Web Services (AWS) Customer Master Key (CMK) you used to encrypt and decrypt the MongoDB master keys.

        Minimum length is 1, maximum length is 2048.

      • enabled boolean

        Flag that indicates whether someone enabled encryption at rest for the specified project through Amazon Web Services (AWS) Key Management Service (KMS). To disable encryption at rest using customer key management and remove the configuration details, pass only this parameter with a value of false.

      • region string

        Physical location where MongoDB Cloud deploys your AWS-hosted MongoDB cluster nodes. The region you choose can affect network latency for clients accessing your databases. When MongoDB Cloud deploys a dedicated cluster, it checks if a VPC or VPC connection exists for that provider and region. If not, MongoDB Cloud creates them as part of the deployment. MongoDB Cloud assigns the VPC a CIDR block. To limit a new VPC peering connection to one CIDR block and region, create the connection first. Deploy the cluster after the connection starts.

        Values are US_GOV_WEST_1, US_GOV_EAST_1, US_EAST_1, US_EAST_2, US_WEST_1, US_WEST_2, CA_CENTRAL_1, EU_NORTH_1, EU_WEST_1, EU_WEST_2, EU_WEST_3, EU_CENTRAL_1, EU_CENTRAL_2, AP_EAST_1, AP_NORTHEAST_1, AP_NORTHEAST_2, AP_NORTHEAST_3, AP_SOUTHEAST_1, AP_SOUTHEAST_2, AP_SOUTHEAST_3, AP_SOUTHEAST_4, AP_SOUTH_1, AP_SOUTH_2, SA_EAST_1, CN_NORTH_1, CN_NORTHWEST_1, ME_SOUTH_1, ME_CENTRAL_1, AF_SOUTH_1, EU_SOUTH_1, EU_SOUTH_2, IL_CENTRAL_1, CA_WEST_1, AP_SOUTHEAST_5, AP_SOUTHEAST_7, MX_CENTRAL_1, or GLOBAL.

      • requirePrivateNetworking boolean

        Enable connection to your Amazon Web Services (AWS) Key Management Service (KMS) over private networking.

      • valid boolean

        Flag that indicates whether the Amazon Web Services (AWS) Key Management Service (KMS) encryption key can encrypt and decrypt data.

    • azureKeyVault object

      Details that define the configuration of Encryption at Rest using Azure Key Vault (AKV).

      Azure Key Vault
      Hide azureKeyVault attributes Show azureKeyVault attributes object
      • azureEnvironment string

        Azure environment in which your account credentials reside.

        Values are AZURE or AZURE_CHINA.

      • clientID string(uuid)

        Unique 36-hexadecimal character string that identifies an Azure application associated with your Azure Active Directory tenant.

      • enabled boolean

        Flag that indicates whether someone enabled encryption at rest for the specified project. To disable encryption at rest using customer key management and remove the configuration details, pass only this parameter with a value of false.

      • keyIdentifier string

        Web address with a unique key that identifies for your Azure Key Vault.

      • keyVaultName string

        Unique string that identifies the Azure Key Vault that contains your key. This field cannot be modified when you enable and set up private endpoint connections to your Azure Key Vault.

      • requirePrivateNetworking boolean

        Enable connection to your Azure Key Vault over private networking.

      • resourceGroupName string

        Name of the Azure resource group that contains your Azure Key Vault. This field cannot be modified when you enable and set up private endpoint connections to your Azure Key Vault.

      • subscriptionID string(uuid)

        Unique 36-hexadecimal character string that identifies your Azure subscription. This field cannot be modified when you enable and set up private endpoint connections to your Azure Key Vault.

      • tenantID string(uuid)

        Unique 36-hexadecimal character string that identifies the Azure Active Directory tenant within your Azure subscription.

      • valid boolean

        Flag that indicates whether the Azure encryption key can encrypt and decrypt data.

    • enabledForSearchNodes boolean

      Flag that indicates whether Encryption at Rest for Dedicated Search Nodes is enabled in the specified project.

    • googleCloudKms object

      Details that define the configuration of Encryption at Rest using Google Cloud Key Management Service (KMS).

      Google Cloud Key Management Service
      Hide googleCloudKms attributes Show googleCloudKms attributes object
      • enabled boolean

        Flag that indicates whether someone enabled encryption at rest for the specified project. To disable encryption at rest using customer key management and remove the configuration details, pass only this parameter with a value of false.

      • keyVersionResourceID string

        Resource path that displays the key version resource ID for your Google Cloud KMS.

      • roleId string

        Unique 24-hexadecimal digit string that identifies the Google Cloud Provider Access Role that MongoDB Cloud uses to access the Google Cloud KMS.

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

      • valid boolean

        Flag that indicates whether the Google Cloud Key Management Service (KMS) encryption key can encrypt and decrypt data.

  • 400 application/json

    Bad Request.

    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

      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.

    • reason string

      Application error message returned with this error.

  • 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

      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.

    • reason string

      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

      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.

    • reason string

      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

      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.

    • reason string

      Application error message returned with this error.

  • 409 application/json

    Conflict.

    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

      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.

    • reason string

      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

      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.

    • reason string

      Application error message returned with this error.

PATCH /api/atlas/v2/groups/{groupId}/encryptionAtRest
atlas api updateEncryptionAtRest --help
import (
	"os"
	"context"
	"log"
	sdk "go.mongodb.org/atlas-sdk/v20250312001/admin"
)

func main() {
	ctx := context.Background()
	clientID := os.Getenv("MONGODB_ATLAS_CLIENT_ID")
	clientSecret := os.Getenv("MONGODB_ATLAS_CLIENT_SECRET")

	client, err := sdk.NewClient(
		sdk.UseOAuthAuth(clientID, clientSecret),
		sdk.UseBaseURL(url))

	if err != nil {
		log.Fatalf("Error: %v", err)
	}

	params = &sdk.UpdateEncryptionAtRestApiParams{}
	sdkResp, httpResp, err := client.EncryptionatRestusingCustomerKeyManagementApi.
		UpdateEncryptionAtRestWithParams(ctx, params).
		Execute()
}
curl --header "Authorization: Bearer ${ACCESS_TOKEN}" \
  --header "Accept: application/vnd.atlas.2025-03-12+json" \
  --header "Content-Type: application/json" \
  -X PATCH "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/encryptionAtRest" \
  -d '{ <Payload> }'
curl --user "${PUBLIC_KEY}:${PRIVATE_KEY}" \
  --digest \
  --header "Accept: application/vnd.atlas.2025-03-12+json" \
  --header "Content-Type: application/json" \
  -X PATCH "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/encryptionAtRest" \
  -d '{ <Payload> }'
Request examples
{
  "awsKms": {
    "accessKeyID": "019dd98d94b4bb778e7552e4",
    "customerMasterKeyID": "string",
    "enabled": true,
    "region": "US_GOV_WEST_1",
    "requirePrivateNetworking": true,
    "roleId": "32b6e34b3d91647abb20e7b8",
    "secretAccessKey": "string"
  },
  "azureKeyVault": {
    "azureEnvironment": "AZURE",
    "clientID": "string",
    "enabled": true,
    "keyIdentifier": "https://EXAMPLEKeyVault.vault.azure.net/keys/EXAMPLEKey/d891821e3d364e9eb88fbd3d11807b86",
    "keyVaultName": "string",
    "requirePrivateNetworking": true,
    "resourceGroupName": "string",
    "secret": "string",
    "subscriptionID": "string",
    "tenantID": "string"
  },
  "enabledForSearchNodes": true,
  "googleCloudKms": {
    "enabled": true,
    "keyVersionResourceID": "projects/my-project-common-0/locations/us-east4/keyRings/my-key-ring-0/cryptoKeys/my-key-0/cryptoKeyVersions/1",
    "roleId": "32b6e34b3d91647abb20e7b8",
    "serviceAccountKey": "string"
  }
}
Response examples (200)
{
  "awsKms": {
    "accessKeyID": "019dd98d94b4bb778e7552e4",
    "customerMasterKeyID": "string",
    "enabled": true,
    "region": "US_GOV_WEST_1",
    "requirePrivateNetworking": true,
    "valid": true
  },
  "azureKeyVault": {
    "azureEnvironment": "AZURE",
    "clientID": "string",
    "enabled": true,
    "keyIdentifier": "https://EXAMPLEKeyVault.vault.azure.net/keys/EXAMPLEKey/d891821e3d364e9eb88fbd3d11807b86",
    "keyVaultName": "string",
    "requirePrivateNetworking": true,
    "resourceGroupName": "string",
    "subscriptionID": "string",
    "tenantID": "string",
    "valid": true
  },
  "enabledForSearchNodes": true,
  "googleCloudKms": {
    "enabled": true,
    "keyVersionResourceID": "projects/my-project-common-0/locations/us-east4/keyRings/my-key-ring-0/cryptoKeys/my-key-0/cryptoKeyVersions/1",
    "roleId": "32b6e34b3d91647abb20e7b8",
    "valid": true
  }
}
Response examples (400)
{
  "error": 400,
  "detail": "(This is just an example, the exception may not be related to this endpoint) No provider AWS exists.",
  "reason": "Bad Request",
  "errorCode": "VALIDATION_ERROR"
}
Response examples (401)
{
  "error": 401,
  "detail": "(This is just an example, the exception may not be related to this endpoint)",
  "reason": "Unauthorized",
  "errorCode": "NOT_ORG_GROUP_CREATOR"
}
Response examples (403)
{
  "error": 403,
  "detail": "(This is just an example, the exception may not be related to this endpoint)",
  "reason": "Forbidden",
  "errorCode": "CANNOT_CHANGE_GROUP_NAME"
}
Response examples (404)
{
  "error": 404,
  "detail": "(This is just an example, the exception may not be related to this endpoint) Cannot find resource AWS",
  "reason": "Not Found",
  "errorCode": "RESOURCE_NOT_FOUND"
}
Response examples (409)
{
  "error": 409,
  "detail": "(This is just an example, the exception may not be related to this endpoint) Cannot delete organization link while there is active migration in following project ids: 60c4fd418ebe251047c50554",
  "reason": "Conflict",
  "errorCode": "CANNOT_DELETE_ORG_ACTIVE_LIVE_MIGRATION_ATLAS_ORG_LINK"
}
Response examples (500)
{
  "error": 500,
  "detail": "(This is just an example, the exception may not be related to this endpoint)",
  "reason": "Internal Server Error",
  "errorCode": "UNEXPECTED_ERROR"
}

















Return All Event Types

GET /api/atlas/v2/eventTypes

Returns a list of all event types, along with a description and additional metadata about each event.

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 the response returns the total number of items (totalCount) in the response.

    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

Responses

  • 200 application/vnd.atlas.2023-01-01+json

    OK

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

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

      A singular type of event

      Hide results attributes Show results attributes object
      • alertable boolean

        Whether or not this event type can be configured as an alert via the API.

      • description string

        Description of the event type.

      • eventType string

        Enum representation of the event type.

    • totalCount integer(int32)

      Total number of documents available. MongoDB Cloud omits this value if includeCount is set to false. 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

      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.

    • reason string

      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

      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.

    • reason string

      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

      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.

    • reason string

      Application error message returned with this error.

atlas api listEventTypes --help
import (
	"os"
	"context"
	"log"
	sdk "go.mongodb.org/atlas-sdk/v20250312001/admin"
)

func main() {
	ctx := context.Background()
	clientID := os.Getenv("MONGODB_ATLAS_CLIENT_ID")
	clientSecret := os.Getenv("MONGODB_ATLAS_CLIENT_SECRET")

	client, err := sdk.NewClient(
		sdk.UseOAuthAuth(clientID, clientSecret),
		sdk.UseBaseURL(url))

	if err != nil {
		log.Fatalf("Error: %v", err)
	}

	params = &sdk.ListEventTypesApiParams{}
	sdkResp, httpResp, err := client.EventsApi.
		ListEventTypesWithParams(ctx, params).
		Execute()
}
curl --header "Authorization: Bearer ${ACCESS_TOKEN}" \
  --header "Accept: application/vnd.atlas.2025-03-12+json" \
  -X GET "https://cloud.mongodb.com/api/atlas/v2/eventTypes?pretty=true"
curl --user "${PUBLIC_KEY}:${PRIVATE_KEY}" \
  --digest \
  --header "Accept: application/vnd.atlas.2025-03-12+json" \
  -X GET "https://cloud.mongodb.com/api/atlas/v2/eventTypes?pretty=true"
Response examples (200)
{
  "links": [
    {
      "href": "https://cloud.mongodb.com/api/atlas",
      "rel": "self"
    }
  ],
  "results": [
    {
      "alertable": true,
      "description": "string",
      "eventType": "string"
    }
  ],
  "totalCount": 42
}
Response examples (401)
{
  "error": 401,
  "detail": "(This is just an example, the exception may not be related to this endpoint)",
  "reason": "Unauthorized",
  "errorCode": "NOT_ORG_GROUP_CREATOR"
}
Response examples (403)
{
  "error": 403,
  "detail": "(This is just an example, the exception may not be related to this endpoint)",
  "reason": "Forbidden",
  "errorCode": "CANNOT_CHANGE_GROUP_NAME"
}
Response examples (500)
{
  "error": 500,
  "detail": "(This is just an example, the exception may not be related to this endpoint)",
  "reason": "Internal Server Error",
  "errorCode": "UNEXPECTED_ERROR"
}
















Federated Authentication

Returns, adds, edits, and removes federation-related features such as role mappings and connected organization configurations.

































Update One Role Mapping in One Organization

PUT /api/atlas/v2/federationSettings/{federationSettingsId}/connectedOrgConfigs/{orgId}/roleMappings/{id}

Updates one role mapping in the specified organization in the specified federation. To use this resource, the requesting Service Account or API Key must have the Organization Owner role.

Path parameters

  • federationSettingsId string Required

    Unique 24-hexadecimal digit string that identifies your federation.

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

  • id string Required

    Unique 24-hexadecimal digit string that identifies the role mapping that you want to update.

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

  • orgId string Required

    Unique 24-hexadecimal digit string that identifies the organization that contains your projects. Use the /orgs endpoint to retrieve all organizations to which the authenticated user has access.

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

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.

application/vnd.atlas.2023-01-01+json

Body Required

The role mapping that you want to update.

  • externalGroupName string Required

    Unique human-readable label that identifies the identity provider group to which this role mapping applies.

    Minimum length is 1, maximum length is 200.

  • roleAssignments array[object]

    Atlas roles and the unique identifiers of the groups and organizations associated with each role. The array must include at least one element with an Organization role and its respective orgId. Each element in the array can have a value for orgId or groupId, but not both.

    Hide roleAssignments attributes Show roleAssignments attributes object
    • groupId string

      Unique 24-hexadecimal digit string that identifies the project to which this role belongs. Each element within roleAssignments can have a value for groupId or orgId, but not both.

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

    • orgId string

      Unique 24-hexadecimal digit string that identifies the organization to which this role belongs. Each element within roleAssignments can have a value for orgId or groupId, but not both.

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

    • role string

      Human-readable label that identifies the collection of privileges that MongoDB Cloud grants a specific API key, MongoDB Cloud user, or MongoDB Cloud team. These roles include organization- and project-level roles.

      Values are ORG_OWNER, ORG_MEMBER, ORG_GROUP_CREATOR, ORG_BILLING_ADMIN, ORG_BILLING_READ_ONLY, ORG_READ_ONLY, GROUP_BACKUP_MANAGER, GROUP_CLUSTER_MANAGER, GROUP_DATA_ACCESS_ADMIN, GROUP_DATA_ACCESS_READ_ONLY, GROUP_DATA_ACCESS_READ_WRITE, GROUP_DATABASE_ACCESS_ADMIN, GROUP_OBSERVABILITY_VIEWER, GROUP_OWNER, GROUP_READ_ONLY, GROUP_SEARCH_INDEX_EDITOR, or GROUP_STREAM_PROCESSING_OWNER.

Responses

  • 200 application/vnd.atlas.2023-01-01+json

    OK

    Hide response attributes Show response attributes object
    • externalGroupName string Required

      Unique human-readable label that identifies the identity provider group to which this role mapping applies.

      Minimum length is 1, maximum length is 200.

    • id string

      Unique 24-hexadecimal digit string that identifies this role mapping.

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

    • roleAssignments array[object]

      Atlas roles and the unique identifiers of the groups and organizations associated with each role. The array must include at least one element with an Organization role and its respective orgId. Each element in the array can have a value for orgId or groupId, but not both.

      Hide roleAssignments attributes Show roleAssignments attributes object
      • groupId string

        Unique 24-hexadecimal digit string that identifies the project to which this role belongs. Each element within roleAssignments can have a value for groupId or orgId, but not both.

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

      • orgId string

        Unique 24-hexadecimal digit string that identifies the organization to which this role belongs. Each element within roleAssignments can have a value for orgId or groupId, but not both.

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

      • role string

        Human-readable label that identifies the collection of privileges that MongoDB Cloud grants a specific API key, MongoDB Cloud user, or MongoDB Cloud team. These roles include organization- and project-level roles.

        Values are ORG_OWNER, ORG_MEMBER, ORG_GROUP_CREATOR, ORG_BILLING_ADMIN, ORG_BILLING_READ_ONLY, ORG_READ_ONLY, GROUP_BACKUP_MANAGER, GROUP_CLUSTER_MANAGER, GROUP_DATA_ACCESS_ADMIN, GROUP_DATA_ACCESS_READ_ONLY, GROUP_DATA_ACCESS_READ_WRITE, GROUP_DATABASE_ACCESS_ADMIN, GROUP_OBSERVABILITY_VIEWER, GROUP_OWNER, GROUP_READ_ONLY, GROUP_SEARCH_INDEX_EDITOR, or GROUP_STREAM_PROCESSING_OWNER.

  • 400 application/json

    Bad Request.

    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

      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.

    • reason string

      Application error message returned with this error.

  • 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

      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.

    • reason string

      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

      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.

    • reason string

      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

      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.

    • reason string

      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

      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.

    • reason string

      Application error message returned with this error.

PUT /api/atlas/v2/federationSettings/{federationSettingsId}/connectedOrgConfigs/{orgId}/roleMappings/{id}
atlas api updateRoleMapping --help
import (
	"os"
	"context"
	"log"
	sdk "go.mongodb.org/atlas-sdk/v20250312001/admin"
)

func main() {
	ctx := context.Background()
	clientID := os.Getenv("MONGODB_ATLAS_CLIENT_ID")
	clientSecret := os.Getenv("MONGODB_ATLAS_CLIENT_SECRET")

	client, err := sdk.NewClient(
		sdk.UseOAuthAuth(clientID, clientSecret),
		sdk.UseBaseURL(url))

	if err != nil {
		log.Fatalf("Error: %v", err)
	}

	params = &sdk.UpdateRoleMappingApiParams{}
	sdkResp, httpResp, err := client.FederatedAuthenticationApi.
		UpdateRoleMappingWithParams(ctx, params).
		Execute()
}
curl --header "Authorization: Bearer ${ACCESS_TOKEN}" \
  --header "Accept: application/vnd.atlas.2025-03-12+json" \
  --header "Content-Type: application/json" \
  -X PUT "https://cloud.mongodb.com/api/atlas/v2/federationSettings/{federationSettingsId}/connectedOrgConfigs/{orgId}/roleMappings/{id}" \
  -d '{ <Payload> }'
curl --user "${PUBLIC_KEY}:${PRIVATE_KEY}" \
  --digest \
  --header "Accept: application/vnd.atlas.2025-03-12+json" \
  --header "Content-Type: application/json" \
  -X PUT "https://cloud.mongodb.com/api/atlas/v2/federationSettings/{federationSettingsId}/connectedOrgConfigs/{orgId}/roleMappings/{id}" \
  -d '{ <Payload> }'
Request examples
{
  "externalGroupName": "string",
  "roleAssignments": [
    {
      "groupId": "32b6e34b3d91647abb20e7b8",
      "orgId": "32b6e34b3d91647abb20e7b8",
      "role": "ORG_OWNER"
    }
  ]
}
Response examples (200)
{
  "externalGroupName": "string",
  "id": "32b6e34b3d91647abb20e7b8",
  "roleAssignments": [
    {
      "groupId": "32b6e34b3d91647abb20e7b8",
      "orgId": "32b6e34b3d91647abb20e7b8",
      "role": "ORG_OWNER"
    }
  ]
}
Response examples (400)
{
  "error": 400,
  "detail": "(This is just an example, the exception may not be related to this endpoint) No provider AWS exists.",
  "reason": "Bad Request",
  "errorCode": "VALIDATION_ERROR"
}
Response examples (401)
{
  "error": 401,
  "detail": "(This is just an example, the exception may not be related to this endpoint)",
  "reason": "Unauthorized",
  "errorCode": "NOT_ORG_GROUP_CREATOR"
}
Response examples (403)
{
  "error": 403,
  "detail": "(This is just an example, the exception may not be related to this endpoint)",
  "reason": "Forbidden",
  "errorCode": "CANNOT_CHANGE_GROUP_NAME"
}
Response examples (404)
{
  "error": 404,
  "detail": "(This is just an example, the exception may not be related to this endpoint) Cannot find resource AWS",
  "reason": "Not Found",
  "errorCode": "RESOURCE_NOT_FOUND"
}
Response examples (500)
{
  "error": 500,
  "detail": "(This is just an example, the exception may not be related to this endpoint)",
  "reason": "Internal Server Error",
  "errorCode": "UNEXPECTED_ERROR"
}
















Delete One Identity Provider

DELETE /api/atlas/v2/federationSettings/{federationSettingsId}/identityProviders/{identityProviderId}

Deletes one identity provider in the specified federation. To use this resource, the requesting Service Account or API Key must have the Organization Owner role in one of the connected organizations.

Note: Requests to this resource will fail if the identity provider has any connected organizations. Before deleting an identity provider, disconnect all organizations and confirm that no organization in your account uses this identity provider.

Manage Organization Mapping for Federated Authentication

Path parameters

  • federationSettingsId string Required

    Unique 24-hexadecimal digit string that identifies your federation.

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

  • identityProviderId string Required

    Unique 24-hexadecimal digit string that identifies the identity provider to connect.

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.

Responses

  • 204 application/vnd.atlas.2023-11-15+json

    No Response

  • 400 application/json

    Bad Request.

    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

      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.

    • reason string

      Application error message returned with this error.

  • 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

      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.

    • reason string

      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

      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.

    • reason string

      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

      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.

    • reason string

      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

      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.

    • reason string

      Application error message returned with this error.

DELETE /api/atlas/v2/federationSettings/{federationSettingsId}/identityProviders/{identityProviderId}
atlas api deleteIdentityProvider --help
import (
	"os"
	"context"
	"log"
	sdk "go.mongodb.org/atlas-sdk/v20250312001/admin"
)

func main() {
	ctx := context.Background()
	clientID := os.Getenv("MONGODB_ATLAS_CLIENT_ID")
	clientSecret := os.Getenv("MONGODB_ATLAS_CLIENT_SECRET")

	client, err := sdk.NewClient(
		sdk.UseOAuthAuth(clientID, clientSecret),
		sdk.UseBaseURL(url))

	if err != nil {
		log.Fatalf("Error: %v", err)
	}

	params = &sdk.DeleteIdentityProviderApiParams{}
	httpResp, err := client.FederatedAuthenticationApi.
		DeleteIdentityProviderWithParams(ctx, params).
		Execute()
}
curl --header "Authorization: Bearer ${ACCESS_TOKEN}" \
  --header "Accept: application/vnd.atlas.2025-03-12+json" \
  -X DELETE "https://cloud.mongodb.com/api/atlas/v2/federationSettings/{federationSettingsId}/identityProviders/{identityProviderId}"
curl --user "${PUBLIC_KEY}:${PRIVATE_KEY}" \
  --digest \
  --header "Accept: application/vnd.atlas.2025-03-12+json" \
  -X DELETE "https://cloud.mongodb.com/api/atlas/v2/federationSettings/{federationSettingsId}/identityProviders/{identityProviderId}"
Response examples (400)
{
  "error": 400,
  "detail": "(This is just an example, the exception may not be related to this endpoint) No provider AWS exists.",
  "reason": "Bad Request",
  "errorCode": "VALIDATION_ERROR"
}
Response examples (401)
{
  "error": 401,
  "detail": "(This is just an example, the exception may not be related to this endpoint)",
  "reason": "Unauthorized",
  "errorCode": "NOT_ORG_GROUP_CREATOR"
}
Response examples (403)
{
  "error": 403,
  "detail": "(This is just an example, the exception may not be related to this endpoint)",
  "reason": "Forbidden",
  "errorCode": "CANNOT_CHANGE_GROUP_NAME"
}
Response examples (404)
{
  "error": 404,
  "detail": "(This is just an example, the exception may not be related to this endpoint) Cannot find resource AWS",
  "reason": "Not Found",
  "errorCode": "RESOURCE_NOT_FOUND"
}
Response examples (500)
{
  "error": 500,
  "detail": "(This is just an example, the exception may not be related to this endpoint)",
  "reason": "Internal Server Error",
  "errorCode": "UNEXPECTED_ERROR"
}





















Create One Flex Cluster in One Project

POST /api/atlas/v2/groups/{groupId}/flexClusters

Creates one flex cluster in the specified project. To use this resource, the requesting Service Account or API Key must have the Project Owner role.

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})$.

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.

  • pretty boolean

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

    Default value is false.

    Prettyprint
application/vnd.atlas.2024-11-13+json

Body Required

Create One Flex Cluster in One Project.

  • name string Required

    Human-readable label that identifies the instance.

    Format should match the following pattern: ^[a-zA-Z0-9][a-zA-Z0-9-]*$.

  • providerSettings object Required

    Group of cloud provider settings that configure the provisioned MongoDB flex cluster.

    Hide providerSettings attributes Show providerSettings attributes object
    • backingProviderName string Required

      Cloud service provider on which MongoDB Cloud provisioned the flex cluster.

      Values are AWS, AZURE, or GCP.

    • regionName string Required

      Human-readable label that identifies the geographic location of your MongoDB flex cluster. The region you choose can affect network latency for clients accessing your databases. For a complete list of region names, see AWS, GCP, and Azure.

  • tags array[object]

    List that contains key-value pairs between 1 to 255 characters in length for tagging and categorizing the instance.

    Key-value pair that tags and categorizes a MongoDB Cloud organization, project, or cluster. For example, environment : production.

    Resource Tags
    Hide tags attributes Show tags attributes object
    • key string Required

      Constant that defines the set of the tag. For example, environment in the environment : production tag.

      Minimum length is 1, maximum length is 255.

    • value string Required

      Variable that belongs to the set of the tag. For example, production in the environment : production tag.

      Minimum length is 1, maximum length is 255.

  • terminationProtectionEnabled boolean

    Flag that indicates whether termination protection is enabled on the cluster. If set to true, MongoDB Cloud won't delete the cluster. If set to false, MongoDB Cloud will delete the cluster.

    Default value is false.

Responses

  • 201 application/vnd.atlas.2024-11-13+json

    Created

    Hide response attributes Show response attributes object
    • backupSettings object

      Flex backup configuration.

      Hide backupSettings attribute Show backupSettings attribute object
      • enabled boolean

        Flag that indicates whether backups are performed for this flex cluster. Backup uses flex cluster backups.

        Default value is true.

        Flex Cluster Backups
    • clusterType string

      Flex cluster topology.

      Value is REPLICASET. Default value is REPLICASET.

    • connectionStrings object

      Collection of Uniform Resource Locators that point to the MongoDB database.

      Connection string URI format
      Hide connectionStrings attributes Show connectionStrings attributes object
      • standard string

        Public connection string that you can use to connect to this cluster. This connection string uses the mongodb:// protocol.

        Connection String URI Format
      • standardSrv string

        Public connection string that you can use to connect to this flex cluster. This connection string uses the mongodb+srv:// protocol.

        Connection String URI Format
    • createDate string(date-time)

      Date and time when MongoDB Cloud created this instance. This parameter expresses its value in ISO 8601 format in UTC.

    • groupId string

      Unique 24-hexadecimal character string that identifies the project.

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

    • id string

      Unique 24-hexadecimal digit string that identifies the instance.

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

    • mongoDBVersion string

      Version of MongoDB that the instance runs.

      Format should match the following pattern: ([\d]+\.[\d]+\.[\d]+).

    • name string

      Human-readable label that identifies the instance.

      Format should match the following pattern: ^[a-zA-Z0-9][a-zA-Z0-9-]*$.

    • providerSettings object Required

      Group of cloud provider settings that configure the provisioned MongoDB flex cluster.

      Hide providerSettings attributes Show providerSettings attributes object
      • backingProviderName string

        Cloud service provider on which MongoDB Cloud provisioned the flex cluster.

        Values are AWS, AZURE, or GCP.

      • diskSizeGB number(double)

        Storage capacity available to the flex cluster expressed in gigabytes.

      • providerName string

        Human-readable label that identifies the provider type.

        Value is FLEX. Default value is FLEX.

      • regionName string

        Human-readable label that identifies the geographic location of your MongoDB flex cluster. The region you choose can affect network latency for clients accessing your databases. For a complete list of region names, see AWS, GCP, and Azure.

    • stateName string

      Human-readable label that indicates the current operating condition of this instance.

      Values are IDLE, CREATING, UPDATING, DELETING, or REPAIRING.

    • tags array[object]

      List that contains key-value pairs between 1 to 255 characters in length for tagging and categorizing the instance.

      Key-value pair that tags and categorizes a MongoDB Cloud organization, project, or cluster. For example, environment : production.

      Resource Tags
      Hide tags attributes Show tags attributes object
      • key string Required

        Constant that defines the set of the tag. For example, environment in the environment : production tag.

        Minimum length is 1, maximum length is 255.

      • value string Required

        Variable that belongs to the set of the tag. For example, production in the environment : production tag.

        Minimum length is 1, maximum length is 255.

    • terminationProtectionEnabled boolean

      Flag that indicates whether termination protection is enabled on the cluster. If set to true, MongoDB Cloud won't delete the cluster. If set to false, MongoDB Cloud will delete the cluster.

      Default value is false.

    • versionReleaseSystem string

      Method by which the cluster maintains the MongoDB versions.

      Value is LTS. Default value is LTS.

  • 400 application/json

    Bad Request.

    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

      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.

    • reason string

      Application error message returned with this error.

  • 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

      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.

    • reason string

      Application error message returned with this error.

  • 402 application/json

    Payment Required.

    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

      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.

    • reason string

      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

      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.

    • reason string

      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

      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.

    • reason string

      Application error message returned with this error.

  • 409 application/json

    Conflict.

    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

      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.

    • reason string

      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

      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.

    • reason string

      Application error message returned with this error.

POST /api/atlas/v2/groups/{groupId}/flexClusters
atlas api createFlexCluster --help
import (
	"os"
	"context"
	"log"
	sdk "go.mongodb.org/atlas-sdk/v20250312001/admin"
)

func main() {
	ctx := context.Background()
	clientID := os.Getenv("MONGODB_ATLAS_CLIENT_ID")
	clientSecret := os.Getenv("MONGODB_ATLAS_CLIENT_SECRET")

	client, err := sdk.NewClient(
		sdk.UseOAuthAuth(clientID, clientSecret),
		sdk.UseBaseURL(url))

	if err != nil {
		log.Fatalf("Error: %v", err)
	}

	params = &sdk.CreateFlexClusterApiParams{}
	sdkResp, httpResp, err := client.FlexClustersApi.
		CreateFlexClusterWithParams(ctx, params).
		Execute()
}
curl --header "Authorization: Bearer ${ACCESS_TOKEN}" \
  --header "Accept: application/vnd.atlas.2025-03-12+json" \
  --header "Content-Type: application/json" \
  -X POST "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/flexClusters" \
  -d '{ <Payload> }'
curl --user "${PUBLIC_KEY}:${PRIVATE_KEY}" \
  --digest \
  --header "Accept: application/vnd.atlas.2025-03-12+json" \
  --header "Content-Type: application/json" \
  -X POST "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/flexClusters" \
  -d '{ <Payload> }'
Request examples
{
  "name": "string",
  "providerSettings": {
    "backingProviderName": "AWS",
    "regionName": "string"
  },
  "tags": [
    {
      "key": "string",
      "value": "string"
    }
  ],
  "terminationProtectionEnabled": false
}
Response examples (201)
{
  "backupSettings": {
    "enabled": true
  },
  "clusterType": "REPLICASET",
  "connectionStrings": {
    "standard": "string",
    "standardSrv": "string"
  },
  "createDate": "2025-05-04T09:42:00Z",
  "groupId": "32b6e34b3d91647abb20e7b8",
  "id": "32b6e34b3d91647abb20e7b8",
  "links": [
    {
      "href": "https://cloud.mongodb.com/api/atlas",
      "rel": "self"
    }
  ],
  "mongoDBVersion": "string",
  "name": "string",
  "providerSettings": {
    "backingProviderName": "AWS",
    "diskSizeGB": 42.0,
    "providerName": "FLEX",
    "regionName": "string"
  },
  "stateName": "IDLE",
  "tags": [
    {
      "key": "string",
      "value": "string"
    }
  ],
  "terminationProtectionEnabled": false,
  "versionReleaseSystem": "LTS"
}
Response examples (400)
{
  "error": 400,
  "detail": "(This is just an example, the exception may not be related to this endpoint) No provider AWS exists.",
  "reason": "Bad Request",
  "errorCode": "VALIDATION_ERROR"
}
Response examples (401)
{
  "error": 401,
  "detail": "(This is just an example, the exception may not be related to this endpoint)",
  "reason": "Unauthorized",
  "errorCode": "NOT_ORG_GROUP_CREATOR"
}
Response examples (402)
{
  "error": 402,
  "detail": "(This is just an example, the exception may not be related to this endpoint)",
  "reason": "Payment Required",
  "errorCode": "NO_PAYMENT_INFORMATION_FOUND"
}
Response examples (403)
{
  "error": 403,
  "detail": "(This is just an example, the exception may not be related to this endpoint)",
  "reason": "Forbidden",
  "errorCode": "CANNOT_CHANGE_GROUP_NAME"
}
Response examples (404)
{
  "error": 404,
  "detail": "(This is just an example, the exception may not be related to this endpoint) Cannot find resource AWS",
  "reason": "Not Found",
  "errorCode": "RESOURCE_NOT_FOUND"
}
Response examples (409)
{
  "error": 409,
  "detail": "(This is just an example, the exception may not be related to this endpoint) Cannot delete organization link while there is active migration in following project ids: 60c4fd418ebe251047c50554",
  "reason": "Conflict",
  "errorCode": "CANNOT_DELETE_ORG_ACTIVE_LIVE_MIGRATION_ATLAS_ORG_LINK"
}
Response examples (500)
{
  "error": 500,
  "detail": "(This is just an example, the exception may not be related to this endpoint)",
  "reason": "Internal Server Error",
  "errorCode": "UNEXPECTED_ERROR"
}




































































Return results from a given Cost Explorer query, or notify that the results are not ready yet.

GET /api/atlas/v2/orgs/{orgId}/billing/costExplorer/usage/{token}

Returns the usage details for a Cost Explorer query, if the query is finished and the data is ready to be viewed. If the data is not ready, a 'processing' response willindicate that another request should be sent later to view the data.

Path parameters

  • orgId string Required

    Unique 24-hexadecimal digit string that identifies the organization that contains your projects. Use the /orgs endpoint to retrieve all organizations to which the authenticated user has access.

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

  • token string Required

    Unique 64 digit string that identifies the Cost Explorer query.

    Minimum length is 64, maximum length is 64.

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.

Responses

  • 102

    Processing

  • OK

  • 400 application/json

    Bad Request.

    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

      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.

    • reason string

      Application error message returned with this error.

  • 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

      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.

    • reason string

      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

      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.

    • reason string

      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

      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.

    • reason string

      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

      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.

    • reason string

      Application error message returned with this error.

GET /api/atlas/v2/orgs/{orgId}/billing/costExplorer/usage/{token}
atlas api getCostExplorerQueryProcess --help
import (
	"os"
	"context"
	"log"
	sdk "go.mongodb.org/atlas-sdk/v20250312001/admin"
)

func main() {
	ctx := context.Background()
	clientID := os.Getenv("MONGODB_ATLAS_CLIENT_ID")
	clientSecret := os.Getenv("MONGODB_ATLAS_CLIENT_SECRET")

	client, err := sdk.NewClient(
		sdk.UseOAuthAuth(clientID, clientSecret),
		sdk.UseBaseURL(url))

	if err != nil {
		log.Fatalf("Error: %v", err)
	}

	params = &sdk.GetCostExplorerQueryProcessApiParams{}
	sdkResp, httpResp, err := client.InvoicesApi.
		GetCostExplorerQueryProcessWithParams(ctx, params).
		Execute()
}
curl --header "Authorization: Bearer ${ACCESS_TOKEN}" \
  --header "Accept: application/vnd.atlas.2025-03-12+json" \
  -X GET "https://cloud.mongodb.com/api/atlas/v2/orgs/{orgId}/billing/costExplorer/usage/{token}?pretty=true"
curl --user "${PUBLIC_KEY}:${PRIVATE_KEY}" \
  --digest \
  --header "Accept: application/vnd.atlas.2025-03-12+json" \
  -X GET "https://cloud.mongodb.com/api/atlas/v2/orgs/{orgId}/billing/costExplorer/usage/{token}?pretty=true"
Response examples (200)
Billed Date,666acb8787ba90706905dcae,
Invoice Id,"June 1, 2024 - July 1, 2024",
Organization Name,Test 2,
Organization ID,666acb8787ba90706905dcae,
Project Name,666acb8787ba90706905dcae,
Project Id,666acb8787ba90706905dcae,
Cluster Name,TestCluster
Cluster Unique Id,666acb8787ba90706905dcae
Usage Amount, 1018.39
Response examples (400)
{
  "error": 400,
  "detail": "(This is just an example, the exception may not be related to this endpoint) No provider AWS exists.",
  "reason": "Bad Request",
  "errorCode": "VALIDATION_ERROR"
}
Response examples (401)
{
  "error": 401,
  "detail": "(This is just an example, the exception may not be related to this endpoint)",
  "reason": "Unauthorized",
  "errorCode": "NOT_ORG_GROUP_CREATOR"
}
Response examples (403)
{
  "error": 403,
  "detail": "(This is just an example, the exception may not be related to this endpoint)",
  "reason": "Forbidden",
  "errorCode": "CANNOT_CHANGE_GROUP_NAME"
}
Response examples (404)
{
  "error": 404,
  "detail": "(This is just an example, the exception may not be related to this endpoint) Cannot find resource AWS",
  "reason": "Not Found",
  "errorCode": "RESOURCE_NOT_FOUND"
}
Response examples (500)
{
  "error": 500,
  "detail": "(This is just an example, the exception may not be related to this endpoint)",
  "reason": "Internal Server Error",
  "errorCode": "UNEXPECTED_ERROR"
}

Return All Invoices for One Organization

GET /api/atlas/v2/orgs/{orgId}/invoices

Returns all invoices that MongoDB issued to the specified organization. This list includes all invoices regardless of invoice status. To use this resource, the requesting Service Account or API Key must have the Organization Billing Viewer, Organization Billing Admin, or Organization Owner role. If you have a cross-organization setup, you can view linked invoices if you have the Organization Billing Admin or Organization Owner role. To compute the total owed amount of the invoices - sum up total owed of each invoice. It could be computed as a sum of owed amount of each payment included into the invoice. To compute payment's owed amount - use formula totalBilledCents * unitPrice + salesTax - startingBalanceCents.

Path parameters

  • orgId string Required

    Unique 24-hexadecimal digit string that identifies the organization that contains your projects. Use the /orgs endpoint to retrieve all organizations to which the authenticated user has access.

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

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 the response returns the total number of items (totalCount) in the response.

    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
  • viewLinkedInvoices boolean

    Flag that indicates whether to return linked invoices in the linkedInvoices field.

    Default value is true.

  • statusNames array[string]

    Statuses of the invoice to be retrieved. Omit to return invoices of all statuses.

    Values are PENDING, CLOSED, FORGIVEN, FAILED, PAID, FREE, PREPAID, or INVOICED.

  • fromDate string(date)

    Retrieve the invoices the startDates of which are greater than or equal to the fromDate. If omit, the invoices return will go back to earliest startDate.

  • toDate string(date)

    Retrieve the invoices the endDates of which are smaller than or equal to the toDate. If omit, the invoices return will go further to latest endDate.

  • sortBy string

    Field used to sort the returned invoices by. Use in combination with orderBy parameter to control the order of the result.

    Values are START_DATE or END_DATE. Default value is END_DATE.

  • orderBy string

    Field used to order the returned invoices by. Use in combination of sortBy parameter to control the order of the result.

    Values are desc or asc. Default value is desc.

Responses

  • 200 application/vnd.atlas.2023-01-01+json

    OK

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

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

      Hide results attributes Show results attributes object
      • amountBilledCents integer(int64)

        Sum of services that the specified organization consumed in the period covered in this invoice. This parameter expresses its value in cents (100ths of one US Dollar).

      • amountPaidCents integer(int64)

        Sum that the specified organization paid toward this invoice. This parameter expresses its value in cents (100ths of one US Dollar).

      • created string(date-time)

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

      • creditsCents integer(int64)

        Sum that MongoDB credited the specified organization toward this invoice. This parameter expresses its value in cents (100ths of one US Dollar).

      • endDate string(date-time)

        Date and time when MongoDB Cloud finished the billing period that this invoice covers. This parameter expresses its value in the ISO 8601 timestamp format in UTC.

      • id string

        Unique 24-hexadecimal digit string that identifies the invoice submitted to the specified organization. Charges typically post the next day.

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

      • linkedInvoices array[object]

        List that contains the invoices for organizations linked to the paying organization.

      • orgId string

        Unique 24-hexadecimal digit string that identifies the organization charged for services consumed from MongoDB Cloud.

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

      • salesTaxCents integer(int64)

        Sum of sales tax applied to this invoice. This parameter expresses its value in cents (100ths of one US Dollar).

      • startDate string(date-time)

        Date and time when MongoDB Cloud began the billing period that this invoice covers. This parameter expresses its value in the ISO 8601 timestamp format in UTC.

      • startingBalanceCents integer(int64)

        Sum that the specified organization owed to MongoDB when MongoDB issued this invoice. This parameter expresses its value in US Dollars.

      • statusName string

        Phase of payment processing in which this invoice exists when you made this request. Accepted phases include:

        • CLOSED: MongoDB finalized all charges in the billing cycle but has yet to charge the customer.
        • FAILED: MongoDB attempted to charge the provided credit card but charge for that amount failed.
        • FORGIVEN: Customer initiated payment which MongoDB later forgave.
        • FREE: All charges totalled zero so the customer won't be charged.
        • INVOICED: MongoDB handled these charges using elastic invoicing.
        • PAID: MongoDB succeeded in charging the provided credit card.
        • PENDING: Invoice includes charges for the current billing cycle.
        • PREPAID: Customer has a pre-paid plan so they won't be charged.

        Values are PENDING, CLOSED, FORGIVEN, FAILED, PAID, FREE, PREPAID, or INVOICED.

      • subtotalCents integer(int64)

        Sum of all positive invoice line items contained in this invoice. This parameter expresses its value in cents (100ths of one US Dollar).

      • updated string(date-time)

        Date and time when MongoDB Cloud last updated the value of this payment. This parameter expresses its value in the ISO 8601 timestamp format in UTC.

    • totalCount integer(int32)

      Total number of documents available. MongoDB Cloud omits this value if includeCount is set to false. 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

      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.

    • reason string

      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

      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.

    • reason string

      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

      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.

    • reason string

      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

      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.

    • reason string

      Application error message returned with this error.

GET /api/atlas/v2/orgs/{orgId}/invoices
atlas api listInvoices --help
import (
	"os"
	"context"
	"log"
	sdk "go.mongodb.org/atlas-sdk/v20250312001/admin"
)

func main() {
	ctx := context.Background()
	clientID := os.Getenv("MONGODB_ATLAS_CLIENT_ID")
	clientSecret := os.Getenv("MONGODB_ATLAS_CLIENT_SECRET")

	client, err := sdk.NewClient(
		sdk.UseOAuthAuth(clientID, clientSecret),
		sdk.UseBaseURL(url))

	if err != nil {
		log.Fatalf("Error: %v", err)
	}

	params = &sdk.ListInvoicesApiParams{}
	sdkResp, httpResp, err := client.InvoicesApi.
		ListInvoicesWithParams(ctx, params).
		Execute()
}
curl --header "Authorization: Bearer ${ACCESS_TOKEN}" \
  --header "Accept: application/vnd.atlas.2025-03-12+json" \
  -X GET "https://cloud.mongodb.com/api/atlas/v2/orgs/{orgId}/invoices?pretty=true"
curl --user "${PUBLIC_KEY}:${PRIVATE_KEY}" \
  --digest \
  --header "Accept: application/vnd.atlas.2025-03-12+json" \
  -X GET "https://cloud.mongodb.com/api/atlas/v2/orgs/{orgId}/invoices?pretty=true"
Response examples (200)
{
  "links": [
    {
      "href": "https://cloud.mongodb.com/api/atlas",
      "rel": "self"
    }
  ],
  "results": [
    {
      "amountBilledCents": 42,
      "amountPaidCents": 42,
      "created": "2025-05-04T09:42:00Z",
      "creditsCents": 42,
      "endDate": "2025-05-04T09:42:00Z",
      "id": "32b6e34b3d91647abb20e7b8",
      "linkedInvoices": [
        {}
      ],
      "links": [
        {
          "href": "https://cloud.mongodb.com/api/atlas",
          "rel": "self"
        }
      ],
      "orgId": "32b6e34b3d91647abb20e7b8",
      "salesTaxCents": 42,
      "startDate": "2025-05-04T09:42:00Z",
      "startingBalanceCents": 42,
      "statusName": "PENDING",
      "subtotalCents": 42,
      "updated": "2025-05-04T09:42:00Z"
    }
  ],
  "totalCount": 42
}
Response examples (401)
{
  "error": 401,
  "detail": "(This is just an example, the exception may not be related to this endpoint)",
  "reason": "Unauthorized",
  "errorCode": "NOT_ORG_GROUP_CREATOR"
}
Response examples (403)
{
  "error": 403,
  "detail": "(This is just an example, the exception may not be related to this endpoint)",
  "reason": "Forbidden",
  "errorCode": "CANNOT_CHANGE_GROUP_NAME"
}
Response examples (404)
{
  "error": 404,
  "detail": "(This is just an example, the exception may not be related to this endpoint) Cannot find resource AWS",
  "reason": "Not Found",
  "errorCode": "RESOURCE_NOT_FOUND"
}
Response examples (500)
{
  "error": 500,
  "detail": "(This is just an example, the exception may not be related to this endpoint)",
  "reason": "Internal Server Error",
  "errorCode": "UNEXPECTED_ERROR"
}








Return One Invoice as CSV for One Organization

GET /api/atlas/v2/orgs/{orgId}/invoices/{invoiceId}/csv

Returns one invoice that MongoDB issued to the specified organization in CSV format. A unique 24-hexadecimal digit string identifies the invoice. To use this resource, the requesting Service Account or API Key have at least the Organization Billing Viewer, Organization Billing Admin, or Organization Owner role. If you have a cross-organization setup, you can query for a linked invoice if you have the Organization Billing Admin or Organization Owner Role. To compute the total owed amount of the invoice - sum up total owed amount of each payment included into the invoice. To compute payment's owed amount - use formula totalBilledCents * unitPrice + salesTax - startingBalanceCents.

Path parameters

  • orgId string Required

    Unique 24-hexadecimal digit string that identifies the organization that contains your projects. Use the /orgs endpoint to retrieve all organizations to which the authenticated user has access.

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

  • invoiceId string Required

    Unique 24-hexadecimal digit string that identifies the invoice submitted to the specified organization. Charges typically post the next day.

    Format should match the following pattern: [0-9a-f]+.

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.

  • pretty boolean

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

    Default value is false.

    Prettyprint

Responses

  • 200 application/vnd.atlas.2023-01-01+csv

    OK

  • 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

      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.

    • reason string

      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

      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.

    • reason string

      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

      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.

    • reason string

      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

      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.

    • reason string

      Application error message returned with this error.

GET /api/atlas/v2/orgs/{orgId}/invoices/{invoiceId}/csv
atlas api downloadInvoiceCsv --help
import (
	"os"
	"context"
	"log"
	sdk "go.mongodb.org/atlas-sdk/v20250312001/admin"
)

func main() {
	ctx := context.Background()
	clientID := os.Getenv("MONGODB_ATLAS_CLIENT_ID")
	clientSecret := os.Getenv("MONGODB_ATLAS_CLIENT_SECRET")

	client, err := sdk.NewClient(
		sdk.UseOAuthAuth(clientID, clientSecret),
		sdk.UseBaseURL(url))

	if err != nil {
		log.Fatalf("Error: %v", err)
	}

	params = &sdk.DownloadInvoiceCsvApiParams{}
	sdkResp, httpResp, err := client.InvoicesApi.
		DownloadInvoiceCsvWithParams(ctx, params).
		Execute()
}
curl --header "Authorization: Bearer ${ACCESS_TOKEN}" \
  --header "Accept: application/vnd.atlas.2025-03-12+json" \
  -X GET "https://cloud.mongodb.com/api/atlas/v2/orgs/{orgId}/invoices/{invoiceId}/csv?pretty=true"
curl --user "${PUBLIC_KEY}:${PRIVATE_KEY}" \
  --digest \
  --header "Accept: application/vnd.atlas.2025-03-12+json" \
  -X GET "https://cloud.mongodb.com/api/atlas/v2/orgs/{orgId}/invoices/{invoiceId}/csv?pretty=true"
Response examples (200)
Invoice Number,666acb8787ba43606905dcae,
Billing Period,"June 1, 2024 - July 1, 2024",
Organization Name,Test 2,
Organization ID,666acb8787ba43606905dcac,

Date,Usage Date,Description,Note,Organization Name,Organization ID,Project,Project ID,SKU,Region,Cluster,Replica Set,Config Server,Application,Unit,Unit Price,Quantity,Discount Percent,Amount
Response examples (401)
{
  "error": 401,
  "detail": "(This is just an example, the exception may not be related to this endpoint)",
  "reason": "Unauthorized",
  "errorCode": "NOT_ORG_GROUP_CREATOR"
}
Response examples (403)
{
  "error": 403,
  "detail": "(This is just an example, the exception may not be related to this endpoint)",
  "reason": "Forbidden",
  "errorCode": "CANNOT_CHANGE_GROUP_NAME"
}
Response examples (404)
{
  "error": 404,
  "detail": "(This is just an example, the exception may not be related to this endpoint) Cannot find resource AWS",
  "reason": "Not Found",
  "errorCode": "RESOURCE_NOT_FOUND"
}
Response examples (500)
{
  "error": 500,
  "detail": "(This is just an example, the exception may not be related to this endpoint)",
  "reason": "Internal Server Error",
  "errorCode": "UNEXPECTED_ERROR"
}









Update LDAP or X.509 Configuration

PATCH /api/atlas/v2/groups/{groupId}/userSecurity

Edits the LDAP configuration for the specified project. To use this resource, the requesting Service Account or API Key must have the Project Owner role.

Updating this configuration triggers a rolling restart of the database.

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})$.

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.

  • pretty boolean

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

    Default value is false.

    Prettyprint
application/vnd.atlas.2023-01-01+json

Body Required

Updates the LDAP configuration for the specified project.

  • customerX509 object

    Settings to configure TLS Certificates for database users.

    Hide customerX509 attribute Show customerX509 attribute object
    • cas string

      Concatenated list of customer certificate authority (CA) certificates needed to authenticate database users. MongoDB Cloud expects this as a PEM-formatted certificate.

  • ldap object

    Lightweight Directory Access Protocol (LDAP) over Transport Layer Security (TLS) configuration details that apply to the specified project.

    Hide ldap attributes Show ldap attributes object
    • authenticationEnabled boolean

      Flag that indicates whether users can authenticate using an Lightweight Directory Access Protocol (LDAP) host.

    • authorizationEnabled boolean

      Flag that indicates whether users can authorize access to MongoDB Cloud resources using an Lightweight Directory Access Protocol (LDAP) host.

    • authzQueryTemplate string

      Lightweight Directory Access Protocol (LDAP) query template that MongoDB Cloud runs to obtain the LDAP groups associated with the authenticated user. MongoDB Cloud uses this parameter only for user authorization. Use the {USER} placeholder in the Uniform Resource Locator (URL) to substitute the authenticated username. The query relates to the host specified with the hostname. Format this query according to RFC 4515 and RFC 4516.

      Default value is {USER}?memberOf?base.

    • bindPassword string

      Password that MongoDB Cloud uses to authenticate the bindUsername.

    • bindUsername string

      Full Distinguished Name (DN) of the Lightweight Directory Access Protocol (LDAP) user that MongoDB Cloud uses to connect to the LDAP host. LDAP distinguished names must be formatted according to RFC 2253.

      Format should match the following pattern: ^(?:(?<cn>CN=(?<name>[^,]*)),)?(?:(?<path>(?:(?:CN|OU)=[^,]+,?)+),)?(?<domain>(?:DC=[^,]+,?)+)$.

      RFC 2253
    • caCertificate string

      Certificate Authority (CA) certificate that MongoDB Cloud uses to verify the identity of the Lightweight Directory Access Protocol (LDAP) host. MongoDB Cloud allows self-signed certificates. To delete an assigned value, pass an empty string: "caCertificate": "".

    • hostname string

      Human-readable label that identifies the hostname or Internet Protocol (IP) address of the Lightweight Directory Access Protocol (LDAP) host. This host must have access to the internet or have a Virtual Private Cloud (VPC) peering connection to your cluster.

      Format should match the following pattern: ^([0-9]{1,3}\.){3}[0-9]{1,3}|([0-9a-f]{1,4}:){7}([0-9a-f]{1,4})|(([a-z0-9]+\.){1,10}[a-z]+)?$.

    • port integer(int32)

      Port to which the Lightweight Directory Access Protocol (LDAP) host listens for client connections.

      Default value is 636.

    • userToDNMapping array[object]

      User-to-Distinguished Name (DN) map that MongoDB Cloud uses to transform a Lightweight Directory Access Protocol (LDAP) username into an LDAP DN.

      User-to-Distinguished Name (DN) map that MongoDB Cloud uses to transform a Lightweight Directory Access Protocol (LDAP) username into an LDAP DN.

      Hide userToDNMapping attributes Show userToDNMapping attributes object
      • ldapQuery string

        Lightweight Directory Access Protocol (LDAP) query template that inserts the LDAP name that the regular expression matches into an LDAP query Uniform Resource Identifier (URI). The formatting for the query must conform to RFC 4515 and RFC 4516.

      • match string Required

        Regular expression that MongoDB Cloud uses to match against the provided Lightweight Directory Access Protocol (LDAP) username. Each parenthesis-enclosed section represents a regular expression capture group that the substitution or ldapQuery template uses.

      • substitution string

        Lightweight Directory Access Protocol (LDAP) Distinguished Name (DN) template that converts the LDAP username that matches regular expression in the match parameter into an LDAP Distinguished Name (DN).

Responses

  • 202 application/vnd.atlas.2023-01-01+json

    Accepted

    Hide response attributes Show response attributes object
    • customerX509 object

      Settings to configure TLS Certificates for database users.

      Hide customerX509 attributes Show customerX509 attributes object
      • cas string

        Concatenated list of customer certificate authority (CA) certificates needed to authenticate database users. MongoDB Cloud expects this as a PEM-formatted certificate.

    • ldap object

      Lightweight Directory Access Protocol (LDAP) over Transport Layer Security (TLS) configuration details that apply to the specified project.

      Hide ldap attributes Show ldap attributes object
      • authenticationEnabled boolean

        Flag that indicates whether users can authenticate using an Lightweight Directory Access Protocol (LDAP) host.

      • authorizationEnabled boolean

        Flag that indicates whether users can authorize access to MongoDB Cloud resources using an Lightweight Directory Access Protocol (LDAP) host.

      • authzQueryTemplate string

        Lightweight Directory Access Protocol (LDAP) query template that MongoDB Cloud runs to obtain the LDAP groups associated with the authenticated user. MongoDB Cloud uses this parameter only for user authorization. Use the {USER} placeholder in the Uniform Resource Locator (URL) to substitute the authenticated username. The query relates to the host specified with the hostname. Format this query according to RFC 4515 and RFC 4516.

        Default value is {USER}?memberOf?base.

      • bindUsername string

        Full Distinguished Name (DN) of the Lightweight Directory Access Protocol (LDAP) user that MongoDB Cloud uses to connect to the LDAP host. LDAP distinguished names must be formatted according to RFC 2253.

        Format should match the following pattern: ^(?:(?<cn>CN=(?<name>[^,]*)),)?(?:(?<path>(?:(?:CN|OU)=[^,]+,?)+),)?(?<domain>(?:DC=[^,]+,?)+)$.

        RFC 2253
      • caCertificate string

        Certificate Authority (CA) certificate that MongoDB Cloud uses to verify the identity of the Lightweight Directory Access Protocol (LDAP) host. MongoDB Cloud allows self-signed certificates. To delete an assigned value, pass an empty string: "caCertificate": "".

      • hostname string

        Human-readable label that identifies the hostname or Internet Protocol (IP) address of the Lightweight Directory Access Protocol (LDAP) host. This host must have access to the internet or have a Virtual Private Cloud (VPC) peering connection to your cluster.

        Format should match the following pattern: ^([0-9]{1,3}\.){3}[0-9]{1,3}|([0-9a-f]{1,4}:){7}([0-9a-f]{1,4})|(([a-z0-9]+\.){1,10}[a-z]+)?$.

      • port integer(int32)

        Port to which the Lightweight Directory Access Protocol (LDAP) host listens for client connections.

        Default value is 636.

      • userToDNMapping array[object]

        User-to-Distinguished Name (DN) map that MongoDB Cloud uses to transform a Lightweight Directory Access Protocol (LDAP) username into an LDAP DN.

        User-to-Distinguished Name (DN) map that MongoDB Cloud uses to transform a Lightweight Directory Access Protocol (LDAP) username into an LDAP DN.

        Hide userToDNMapping attributes Show userToDNMapping attributes object
        • ldapQuery string

          Lightweight Directory Access Protocol (LDAP) query template that inserts the LDAP name that the regular expression matches into an LDAP query Uniform Resource Identifier (URI). The formatting for the query must conform to RFC 4515 and RFC 4516.

        • match string Required

          Regular expression that MongoDB Cloud uses to match against the provided Lightweight Directory Access Protocol (LDAP) username. Each parenthesis-enclosed section represents a regular expression capture group that the substitution or ldapQuery template uses.

        • substitution string

          Lightweight Directory Access Protocol (LDAP) Distinguished Name (DN) template that converts the LDAP username that matches regular expression in the match parameter into an LDAP Distinguished Name (DN).

  • 400 application/json

    Bad Request.

    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

      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.

    • reason string

      Application error message returned with this error.

  • 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

      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.

    • reason string

      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

      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.

    • reason string

      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

      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.

    • reason string

      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

      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.

    • reason string

      Application error message returned with this error.

PATCH /api/atlas/v2/groups/{groupId}/userSecurity
atlas api saveLdapConfiguration --help
import (
	"os"
	"context"
	"log"
	sdk "go.mongodb.org/atlas-sdk/v20250312001/admin"
)

func main() {
	ctx := context.Background()
	clientID := os.Getenv("MONGODB_ATLAS_CLIENT_ID")
	clientSecret := os.Getenv("MONGODB_ATLAS_CLIENT_SECRET")

	client, err := sdk.NewClient(
		sdk.UseOAuthAuth(clientID, clientSecret),
		sdk.UseBaseURL(url))

	if err != nil {
		log.Fatalf("Error: %v", err)
	}

	params = &sdk.SaveLdapConfigurationApiParams{}
	sdkResp, httpResp, err := client.LDAPConfigurationApi.
		SaveLdapConfigurationWithParams(ctx, params).
		Execute()
}
curl --header "Authorization: Bearer ${ACCESS_TOKEN}" \
  --header "Accept: application/vnd.atlas.2025-03-12+json" \
  --header "Content-Type: application/json" \
  -X PATCH "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/userSecurity" \
  -d '{ <Payload> }'
curl --user "${PUBLIC_KEY}:${PRIVATE_KEY}" \
  --digest \
  --header "Accept: application/vnd.atlas.2025-03-12+json" \
  --header "Content-Type: application/json" \
  -X PATCH "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/userSecurity" \
  -d '{ <Payload> }'
Request examples
{
  "customerX509": {
    "cas": "string"
  },
  "ldap": {
    "authenticationEnabled": true,
    "authorizationEnabled": true,
    "authzQueryTemplate": "{USER}?memberOf?base",
    "bindPassword": "string",
    "bindUsername": "CN=BindUser,CN=Users,DC=myldapserver,DC=mycompany,DC=com",
    "caCertificate": "string",
    "hostname": "string",
    "port": 636,
    "userToDNMapping": [
      {
        "ldapQuery": "string",
        "match": "(.*)",
        "substitution": "CN={0},CN=Users,DC=my-atlas-ldap-server,DC=example,DC=com"
      }
    ]
  }
}
Response examples (202)
{
  "customerX509": {
    "cas": "string",
    "links": [
      {
        "href": "https://cloud.mongodb.com/api/atlas",
        "rel": "self"
      }
    ]
  },
  "ldap": {
    "authenticationEnabled": true,
    "authorizationEnabled": true,
    "authzQueryTemplate": "{USER}?memberOf?base",
    "bindUsername": "CN=BindUser,CN=Users,DC=myldapserver,DC=mycompany,DC=com",
    "caCertificate": "string",
    "hostname": "string",
    "links": [
      {
        "href": "https://cloud.mongodb.com/api/atlas",
        "rel": "self"
      }
    ],
    "port": 636,
    "userToDNMapping": [
      {
        "ldapQuery": "string",
        "match": "(.*)",
        "substitution": "CN={0},CN=Users,DC=my-atlas-ldap-server,DC=example,DC=com"
      }
    ]
  },
  "links": [
    {
      "href": "https://cloud.mongodb.com/api/atlas",
      "rel": "self"
    }
  ]
}
Response examples (400)
{
  "error": 400,
  "detail": "(This is just an example, the exception may not be related to this endpoint) No provider AWS exists.",
  "reason": "Bad Request",
  "errorCode": "VALIDATION_ERROR"
}
Response examples (401)
{
  "error": 401,
  "detail": "(This is just an example, the exception may not be related to this endpoint)",
  "reason": "Unauthorized",
  "errorCode": "NOT_ORG_GROUP_CREATOR"
}
Response examples (403)
{
  "error": 403,
  "detail": "(This is just an example, the exception may not be related to this endpoint)",
  "reason": "Forbidden",
  "errorCode": "CANNOT_CHANGE_GROUP_NAME"
}
Response examples (404)
{
  "error": 404,
  "detail": "(This is just an example, the exception may not be related to this endpoint) Cannot find resource AWS",
  "reason": "Not Found",
  "errorCode": "RESOURCE_NOT_FOUND"
}
Response examples (500)
{
  "error": 500,
  "detail": "(This is just an example, the exception may not be related to this endpoint)",
  "reason": "Internal Server Error",
  "errorCode": "UNEXPECTED_ERROR"
}




Verify LDAP Configuration in One Project

POST /api/atlas/v2/groups/{groupId}/userSecurity/ldap/verify

Verifies the LDAP configuration for the specified project. To use this resource, the requesting Service Account or API Key must have the Project Owner role.

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})$.

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.

  • pretty boolean

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

    Default value is false.

    Prettyprint
application/vnd.atlas.2023-01-01+json

Body Required

The LDAP configuration for the specified project that you want to verify.

  • authzQueryTemplate string

    Lightweight Directory Access Protocol (LDAP) query template that MongoDB Cloud applies to create an LDAP query to return the LDAP groups associated with the authenticated MongoDB user. MongoDB Cloud uses this parameter only for user authorization.

    Use the {USER} placeholder in the Uniform Resource Locator (URL) to substitute the authenticated username. The query relates to the host specified with the hostname. Format this query per RFC 4515 and RFC 4516.

    Default value is {USER}?memberOf?base.

  • bindPassword string Required

    Password that MongoDB Cloud uses to authenticate the bindUsername.

  • bindUsername string Required

    Full Distinguished Name (DN) of the Lightweight Directory Access Protocol (LDAP) user that MongoDB Cloud uses to connect to the LDAP host. LDAP distinguished names must be formatted according to RFC 2253.

    Format should match the following pattern: ^(?:(?<cn>CN=(?<name>[^,]*)),)?(?:(?<path>(?:(?:CN|OU)=[^,]+,?)+),)?(?<domain>(?:DC=[^,]+,?)+)$.

    RFC 2253
  • caCertificate string

    Certificate Authority (CA) certificate that MongoDB Cloud uses to verify the identity of the Lightweight Directory Access Protocol (LDAP) host. MongoDB Cloud allows self-signed certificates. To delete an assigned value, pass an empty string: "caCertificate": "".

  • hostname string Required

    Human-readable label that identifies the hostname or Internet Protocol (IP) address of the Lightweight Directory Access Protocol (LDAP) host. This host must have access to the internet or have a Virtual Private Cloud (VPC) peering connection to your cluster.

    Format should match the following pattern: ^([0-9]{1,3}\.){3}[0-9]{1,3}|([0-9a-f]{1,4}:){7}([0-9a-f]{1,4})|(([a-z0-9]+\.){1,10}[a-z]+)?$.

  • port integer(int32) Required

    IANA port to which the Lightweight Directory Access Protocol (LDAP) host listens for client connections.

    Default value is 636.

Responses

  • 200 application/vnd.atlas.2023-01-01+json

    OK

    Hide response attributes Show response attributes object
    • groupId string

      Unique 24-hexadecimal digit string that identifies the project associated with this Lightweight Directory Access Protocol (LDAP) over Transport Layer Security (TLS) configuration.

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

    • request object

      Request information needed to verify an Lightweight Directory Access Protocol (LDAP) over Transport Layer Security (TLS) configuration. The response does not return the bindPassword.

      Hide request attributes Show request attributes object
      • bindUsername string Required

        Full Distinguished Name (DN) of the Lightweight Directory Access Protocol (LDAP) user that MongoDB Cloud uses to connect to the LDAP host. LDAP distinguished names must be formatted according to RFC 2253.

        Format should match the following pattern: ^(?:(?<cn>CN=(?<name>[^,]*)),)?(?:(?<path>(?:(?:CN|OU)=[^,]+,?)+),)?(?<domain>(?:DC=[^,]+,?)+)$.

        RFC 2253
      • caCertificate string

        Certificate Authority (CA) certificate that MongoDB Cloud uses to verify the identity of the Lightweight Directory Access Protocol (LDAP) host. MongoDB Cloud allows self-signed certificates. To delete an assigned value, pass an empty string: "caCertificate": "".

      • hostname string Required

        Human-readable label that identifies the hostname or Internet Protocol (IP) address of the Lightweight Directory Access Protocol (LDAP) host. This host must have access to the internet or have a Virtual Private Cloud (VPC) peering connection to your cluster.

        Format should match the following pattern: ^([0-9]{1,3}\.){3}[0-9]{1,3}|([0-9a-f]{1,4}:){7}([0-9a-f]{1,4})|(([a-z0-9]+\.){1,10}[a-z]+)?$.

      • port integer(int32) Required

        IANA port to which the Lightweight Directory Access Protocol (LDAP) host listens for client connections.

        Default value is 636.

    • requestId string

      Unique 24-hexadecimal digit string that identifies this request to verify an Lightweight Directory Access Protocol (LDAP) configuration.

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

    • status string

      Human-readable string that indicates the status of the Lightweight Directory Access Protocol (LDAP) over Transport Layer Security (TLS) configuration.

      Values are FAIL, PENDING, or SUCCESS.

    • validations array[object]

      List that contains the validation messages related to the verification of the provided Lightweight Directory Access Protocol (LDAP) over Transport Layer Security (TLS) configuration details. The list contains a document for each test that MongoDB Cloud runs. MongoDB Cloud stops running tests after the first failure.

      One test that MongoDB Cloud runs to test verification of the provided Lightweight Directory Access Protocol (LDAP) over Transport Layer Security (TLS) configuration details.

      Hide validations attributes Show validations attributes object
      • status string

        Human-readable string that indicates the result of this verification test.

        Values are FAIL or OK.

      • validationType string

        Human-readable label that identifies this verification test that MongoDB Cloud runs.

        Values are AUTHENTICATE, AUTHORIZATION_ENABLED, CONNECT, PARSE_AUTHZ_QUERY, QUERY_SERVER, SERVER_SPECIFIED, or TEMPLATE.

  • 400 application/json

    Bad Request.

    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

      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.

    • reason string

      Application error message returned with this error.

  • 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

      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.

    • reason string

      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

      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.

    • reason string

      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

      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.

    • reason string

      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

      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.

    • reason string

      Application error message returned with this error.

POST /api/atlas/v2/groups/{groupId}/userSecurity/ldap/verify
atlas api verifyLdapConfiguration --help
import (
	"os"
	"context"
	"log"
	sdk "go.mongodb.org/atlas-sdk/v20250312001/admin"
)

func main() {
	ctx := context.Background()
	clientID := os.Getenv("MONGODB_ATLAS_CLIENT_ID")
	clientSecret := os.Getenv("MONGODB_ATLAS_CLIENT_SECRET")

	client, err := sdk.NewClient(
		sdk.UseOAuthAuth(clientID, clientSecret),
		sdk.UseBaseURL(url))

	if err != nil {
		log.Fatalf("Error: %v", err)
	}

	params = &sdk.VerifyLdapConfigurationApiParams{}
	sdkResp, httpResp, err := client.LDAPConfigurationApi.
		VerifyLdapConfigurationWithParams(ctx, params).
		Execute()
}
curl --header "Authorization: Bearer ${ACCESS_TOKEN}" \
  --header "Accept: application/vnd.atlas.2025-03-12+json" \
  --header "Content-Type: application/json" \
  -X POST "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/userSecurity/ldap/verify" \
  -d '{ <Payload> }'
curl --user "${PUBLIC_KEY}:${PRIVATE_KEY}" \
  --digest \
  --header "Accept: application/vnd.atlas.2025-03-12+json" \
  --header "Content-Type: application/json" \
  -X POST "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/userSecurity/ldap/verify" \
  -d '{ <Payload> }'
Request examples
{
  "authzQueryTemplate": "{USER}?memberOf?base",
  "bindPassword": "string",
  "bindUsername": "CN=BindUser,CN=Users,DC=myldapserver,DC=mycompany,DC=com",
  "caCertificate": "string",
  "hostname": "string",
  "port": 636
}
Response examples (200)
{
  "groupId": "32b6e34b3d91647abb20e7b8",
  "links": [
    {
      "href": "https://cloud.mongodb.com/api/atlas",
      "rel": "self"
    }
  ],
  "request": {
    "bindUsername": "CN=BindUser,CN=Users,DC=myldapserver,DC=mycompany,DC=com",
    "caCertificate": "string",
    "hostname": "string",
    "links": [
      {
        "href": "https://cloud.mongodb.com/api/atlas",
        "rel": "self"
      }
    ],
    "port": 636
  },
  "requestId": "32b6e34b3d91647abb20e7b8",
  "status": "FAIL",
  "validations": [
    {
      "status": "FAIL",
      "validationType": "AUTHENTICATE"
    }
  ]
}
Response examples (400)
{
  "error": 400,
  "detail": "(This is just an example, the exception may not be related to this endpoint) No provider AWS exists.",
  "reason": "Bad Request",
  "errorCode": "VALIDATION_ERROR"
}
Response examples (401)
{
  "error": 401,
  "detail": "(This is just an example, the exception may not be related to this endpoint)",
  "reason": "Unauthorized",
  "errorCode": "NOT_ORG_GROUP_CREATOR"
}
Response examples (403)
{
  "error": 403,
  "detail": "(This is just an example, the exception may not be related to this endpoint)",
  "reason": "Forbidden",
  "errorCode": "CANNOT_CHANGE_GROUP_NAME"
}
Response examples (404)
{
  "error": 404,
  "detail": "(This is just an example, the exception may not be related to this endpoint) Cannot find resource AWS",
  "reason": "Not Found",
  "errorCode": "RESOURCE_NOT_FOUND"
}
Response examples (500)
{
  "error": 500,
  "detail": "(This is just an example, the exception may not be related to this endpoint)",
  "reason": "Internal Server Error",
  "errorCode": "UNEXPECTED_ERROR"
}


































































Defer One Maintenance Window for One Project

POST /api/atlas/v2/groups/{groupId}/maintenanceWindow/defer

Defers the maintenance window for the specified project. Urgent maintenance activities such as security patches can't wait for your chosen window. MongoDB Cloud starts those maintenance activities when needed. After you schedule maintenance for your cluster, you can't change your maintenance window until the current maintenance efforts complete. The maintenance procedure that MongoDB Cloud performs requires at least one replica set election during the maintenance window per replica set. Maintenance always begins as close to the scheduled hour as possible, but in-progress cluster updates or unexpected system issues could delay the start time. To use this resource, the requesting Service Account or API Key must have the Project Owner role.

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})$.

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.

Responses

  • 200 application/vnd.atlas.2023-01-01+json

    OK

  • 400 application/json

    Bad Request.

    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

      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.

    • reason string

      Application error message returned with this error.

  • 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

      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.

    • reason string

      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

      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.

    • reason string

      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

      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.

    • reason string

      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

      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.

    • reason string

      Application error message returned with this error.

POST /api/atlas/v2/groups/{groupId}/maintenanceWindow/defer
atlas api deferMaintenanceWindow --help
import (
	"os"
	"context"
	"log"
	sdk "go.mongodb.org/atlas-sdk/v20250312001/admin"
)

func main() {
	ctx := context.Background()
	clientID := os.Getenv("MONGODB_ATLAS_CLIENT_ID")
	clientSecret := os.Getenv("MONGODB_ATLAS_CLIENT_SECRET")

	client, err := sdk.NewClient(
		sdk.UseOAuthAuth(clientID, clientSecret),
		sdk.UseBaseURL(url))

	if err != nil {
		log.Fatalf("Error: %v", err)
	}

	params = &sdk.DeferMaintenanceWindowApiParams{}
	sdkResp, httpResp, err := client.MaintenanceWindowsApi.
		DeferMaintenanceWindowWithParams(ctx, params).
		Execute()
}
curl --header "Authorization: Bearer ${ACCESS_TOKEN}" \
  --header "Accept: application/vnd.atlas.2025-03-12+json" \
  --header "Content-Type: application/json" \
  -X POST "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/maintenanceWindow/defer" \
  -d '{ <Payload> }'
curl --user "${PUBLIC_KEY}:${PRIVATE_KEY}" \
  --digest \
  --header "Accept: application/vnd.atlas.2025-03-12+json" \
  --header "Content-Type: application/json" \
  -X POST "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/maintenanceWindow/defer" \
  -d '{ <Payload> }'
Response examples (400)
{
  "error": 400,
  "detail": "(This is just an example, the exception may not be related to this endpoint) No provider AWS exists.",
  "reason": "Bad Request",
  "errorCode": "VALIDATION_ERROR"
}
Response examples (401)
{
  "error": 401,
  "detail": "(This is just an example, the exception may not be related to this endpoint)",
  "reason": "Unauthorized",
  "errorCode": "NOT_ORG_GROUP_CREATOR"
}
Response examples (403)
{
  "error": 403,
  "detail": "(This is just an example, the exception may not be related to this endpoint)",
  "reason": "Forbidden",
  "errorCode": "CANNOT_CHANGE_GROUP_NAME"
}
Response examples (404)
{
  "error": 404,
  "detail": "(This is just an example, the exception may not be related to this endpoint) Cannot find resource AWS",
  "reason": "Not Found",
  "errorCode": "RESOURCE_NOT_FOUND"
}
Response examples (500)
{
  "error": 500,
  "detail": "(This is just an example, the exception may not be related to this endpoint)",
  "reason": "Internal Server Error",
  "errorCode": "UNEXPECTED_ERROR"
}

















































Remove One MongoDB Cloud User from One Organization

DELETE /api/atlas/v2/orgs/{orgId}/users/{userId}

Removes one MongoDB Cloud user in the specified organization. You can remove an active user or a user that has not yet accepted the invitation to join the organization. To use this resource, the requesting Service Account or API Key must have the Organization Owner role.

Note: This resource cannot be used to remove pending users invited via the deprecated Invite One MongoDB Cloud User to Join One Project endpoint.

Note: To remove pending or active users, use v2-{2025-02-19} or later. If using a deprecated version, only active users can be removed. Deprecated versions: v2-{2023-01-01}

Deprecated: Invite One MongoDB Cloud User to Join One Project

Path parameters

  • orgId string Required

    Unique 24-hexadecimal digit string that identifies the organization that contains your projects. Use the /orgs endpoint to retrieve all organizations to which the authenticated user has access.

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

  • userId string Required

    Unique 24-hexadecimal digit string that identifies the pending or active user in the organization. If you need to lookup a user's userId or verify a user's status in the organization, use the Return All MongoDB Cloud Users in One Organization resource and filter by username.

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

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.

  • pretty boolean

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

    Default value is false.

    Prettyprint

Responses

  • 204 application/vnd.atlas.2025-02-19+json

    This endpoint does not return a response body.

  • 400 application/json

    Bad Request.

    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

      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.

    • reason string

      Application error message returned with this error.

  • 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

      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.

    • reason string

      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

      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.

    • reason string

      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

      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.

    • reason string

      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

      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.

    • reason string

      Application error message returned with this error.

DELETE /api/atlas/v2/orgs/{orgId}/users/{userId}
atlas api removeOrganizationUser --help
import (
	"os"
	"context"
	"log"
	sdk "go.mongodb.org/atlas-sdk/v20250312001/admin"
)

func main() {
	ctx := context.Background()
	clientID := os.Getenv("MONGODB_ATLAS_CLIENT_ID")
	clientSecret := os.Getenv("MONGODB_ATLAS_CLIENT_SECRET")

	client, err := sdk.NewClient(
		sdk.UseOAuthAuth(clientID, clientSecret),
		sdk.UseBaseURL(url))

	if err != nil {
		log.Fatalf("Error: %v", err)
	}

	params = &sdk.RemoveOrganizationUserApiParams{}
	httpResp, err := client.MongoDBCloudUsersApi.
		RemoveOrganizationUserWithParams(ctx, params).
		Execute()
}
curl --header "Authorization: Bearer ${ACCESS_TOKEN}" \
  --header "Accept: application/vnd.atlas.2025-03-12+json" \
  -X DELETE "https://cloud.mongodb.com/api/atlas/v2/orgs/{orgId}/users/{userId}"
curl --user "${PUBLIC_KEY}:${PRIVATE_KEY}" \
  --digest \
  --header "Accept: application/vnd.atlas.2025-03-12+json" \
  -X DELETE "https://cloud.mongodb.com/api/atlas/v2/orgs/{orgId}/users/{userId}"
Response examples (400)
{
  "error": 400,
  "detail": "(This is just an example, the exception may not be related to this endpoint) No provider AWS exists.",
  "reason": "Bad Request",
  "errorCode": "VALIDATION_ERROR"
}
Response examples (401)
{
  "error": 401,
  "detail": "(This is just an example, the exception may not be related to this endpoint)",
  "reason": "Unauthorized",
  "errorCode": "NOT_ORG_GROUP_CREATOR"
}
Response examples (403)
{
  "error": 403,
  "detail": "(This is just an example, the exception may not be related to this endpoint)",
  "reason": "Forbidden",
  "errorCode": "CANNOT_CHANGE_GROUP_NAME"
}
Response examples (404)
{
  "error": 404,
  "detail": "(This is just an example, the exception may not be related to this endpoint) Cannot find resource AWS",
  "reason": "Not Found",
  "errorCode": "RESOURCE_NOT_FOUND"
}
Response examples (500)
{
  "error": 500,
  "detail": "(This is just an example, the exception may not be related to this endpoint)",
  "reason": "Internal Server Error",
  "errorCode": "UNEXPECTED_ERROR"
}





























Return All Atlas Search Metric Types for One Process

GET /api/atlas/v2/groups/{groupId}/hosts/{processId}/fts/metrics

Returns all Atlas Search metric types available for one process in the specified project. You must have the Project Read Only or higher role to view the Atlas Search metric types.

Path parameters

  • processId string Required

    Combination of hostname and IANA port that serves the MongoDB process. The host must be the hostname, fully qualified domain name (FQDN), or Internet Protocol address (IPv4 or IPv6) of the host that runs the MongoDB process (mongod or mongos). The port must be the IANA port on which the MongoDB process listens for requests.

    Format should match the following pattern: ^([0-9]{1,3}\.){3}[0-9]{1,3}|([0-9a-f]{1,4}\:){7}([0-9a-f]{1,4})|(([a-z0-9]+\.){1,10}[a-z]+)?(\:[0-9]{4,5})$.

  • 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})$.

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.

Responses

  • 200 application/vnd.atlas.2023-01-01+json

    OK

    Hide response attributes Show response attributes object
    • groupId string Required

      Unique 24-hexadecimal digit string that identifies the project.

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

    • hardwareMetrics array[object]

      List that contains all host compute, memory, and storage utilization dedicated to Atlas Search when MongoDB Atlas received this request.

      Measurement of one Atlas Search status when MongoDB Atlas received this request.

      Hide hardwareMetrics attributes Show hardwareMetrics attributes object
      • metricName string Required

        Human-readable label that identifies this Atlas Search hardware, status, or index measurement.

        Values are INDEX_SIZE_ON_DISK, NUMBER_OF_DELETES, NUMBER_OF_ERROR_QUERIES, NUMBER_OF_GETMORE_COMMANDS, NUMBER_OF_INDEX_FIELDS, NUMBER_OF_INSERTS, NUMBER_OF_SUCCESS_QUERIES, NUMBER_OF_UPDATES, REPLICATION_LAG, TOTAL_NUMBER_OF_QUERIES, FTS_DISK_USAGE, FTS_PROCESS_CPU_KERNEL, FTS_PROCESS_CPU_USER, FTS_PROCESS_NORMALIZED_CPU_KERNEL, FTS_PROCESS_NORMALIZED_CPU_USER, FTS_PROCESS_RESIDENT_MEMORY, FTS_PROCESS_SHARED_MEMORY, FTS_PROCESS_VIRTUAL_MEMORY, JVM_CURRENT_MEMORY, JVM_MAX_MEMORY, or PAGE_FAULTS.

      • units string Required

        Unit of measurement that applies to this Atlas Search metric.

        Values are BYTES, BYTES_PER_SECOND, GIGABYTES, GIGABYTES_PER_HOUR, KILOBYTES, MEGABYTES, MEGABYTES_PER_SECOND, MILLISECONDS, MILLISECONDS_LOGSCALE, PERCENT, SCALAR, SCALAR_PER_SECOND, or SECONDS.

    • indexMetrics array[object]

      List that contains all performance and utilization measurements that Atlas Search index performed by the time MongoDB Atlas received this request.

      Measurement of one Atlas Search status when MongoDB Atlas received this request.

      Hide indexMetrics attributes Show indexMetrics attributes object
      • metricName string Required

        Human-readable label that identifies this Atlas Search hardware, status, or index measurement.

        Values are INDEX_SIZE_ON_DISK, NUMBER_OF_DELETES, NUMBER_OF_ERROR_QUERIES, NUMBER_OF_GETMORE_COMMANDS, NUMBER_OF_INDEX_FIELDS, NUMBER_OF_INSERTS, NUMBER_OF_SUCCESS_QUERIES, NUMBER_OF_UPDATES, REPLICATION_LAG, TOTAL_NUMBER_OF_QUERIES, FTS_DISK_USAGE, FTS_PROCESS_CPU_KERNEL, FTS_PROCESS_CPU_USER, FTS_PROCESS_NORMALIZED_CPU_KERNEL, FTS_PROCESS_NORMALIZED_CPU_USER, FTS_PROCESS_RESIDENT_MEMORY, FTS_PROCESS_SHARED_MEMORY, FTS_PROCESS_VIRTUAL_MEMORY, JVM_CURRENT_MEMORY, JVM_MAX_MEMORY, or PAGE_FAULTS.

      • units string Required

        Unit of measurement that applies to this Atlas Search metric.

        Values are BYTES, BYTES_PER_SECOND, GIGABYTES, GIGABYTES_PER_HOUR, KILOBYTES, MEGABYTES, MEGABYTES_PER_SECOND, MILLISECONDS, MILLISECONDS_LOGSCALE, PERCENT, SCALAR, SCALAR_PER_SECOND, or SECONDS.

    • processId string Required

      Hostname and port that identifies the process.

      Format should match the following pattern: ^([0-9]{1,3}\.){3}[0-9]{1,3}|([0-9a-f]{1,4}\:){7}([0-9a-f]{1,4})|(([a-z0-9]+\.){1,10}[a-z]+)?(\:[0-9]{4,5})$.

    • statusMetrics array[object]

      List that contains all available Atlas Search status metrics when MongoDB Atlas received this request.

      Measurement of one Atlas Search status when MongoDB Atlas received this request.

      Hide statusMetrics attributes Show statusMetrics attributes object
      • metricName string Required

        Human-readable label that identifies this Atlas Search hardware, status, or index measurement.

        Values are INDEX_SIZE_ON_DISK, NUMBER_OF_DELETES, NUMBER_OF_ERROR_QUERIES, NUMBER_OF_GETMORE_COMMANDS, NUMBER_OF_INDEX_FIELDS, NUMBER_OF_INSERTS, NUMBER_OF_SUCCESS_QUERIES, NUMBER_OF_UPDATES, REPLICATION_LAG, TOTAL_NUMBER_OF_QUERIES, FTS_DISK_USAGE, FTS_PROCESS_CPU_KERNEL, FTS_PROCESS_CPU_USER, FTS_PROCESS_NORMALIZED_CPU_KERNEL, FTS_PROCESS_NORMALIZED_CPU_USER, FTS_PROCESS_RESIDENT_MEMORY, FTS_PROCESS_SHARED_MEMORY, FTS_PROCESS_VIRTUAL_MEMORY, JVM_CURRENT_MEMORY, JVM_MAX_MEMORY, or PAGE_FAULTS.

      • units string Required

        Unit of measurement that applies to this Atlas Search metric.

        Values are BYTES, BYTES_PER_SECOND, GIGABYTES, GIGABYTES_PER_HOUR, KILOBYTES, MEGABYTES, MEGABYTES_PER_SECOND, MILLISECONDS, MILLISECONDS_LOGSCALE, PERCENT, SCALAR, SCALAR_PER_SECOND, or SECONDS.

  • 400 application/json

    Bad Request.

    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

      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.

    • reason string

      Application error message returned with this error.

  • 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

      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.

    • reason string

      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

      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.

    • reason string

      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

      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.

    • reason string

      Application error message returned with this error.

  • 429 application/json

    Too Many Requests.

    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

      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.

    • reason string

      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

      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.

    • reason string

      Application error message returned with this error.

GET /api/atlas/v2/groups/{groupId}/hosts/{processId}/fts/metrics
atlas api listMetricTypes --help
import (
	"os"
	"context"
	"log"
	sdk "go.mongodb.org/atlas-sdk/v20250312001/admin"
)

func main() {
	ctx := context.Background()
	clientID := os.Getenv("MONGODB_ATLAS_CLIENT_ID")
	clientSecret := os.Getenv("MONGODB_ATLAS_CLIENT_SECRET")

	client, err := sdk.NewClient(
		sdk.UseOAuthAuth(clientID, clientSecret),
		sdk.UseBaseURL(url))

	if err != nil {
		log.Fatalf("Error: %v", err)
	}

	params = &sdk.ListMetricTypesApiParams{}
	sdkResp, httpResp, err := client.MonitoringandLogsApi.
		ListMetricTypesWithParams(ctx, params).
		Execute()
}
curl --header "Authorization: Bearer ${ACCESS_TOKEN}" \
  --header "Accept: application/vnd.atlas.2025-03-12+json" \
  -X GET "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/hosts/{processId}/fts/metrics?pretty=true"
curl --user "${PUBLIC_KEY}:${PRIVATE_KEY}" \
  --digest \
  --header "Accept: application/vnd.atlas.2025-03-12+json" \
  -X GET "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/hosts/{processId}/fts/metrics?pretty=true"
Response examples (200)
{
  "groupId": "32b6e34b3d91647abb20e7b8",
  "hardwareMetrics": [
    {
      "metricName": "INDEX_SIZE_ON_DISK",
      "units": "BYTES"
    }
  ],
  "indexMetrics": [
    {
      "metricName": "INDEX_SIZE_ON_DISK",
      "units": "BYTES"
    }
  ],
  "links": [
    {
      "href": "https://cloud.mongodb.com/api/atlas",
      "rel": "self"
    }
  ],
  "processId": "mongodb.example.com:27017",
  "statusMetrics": [
    {
      "metricName": "INDEX_SIZE_ON_DISK",
      "units": "BYTES"
    }
  ]
}
Response examples (400)
{
  "error": 400,
  "detail": "(This is just an example, the exception may not be related to this endpoint) No provider AWS exists.",
  "reason": "Bad Request",
  "errorCode": "VALIDATION_ERROR"
}
Response examples (401)
{
  "error": 401,
  "detail": "(This is just an example, the exception may not be related to this endpoint)",
  "reason": "Unauthorized",
  "errorCode": "NOT_ORG_GROUP_CREATOR"
}
Response examples (403)
{
  "error": 403,
  "detail": "(This is just an example, the exception may not be related to this endpoint)",
  "reason": "Forbidden",
  "errorCode": "CANNOT_CHANGE_GROUP_NAME"
}
Response examples (404)
{
  "error": 404,
  "detail": "(This is just an example, the exception may not be related to this endpoint) Cannot find resource AWS",
  "reason": "Not Found",
  "errorCode": "RESOURCE_NOT_FOUND"
}
Response examples (429)
{
  "error": 429,
  "detail": "(This is just an example, the exception may not be related to this endpoint)",
  "reason": "Too Many Requests",
  "errorCode": "RATE_LIMITED"
}
Response examples (500)
{
  "error": 500,
  "detail": "(This is just an example, the exception may not be related to this endpoint)",
  "reason": "Internal Server Error",
  "errorCode": "UNEXPECTED_ERROR"
}








Return Atlas Search Hardware and Status Metrics

GET /api/atlas/v2/groups/{groupId}/hosts/{processId}/fts/metrics/measurements

Returns the Atlas Search hardware and status data series within the provided time range for one process in the specified project. You must have the Project Read Only or higher role to view the Atlas Search metric types.

Path parameters

  • processId string Required

    Combination of hostname and IANA port that serves the MongoDB process. The host must be the hostname, fully qualified domain name (FQDN), or Internet Protocol address (IPv4 or IPv6) of the host that runs the MongoDB process (mongod or mongos). The port must be the IANA port on which the MongoDB process listens for requests.

    Format should match the following pattern: ^([0-9]{1,3}\.){3}[0-9]{1,3}|([0-9a-f]{1,4}\:){7}([0-9a-f]{1,4})|(([a-z0-9]+\.){1,10}[a-z]+)?(\:[0-9]{4,5})$.

  • 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})$.

Query parameters

  • granularity string Required

    Duration that specifies the interval at which Atlas reports the metrics. This parameter expresses its value in the ISO 8601 duration format in UTC.

  • period string

    Duration over which Atlas reports the metrics. This parameter expresses its value in the ISO 8601 duration format in UTC. Include this parameter when you do not set start and end.

  • start string(date-time)

    Date and time when MongoDB Cloud begins reporting the metrics. This parameter expresses its value in the ISO 8601 timestamp format in UTC. Include this parameter when you do not set period.

  • end string(date-time)

    Date and time when MongoDB Cloud stops reporting the metrics. This parameter expresses its value in the ISO 8601 timestamp format in UTC. Include this parameter when you do not set period.

  • 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.

  • metrics array[string] Required

    List that contains the metrics that you want MongoDB Atlas to report for the associated data series. If you don't set this parameter, this resource returns all hardware and status metrics for the associated data series.

    Not more than 10 elements. Values are FTS_DISK_USAGE, FTS_PROCESS_CPU_KERNEL, FTS_PROCESS_CPU_USER, FTS_PROCESS_NORMALIZED_CPU_KERNEL, FTS_PROCESS_NORMALIZED_CPU_USER, FTS_PROCESS_RESIDENT_MEMORY, FTS_PROCESS_SHARED_MEMORY, FTS_PROCESS_VIRTUAL_MEMORY, JVM_CURRENT_MEMORY, JVM_MAX_MEMORY, or PAGE_FAULTS.

Responses

  • 200 application/vnd.atlas.2023-01-01+json

    OK

    Hide response attributes Show response attributes object
    • end string(date-time)

      Date and time that specifies when to stop retrieving measurements. If you set end, you must set start. You can't set this parameter and period in the same request. This parameter expresses its value in the ISO 8601 timestamp format in UTC.

    • granularity string

      Duration that specifies the interval between measurement data points. The parameter expresses its value in ISO 8601 timestamp format in UTC. If you set this parameter, you must set either period or start and end.

      Values are PT1M, PT5M, PT1H, or P1D.

    • groupId string

      Unique 24-hexadecimal digit string that identifies the project. The project contains MongoDB processes that you want to return. The MongoDB process can be either the mongod or mongos.

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

    • hardwareMeasurements array[object]

      List that contains the Atlas Search hardware measurements.

      Hide hardwareMeasurements attributes Show hardwareMeasurements attributes object
      • dataPoints array[object]

        List that contains the value of, and metadata provided for, one data point generated at a particular moment in time. If no data point exists for a particular moment in time, the value parameter returns null.

        value of, and metadata provided for, one data point generated at a particular moment in time. If no data point exists for a particular moment in time, the value parameter returns null.

        Hide dataPoints attributes Show dataPoints attributes object
        • timestamp string(date-time)

          Date and time when this data point occurred. This parameter expresses its value in the ISO 8601 timestamp format in UTC.

        • value number

          Value that comprises this data point.

      • name string

        Human-readable label of the measurement that this data point covers.

      • units string

        Element used to quantify the measurement. The resource returns units of throughput, storage, and time.

        Values are BYTES, BYTES_PER_SECOND, GIGABYTES, GIGABYTES_PER_HOUR, MEGABYTES_PER_SECOND, MICROSECONDS, MILLISECONDS, PERCENT, SCALAR, or SCALAR_PER_SECOND.

    • processId string

      Combination of hostname and Internet Assigned Numbers Authority (IANA) port that serves the MongoDB process. The host must be the hostname, fully qualified domain name (FQDN), or Internet Protocol address (IPv4 or IPv6) of the host that runs the MongoDB process (mongod or mongos). The port must be the IANA port on which the MongoDB process listens for requests.

      Format should match the following pattern: ^([0-9]{1,3}\.){3}[0-9]{1,3}|([0-9a-f]{1,4}\:){7}([0-9a-f]{1,4})|(([a-z0-9]+\.){1,10}[a-z]+)?(\:[0-9]{4,5})$.

    • start string(date-time)

      Date and time that specifies when to start retrieving measurements. If you set start, you must set end. You can't set this parameter and period in the same request. This parameter expresses its value in the ISO 8601 timestamp format in UTC.

    • statusMeasurements array[object]

      List that contains the Atlas Search status measurements.

      Hide statusMeasurements attributes Show statusMeasurements attributes object
      • dataPoints array[object]

        List that contains the value of, and metadata provided for, one data point generated at a particular moment in time. If no data point exists for a particular moment in time, the value parameter returns null.

        value of, and metadata provided for, one data point generated at a particular moment in time. If no data point exists for a particular moment in time, the value parameter returns null.

        Hide dataPoints attributes Show dataPoints attributes object
        • timestamp string(date-time)

          Date and time when this data point occurred. This parameter expresses its value in the ISO 8601 timestamp format in UTC.

        • value number

          Value that comprises this data point.

      • name string

        Human-readable label of the measurement that this data point covers.

      • units string

        Element used to quantify the measurement. The resource returns units of throughput, storage, and time.

        Values are BYTES, BYTES_PER_SECOND, GIGABYTES, GIGABYTES_PER_HOUR, MEGABYTES_PER_SECOND, MICROSECONDS, MILLISECONDS, PERCENT, SCALAR, or SCALAR_PER_SECOND.

  • 400 application/json

    Bad Request.

    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

      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.

    • reason string

      Application error message returned with this error.

  • 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

      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.

    • reason string

      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

      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.

    • reason string

      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

      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.

    • reason string

      Application error message returned with this error.

  • 429 application/json

    Too Many Requests.

    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

      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.

    • reason string

      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

      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.

    • reason string

      Application error message returned with this error.

GET /api/atlas/v2/groups/{groupId}/hosts/{processId}/fts/metrics/measurements
atlas api getMeasurements --help
import (
	"os"
	"context"
	"log"
	sdk "go.mongodb.org/atlas-sdk/v20250312001/admin"
)

func main() {
	ctx := context.Background()
	clientID := os.Getenv("MONGODB_ATLAS_CLIENT_ID")
	clientSecret := os.Getenv("MONGODB_ATLAS_CLIENT_SECRET")

	client, err := sdk.NewClient(
		sdk.UseOAuthAuth(clientID, clientSecret),
		sdk.UseBaseURL(url))

	if err != nil {
		log.Fatalf("Error: %v", err)
	}

	params = &sdk.GetMeasurementsApiParams{}
	sdkResp, httpResp, err := client.MonitoringandLogsApi.
		GetMeasurementsWithParams(ctx, params).
		Execute()
}
curl --header "Authorization: Bearer ${ACCESS_TOKEN}" \
  --header "Accept: application/vnd.atlas.2025-03-12+json" \
  -X GET "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/hosts/{processId}/fts/metrics/measurements?pretty=true"
curl --user "${PUBLIC_KEY}:${PRIVATE_KEY}" \
  --digest \
  --header "Accept: application/vnd.atlas.2025-03-12+json" \
  -X GET "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/hosts/{processId}/fts/metrics/measurements?pretty=true"
Response examples (200)
{
  "end": "2025-05-04T09:42:00Z",
  "granularity": "PT1M",
  "groupId": "32b6e34b3d91647abb20e7b8",
  "hardwareMeasurements": [
    {
      "dataPoints": [
        {
          "timestamp": "2025-05-04T09:42:00Z",
          "value": 42.0
        }
      ],
      "name": "string",
      "units": "BYTES"
    }
  ],
  "links": [
    {
      "href": "https://cloud.mongodb.com/api/atlas",
      "rel": "self"
    }
  ],
  "processId": "mongodb.example.com:27017",
  "start": "2025-05-04T09:42:00Z",
  "statusMeasurements": [
    {
      "dataPoints": [
        {
          "timestamp": "2025-05-04T09:42:00Z",
          "value": 42.0
        }
      ],
      "name": "string",
      "units": "BYTES"
    }
  ]
}
Response examples (400)
{
  "error": 400,
  "detail": "(This is just an example, the exception may not be related to this endpoint) No provider AWS exists.",
  "reason": "Bad Request",
  "errorCode": "VALIDATION_ERROR"
}
Response examples (401)
{
  "error": 401,
  "detail": "(This is just an example, the exception may not be related to this endpoint)",
  "reason": "Unauthorized",
  "errorCode": "NOT_ORG_GROUP_CREATOR"
}
Response examples (403)
{
  "error": 403,
  "detail": "(This is just an example, the exception may not be related to this endpoint)",
  "reason": "Forbidden",
  "errorCode": "CANNOT_CHANGE_GROUP_NAME"
}
Response examples (404)
{
  "error": 404,
  "detail": "(This is just an example, the exception may not be related to this endpoint) Cannot find resource AWS",
  "reason": "Not Found",
  "errorCode": "RESOURCE_NOT_FOUND"
}
Response examples (429)
{
  "error": 429,
  "detail": "(This is just an example, the exception may not be related to this endpoint)",
  "reason": "Too Many Requests",
  "errorCode": "RATE_LIMITED"
}
Response examples (500)
{
  "error": 500,
  "detail": "(This is just an example, the exception may not be related to this endpoint)",
  "reason": "Internal Server Error",
  "errorCode": "UNEXPECTED_ERROR"
}




Return One MongoDB Process by ID

GET /api/atlas/v2/groups/{groupId}/processes/{processId}

Returns the processes for the specified host for the specified project. To use this resource, the requesting Service Account or API Key must have the Project Read Only role.

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})$.

  • processId string Required

    Combination of hostname and Internet Assigned Numbers Authority (IANA) port that serves the MongoDB process. The host must be the hostname, fully qualified domain name (FQDN), or Internet Protocol address (IPv4 or IPv6) of the host that runs the MongoDB process (mongod or mongos). The port must be the IANA port on which the MongoDB process listens for requests.

    Format should match the following pattern: ^([0-9]{1,3}\.){3}[0-9]{1,3}|([0-9a-f]{1,4}\:){7}([0-9a-f]{1,4})|(([a-z0-9]+\.){1,10}[a-z]+)?(\:[0-9]{4,5})$.

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.

  • pretty boolean

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

    Default value is false.

    Prettyprint

Responses

  • 200 application/vnd.atlas.2023-01-01+json

    OK

    Hide response attributes Show response attributes object
    • created string(date-time)

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

    • groupId string

      Unique 24-hexadecimal digit string that identifies the project. The project contains MongoDB processes that you want to return. The MongoDB process can be either the mongod or mongos.

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

    • hostname string

      Hostname, fully qualified domain name (FQDN), or Internet Protocol address (IPv4 or IPv6) of the host that runs the MongoDB process (mongod or mongos).

      Format should match the following pattern: ^([0-9]{1,3}\.){3}[0-9]{1,3}|([0-9a-f]{1,4}:){7}([0-9a-f]{1,4})|(([a-z0-9]+\.){1,10}[a-z]+)?$.

    • id string

      Combination of hostname and Internet Assigned Numbers Authority (IANA) port that serves the MongoDB process. The host must be the hostname, fully qualified domain name (FQDN), or Internet Protocol address (IPv4 or IPv6) of the host that runs the MongoDB process (mongod or mongos). The port must be the IANA port on which the MongoDB process listens for requests.

      Format should match the following pattern: ^([0-9]{1,3}\.){3}[0-9]{1,3}|([0-9a-f]{1,4}\:){7}([0-9a-f]{1,4})|(([a-z0-9]+\.){1,10}[a-z]+)?(\:[0-9]{4,5})$.

    • lastPing string(date-time)

      Date and time when MongoDB Cloud received the last ping for this MongoDB process. This parameter expresses its value in the ISO 8601 timestamp format in UTC.

    • port integer(int32)

      Internet Assigned Numbers Authority (IANA) port on which the MongoDB process listens for requests.

    • replicaSetName string

      Human-readable label that identifies the replica set that contains this process. This resource returns this parameter if this process belongs to a replica set.

    • shardName string

      Human-readable label that identifies the shard that contains this process. This resource returns this value only if this process belongs to a sharded cluster.

    • typeName string

      Type of MongoDB process that MongoDB Cloud tracks. MongoDB Cloud returns new processes as NO_DATA until MongoDB Cloud completes deploying the process.

      Values are REPLICA_PRIMARY, REPLICA_SECONDARY, RECOVERING, SHARD_MONGOS, SHARD_CONFIG, SHARD_STANDALONE, SHARD_PRIMARY, SHARD_SECONDARY, or NO_DATA.

    • userAlias string

      Human-readable label that identifies the cluster node. MongoDB Cloud sets this hostname usually to the standard hostname for the cluster node. It appears in the connection string for a cluster instead of the value of the hostname parameter.

    • version string

      Version of MongoDB that this process runs.

      Format should match the following pattern: ([\d]+\.[\d]+\.[\d]+).

  • 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

      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.

    • reason string

      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

      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.

    • reason string

      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

      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.

    • reason string

      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

      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.

    • reason string

      Application error message returned with this error.

GET /api/atlas/v2/groups/{groupId}/processes/{processId}
atlas api getAtlasProcess --help
import (
	"os"
	"context"
	"log"
	sdk "go.mongodb.org/atlas-sdk/v20250312001/admin"
)

func main() {
	ctx := context.Background()
	clientID := os.Getenv("MONGODB_ATLAS_CLIENT_ID")
	clientSecret := os.Getenv("MONGODB_ATLAS_CLIENT_SECRET")

	client, err := sdk.NewClient(
		sdk.UseOAuthAuth(clientID, clientSecret),
		sdk.UseBaseURL(url))

	if err != nil {
		log.Fatalf("Error: %v", err)
	}

	params = &sdk.GetAtlasProcessApiParams{}
	sdkResp, httpResp, err := client.MonitoringandLogsApi.
		GetAtlasProcessWithParams(ctx, params).
		Execute()
}
curl --header "Authorization: Bearer ${ACCESS_TOKEN}" \
  --header "Accept: application/vnd.atlas.2025-03-12+json" \
  -X GET "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/processes/{processId}?pretty=true"
curl --user "${PUBLIC_KEY}:${PRIVATE_KEY}" \
  --digest \
  --header "Accept: application/vnd.atlas.2025-03-12+json" \
  -X GET "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/processes/{processId}?pretty=true"
Response examples (200)
{
  "created": "2025-05-04T09:42:00Z",
  "groupId": "32b6e34b3d91647abb20e7b8",
  "hostname": "string",
  "id": "string",
  "lastPing": "2025-05-04T09:42:00Z",
  "links": [
    {
      "href": "https://cloud.mongodb.com/api/atlas",
      "rel": "self"
    }
  ],
  "port": 42,
  "replicaSetName": "string",
  "shardName": "string",
  "typeName": "REPLICA_PRIMARY",
  "userAlias": "string",
  "version": "string"
}
Response examples (401)
{
  "error": 401,
  "detail": "(This is just an example, the exception may not be related to this endpoint)",
  "reason": "Unauthorized",
  "errorCode": "NOT_ORG_GROUP_CREATOR"
}
Response examples (403)
{
  "error": 403,
  "detail": "(This is just an example, the exception may not be related to this endpoint)",
  "reason": "Forbidden",
  "errorCode": "CANNOT_CHANGE_GROUP_NAME"
}
Response examples (404)
{
  "error": 404,
  "detail": "(This is just an example, the exception may not be related to this endpoint) Cannot find resource AWS",
  "reason": "Not Found",
  "errorCode": "RESOURCE_NOT_FOUND"
}
Response examples (500)
{
  "error": 500,
  "detail": "(This is just an example, the exception may not be related to this endpoint)",
  "reason": "Internal Server Error",
  "errorCode": "UNEXPECTED_ERROR"
}