Update One Atlas Search Index by Name

PATCH /api/atlas/v2/groups/{groupId}/clusters/{clusterName}/search/indexes/{databaseName}/{collectionName}/{indexName}

Updates one Atlas Search index that you identified with its database, collection name, and index name. Atlas Search indexes define the fields on which to create the index and the analyzers to use when creating the index. 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 whose Atlas Search index you want to update.

    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

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

  • indexName string Required

    Name of the Atlas Search index to update.

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 Required

Details to update the Atlas Search index with.

  • definition object

    The index definition to update the search index to.

    One of:

    The text search index definition set by the user.

    Hide attributes Show attributes
    • 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

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

    OK

    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.

PATCH /api/atlas/v2/groups/{groupId}/clusters/{clusterName}/search/indexes/{databaseName}/{collectionName}/{indexName}
atlas api updateAtlasSearchIndexByName --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.UpdateAtlasSearchIndexByNameApiParams{}
	sdkResp, httpResp, err := client.AtlasSearchApi.
		UpdateAtlasSearchIndexByNameWithParams(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}/search/indexes/{databaseName}/{collectionName}/{indexName}" \
  -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}/search/indexes/{databaseName}/{collectionName}/{indexName}" \
  -d '{ <Payload> }'
Request examples
{
  "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"
        }
      }
    ]
  }
}
Response examples (200)
{
  "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 All Backup Snapshots for One Data Lake Pipeline Deprecated

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

Returns a list of backup snapshots that you can use to trigger an on demand pipeline run. 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.

  • 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
  • completedAfter string(date-time)

    Date and time after which MongoDB Cloud created the snapshot. If specified, MongoDB Cloud returns available backup snapshots created after this time and date only. This parameter expresses its value in the ISO 8601 timestamp format in UTC.

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.

      One of:

      Details of the replica set snapshot that MongoDB Cloud created.

      Hide attributes Show attributes
      • 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})$.

      • 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 Discriminator

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

        Value is replicaSet.

      • 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.

      • 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".

    • 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}/pipelines/{pipelineName}/availableSnapshots
atlas api listPipelineSnapshots --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.ListPipelineSnapshotsApiParams{}
	sdkResp, httpResp, err := client.DataLakePipelinesApi.
		ListPipelineSnapshotsWithParams(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}/availableSnapshots?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}/availableSnapshots?pretty=true"
Response examples (200)
{
  "links": [
    {
      "href": "https://cloud.mongodb.com/api/atlas",
      "rel": "self"
    }
  ],
  "results": [
    {
      "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"
      ],
      "snapshotType": "onDemand",
      "status": "queued",
      "storageSizeBytes": 42,
      "type": "replicaSet",
      "cloudProvider": "AWS",
      "copyRegions": [
        "string"
      ],
      "replicaSetName": "string"
    }
  ],
  "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 One Flex Cluster from One Project

GET /api/atlas/v2/groups/{groupId}/flexClusters/{name}

Returns details for one flex cluster in 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})$.

  • name string Required

    Human-readable label that identifies the flex 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-11-13+json

    OK

    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.

  • 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}/flexClusters/{name}
atlas api getFlexCluster --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.GetFlexClusterApiParams{}
	sdkResp, httpResp, err := client.FlexClustersApi.
		GetFlexClusterWithParams(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}/flexClusters/{name}?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}/flexClusters/{name}?pretty=true"
Response examples (200)
{
  "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 (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"
}






































































































































































































































































































































Remove One Network Peering Container

DELETE /api/atlas/v2/groups/{groupId}/containers/{containerId}

Removes one network peering container 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})$.

  • containerId string Required

    Unique 24-hexadecimal digit string that identifies the MongoDB Cloud network container that you want to remove.

    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.2023-01-01+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.

  • 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.

DELETE /api/atlas/v2/groups/{groupId}/containers/{containerId}
atlas api deletePeeringContainer --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.DeletePeeringContainerApiParams{}
	httpResp, err := client.NetworkPeeringApi.
		DeletePeeringContainerWithParams(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/groups/{groupId}/containers/{containerId}"
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/groups/{groupId}/containers/{containerId}"
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"
}




























































































































































































Create One Private Endpoint for One Provider

POST /api/atlas/v2/groups/{groupId}/privateEndpoint/{cloudProvider}/endpointService/{endpointServiceId}/endpoint

Creates one private endpoint for the specified cloud service provider. This cloud service provider manages the private endpoint service, which in turn manages the private endpoints for the project. To use this resource, the requesting Service Account or API Key must have the Project Owner role. To learn more about considerations, limitations, and prerequisites, see the MongoDB documentation for setting up a private endpoint.

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

  • cloudProvider string Required

    Cloud service provider that manages this private endpoint.

    Values are AWS, AZURE, or GCP. Default value is AWS.

  • endpointServiceId string Required

    Unique 24-hexadecimal digit string that identifies the private endpoint service for which you want to create a private endpoint.

    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

Creates one private endpoint for the specified cloud service provider.

Responses

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

    OK

    One of:

    Group of Private Endpoint settings.

    Hide attributes Show attributes
    • cloudProvider string Required Discriminator

      Cloud service provider that serves the requested endpoint.

      Value is AWS.

    • deleteRequested boolean

      Flag that indicates whether MongoDB Cloud received a request to remove the specified private endpoint from the private endpoint service.

    • errorMessage string

      Error message returned when requesting private connection resource. The resource returns null if the request succeeded.

    • connectionStatus string

      State of the Amazon Web Service PrivateLink connection when MongoDB Cloud received this request.

      Values are PENDING_ACCEPTANCE, PENDING, AVAILABLE, REJECTED, or DELETING.

    • interfaceEndpointId string

      Unique 24-hexadecimal digit string that identifies the interface endpoint.

  • 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}/privateEndpoint/{cloudProvider}/endpointService/{endpointServiceId}/endpoint
atlas api createPrivateEndpoint --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.CreatePrivateEndpointApiParams{}
	sdkResp, httpResp, err := client.PrivateEndpointServicesApi.
		CreatePrivateEndpointWithParams(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}/privateEndpoint/{cloudProvider}/endpointService/{endpointServiceId}/endpoint" \
  -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}/privateEndpoint/{cloudProvider}/endpointService/{endpointServiceId}/endpoint" \
  -d '{ <Payload> }'
{
  "cloudProvider": "AWS",
  "deleteRequested": true,
  "errorMessage": "string",
  "connectionStatus": "PENDING_ACCEPTANCE",
  "interfaceEndpointId": "string"
}
{
  "cloudProvider": "AWS",
  "deleteRequested": true,
  "errorMessage": "string",
  "privateEndpointConnectionName": "string",
  "privateEndpointIPAddress": "string",
  "privateEndpointResourceId": "/subscriptions/cba6d9c6-1d3f-3c11-03cb-c705d895e636/resourcegroups/qrRTqi4TSN)7yB5YLRjVDveH3.yLzpNR7Br0D3-SGrU3j0.0/providers/Microsoft.Network/privateEndpoints/pVP(vb(XeckpxtXzP0NaOsDjeWDbOK)DX8A2j2E_vBYL2.GEYIdln",
  "status": "INITIATING"
}
{
  "cloudProvider": "AWS",
  "deleteRequested": true,
  "errorMessage": "string",
  "endpointGroupName": "string",
  "endpoints": [
    {
      "endpointName": "string",
      "ipAddress": "string",
      "status": "INITIATING"
    }
  ],
  "status": "INITIATING"
}
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 Limits for One Project

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

Returns all the limits 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})$.

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:

    Details of user managed limits

    Hide attributes Show attributes
    • currentUsage integer(int64)

      Amount that indicates the current usage of the limit.

    • defaultLimit integer(int64)

      Default value of the limit.

    • maximumLimit integer(int64)

      Maximum value of the limit.

    • name string Required Discriminator

      Human-readable label that identifies the user-managed limit to modify.

      Value is atlas.project.security.networkAccess.entries.

    • value integer(int64) Required

      Amount to set the limit to.

  • 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}/limits
atlas api listProjectLimits --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.ListProjectLimitsApiParams{}
	sdkResp, httpResp, err := client.ProjectsApi.
		ListProjectLimitsWithParams(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}/limits?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}/limits?pretty=true"
Response examples (200)
[
  {
    "currentUsage": 42,
    "defaultLimit": 42,
    "maximumLimit": 42,
    "name": "atlas.project.security.networkAccess.entries",
    "value": 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 (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"
}