Return One Atlas Search Index by ID

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

Returns one Atlas Search index in the specified project. You identify this index using its unique ID. Atlas Search index contains the indexed fields and the analyzers used to create the index. To use this resource, the requesting Service Account or API Key must have the Project Data Access Read Write role.

Atlas Search Indexes

Path parameters

  • groupId string Required

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

    NOTE: Groups and projects are synonymous terms. Your group id is the same as your project id. For existing groups, your group/project id remains the same. The resource and corresponding endpoints use the term groups.

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

  • clusterName string Required

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

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

  • indexId string Required

    Unique 24-hexadecimal digit string that identifies the Application Search index. Use the Get All Application Search Indexes for a Collection API endpoint to find the IDs of all Application Search indexes.

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

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

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

    Service Unavailable.

    Hide response attributes Show response attributes object
    • badRequestDetail object

      Bad request detail.

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

        Describes all violations in a client request.

        Hide fields attributes Show fields attributes object
        • description string Required

          A description of why the request element is bad.

        • field string Required

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

    • detail string

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

    • error integer(int32) Required

      HTTP status code returned with this error.

      External documentation
    • errorCode string Required

      Application error code returned with this error.

    • parameters array[object]

      Parameters used to give more information about the error.

    • reason string

      Application error message returned with this error.

GET /api/atlas/v2/groups/{groupId}/clusters/{clusterName}/search/indexes/{indexId}
atlas api getAtlasSearchIndex --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.GetAtlasSearchIndexApiParams{}
	sdkResp, httpResp, err := client.AtlasSearchApi.
		GetAtlasSearchIndexWithParams(ctx, params).
		Execute()
}
curl --header "Authorization: Bearer ${ACCESS_TOKEN}" \
  --header "Accept: application/vnd.atlas.2025-03-12+json" \
  -X GET "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/search/indexes/{indexId}?pretty=true"
curl --user "${PUBLIC_KEY}:${PRIVATE_KEY}" \
  --digest \
  --header "Accept: application/vnd.atlas.2025-03-12+json" \
  -X GET "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/search/indexes/{indexId}?pretty=true"
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 (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"
}
Response examples (503)
{
  "badRequestDetail": {
    "fields": [
      {
        "description": "string",
        "field": "string"
      }
    ]
  },
  "detail": "string",
  "error": 42,
  "errorCode": "string",
  "parameters": [
    {}
  ],
  "reason": "string"
}































Create One Snapshot Export Bucket

POST /api/atlas/v2/groups/{groupId}/backup/exportBuckets

Creates a Snapshot Export Bucket for an AWS S3 Bucket, Azure Blob Storage Container, or Google Cloud Storage Bucket. Once created, an snapshots can be exported to the Export Bucket and its referenced AWS S3 Bucket, Azure Blob Storage Container, or Google Cloud Storage Bucket. To use this resource, the requesting Service Account or API Key must have the Project Owner role. Deprecated versions: v2-{2023-01-01}

Path parameters

  • groupId string Required

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

    NOTE: Groups and projects are synonymous terms. Your group id is the same as your project id. For existing groups, your group/project id remains the same. The resource and corresponding endpoints use the term groups.

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

Query parameters

  • envelope boolean

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

    Default value is false.

  • pretty boolean

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

    Default value is false.

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

Body object Required

Specifies the role and AWS S3 Bucket, Azure Blob Storage Container, or Google Cloud Storage Bucket that the Export Bucket should reference.

One of:

Disk backup snapshot Export Bucket Request.

  • cloudProvider string Required Discriminator

    Human-readable label that identifies the cloud provider that Snapshots are exported to.

    Value is AWS.

  • bucketName string Required

    Human-readable label that identifies the AWS S3 Bucket that the role is authorized to export to.

    Minimum length is 3, maximum length is 63.

  • iamRoleId string Required

    Unique 24-hexadecimal character string that identifies the Unified AWS Access role ID that MongoDB Cloud uses to access the AWS S3 bucket.

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

    Unified AWS Access role ID

Responses

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

    OK

    One of:

    Disk backup snapshot Export Bucket.

    Hide attributes Show attributes
    • _id string Required

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

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

    • bucketName string Required

      The name of the AWS S3 Bucket, Azure Storage Container, or Google Cloud Storage Bucket that Snapshots are exported to.

      Minimum length is 3, maximum length is 63.

    • cloudProvider string Required Discriminator

      Human-readable label that identifies the cloud provider that Snapshots will be exported to.

      Value is AWS.

    • iamRoleId string Required

      Unique 24-hexadecimal character string that identifies the Unified AWS Access role ID that MongoDB Cloud uses to access the AWS S3 bucket.

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

      Unified AWS Access role ID
  • 400 application/json

    Bad Request.

    Hide response attributes Show response attributes object
    • badRequestDetail object

      Bad request detail.

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

        Describes all violations in a client request.

        Hide fields attributes Show fields attributes object
        • description string Required

          A description of why the request element is bad.

        • field string Required

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

    • detail string

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

    • error integer(int32) Required

      HTTP status code returned with this error.

      External documentation
    • errorCode string Required

      Application error code returned with this error.

    • parameters array[object]

      Parameters used to give more information about the error.

    • reason string

      Application error message returned with this error.

  • 401 application/json

    Unauthorized.

    Hide response attributes Show response attributes object
    • badRequestDetail object

      Bad request detail.

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

        Describes all violations in a client request.

        Hide fields attributes Show fields attributes object
        • description string Required

          A description of why the request element is bad.

        • field string Required

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

    • detail string

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

    • error integer(int32) Required

      HTTP status code returned with this error.

      External documentation
    • errorCode string Required

      Application error code returned with this error.

    • parameters array[object]

      Parameters used to give more information about the error.

    • reason string

      Application error message returned with this error.

  • 403 application/json

    Forbidden.

    Hide response attributes Show response attributes object
    • badRequestDetail object

      Bad request detail.

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

        Describes all violations in a client request.

        Hide fields attributes Show fields attributes object
        • description string Required

          A description of why the request element is bad.

        • field string Required

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

    • detail string

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

    • error integer(int32) Required

      HTTP status code returned with this error.

      External documentation
    • errorCode string Required

      Application error code returned with this error.

    • parameters array[object]

      Parameters used to give more information about the error.

    • reason string

      Application error message returned with this error.

  • 404 application/json

    Not Found.

    Hide response attributes Show response attributes object
    • badRequestDetail object

      Bad request detail.

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

        Describes all violations in a client request.

        Hide fields attributes Show fields attributes object
        • description string Required

          A description of why the request element is bad.

        • field string Required

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

    • detail string

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

    • error integer(int32) Required

      HTTP status code returned with this error.

      External documentation
    • errorCode string Required

      Application error code returned with this error.

    • parameters array[object]

      Parameters used to give more information about the error.

    • reason string

      Application error message returned with this error.

  • 500 application/json

    Internal Server Error.

    Hide response attributes Show response attributes object
    • badRequestDetail object

      Bad request detail.

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

        Describes all violations in a client request.

        Hide fields attributes Show fields attributes object
        • description string Required

          A description of why the request element is bad.

        • field string Required

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

    • detail string

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

    • error integer(int32) Required

      HTTP status code returned with this error.

      External documentation
    • errorCode string Required

      Application error code returned with this error.

    • parameters array[object]

      Parameters used to give more information about the error.

    • reason string

      Application error message returned with this error.

POST /api/atlas/v2/groups/{groupId}/backup/exportBuckets
atlas api createExportBucket --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.CreateExportBucketApiParams{}
	sdkResp, httpResp, err := client.CloudBackupsApi.
		CreateExportBucketWithParams(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}/backup/exportBuckets" \
  -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}/backup/exportBuckets" \
  -d '{ <Payload> }'
Request examples
AWS
{
  "iamRoleId": "668c5f0ed436263134491592",
  "bucketName": "export-bucket",
  "cloudProvider": "AWS"
}
Azure
{
  "roleId": "668c5f0ed436263134491592",
  "bucketName": "examplecontainer",
  "serviceUrl": "https://examplestorageaccount.blob.core.windows.net/examplecontainer",
  "cloudProvider": "AZURE"
}
GCP
{
  "roleId": "668c5f0ed436263134491592",
  "bucketName": "export-bucket",
  "cloudProvider": "GCP"
}
Response examples (200)
AWS
{
  "_id": "32b6e34b3d91647abb20e7b8",
  "links": [
    {
      "rel": "self",
      "href": "https://cloud.mongodb.com/api/atlas"
    }
  ],
  "iamRoleId": "668c5f0ed436263134491592",
  "bucketName": "export-bucket",
  "cloudProvider": "AWS"
}
Azure
{
  "_id": "32b6e34b3d91647abb20e7b8",
  "links": [
    {
      "rel": "self",
      "href": "https://cloud.mongodb.com/api/atlas"
    }
  ],
  "roleId": "668c5f0ed436263134491592",
  "tenantId": "4297fc77-1592-4de8-a6d5-a8c32401df87",
  "bucketName": "examplecontainer",
  "serviceUrl": "https://examplestorageaccount.blob.core.windows.net/examplecontainer",
  "cloudProvider": "AZURE"
}
GCP
{
  "_id": "32b6e34b3d91647abb20e7b8",
  "links": [
    {
      "rel": "self",
      "href": "https://cloud.mongodb.com/api/atlas"
    }
  ],
  "roleId": "668c5f0ed436263134491592",
  "bucketName": "export-bucket",
  "cloudProvider": "GCP"
}
Response examples (400)
{
  "error": 400,
  "detail": "(This is just an example, the exception may not be related to this endpoint) No provider AWS exists.",
  "reason": "Bad Request",
  "errorCode": "VALIDATION_ERROR"
}
Response examples (401)
{
  "error": 401,
  "detail": "(This is just an example, the exception may not be related to this endpoint)",
  "reason": "Unauthorized",
  "errorCode": "NOT_ORG_GROUP_CREATOR"
}
Response examples (403)
{
  "error": 403,
  "detail": "(This is just an example, the exception may not be related to this endpoint)",
  "reason": "Forbidden",
  "errorCode": "CANNOT_CHANGE_GROUP_NAME"
}
Response examples (404)
{
  "error": 404,
  "detail": "(This is just an example, the exception may not be related to this endpoint) Cannot find resource AWS",
  "reason": "Not Found",
  "errorCode": "RESOURCE_NOT_FOUND"
}
Response examples (500)
{
  "error": 500,
  "detail": "(This is just an example, the exception may not be related to this endpoint)",
  "reason": "Internal Server Error",
  "errorCode": "UNEXPECTED_ERROR"
}







































































































































































































































































































































































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

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

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

Path parameters

  • groupId string Required

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

    NOTE: Groups and projects are synonymous terms. Your group id is the same as your project id. For existing groups, your group/project id remains the same. The resource and corresponding endpoints use the term groups.

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

Query parameters

  • envelope boolean

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

    Default value is false.

  • includeCount boolean

    Flag that indicates whether the response returns the total number of items (totalCount) in the response.

    Default value is true.

  • itemsPerPage integer

    Number of items that the response returns per page.

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

  • pageNum integer

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

    Minimum value is 1. Default value is 1.

  • pretty boolean

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

    Default value is false.

    Prettyprint

Responses

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

    OK

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

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

      Hide results attributes Show results attributes object
      • azureLinkId string

        Link ID that identifies the Azure private endpoint connection.

      • comment string

        Human-readable string to associate with this private endpoint.

      • customerEndpointDNSName string

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

      • customerEndpointIPAddress string

        IP address used to connect to the Azure private endpoint.

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

      • endpointId string Required

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

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

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

        Error message describing a failure approving the private endpoint request.

      • provider string

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

        Value is AWS. Default value is AWS.

      • region string

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

      • status string

        Status of the private endpoint connection request.

        Values are PENDING, OK, FAILED, or DELETING.

      • type string

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

        Value is DATA_LAKE. Default value is DATA_LAKE.

    • totalCount integer(int32)

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

      Minimum value is 0.

  • 400 application/json

    Bad Request.

    Hide response attributes Show response attributes object
    • badRequestDetail object

      Bad request detail.

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

        Describes all violations in a client request.

        Hide fields attributes Show fields attributes object
        • description string Required

          A description of why the request element is bad.

        • field string Required

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

    • detail string

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

    • error integer(int32) Required

      HTTP status code returned with this error.

      External documentation
    • errorCode string Required

      Application error code returned with this error.

    • parameters array[object]

      Parameters used to give more information about the error.

    • reason string

      Application error message returned with this error.

  • 401 application/json

    Unauthorized.

    Hide response attributes Show response attributes object
    • badRequestDetail object

      Bad request detail.

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

        Describes all violations in a client request.

        Hide fields attributes Show fields attributes object
        • description string Required

          A description of why the request element is bad.

        • field string Required

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

    • detail string

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

    • error integer(int32) Required

      HTTP status code returned with this error.

      External documentation
    • errorCode string Required

      Application error code returned with this error.

    • parameters array[object]

      Parameters used to give more information about the error.

    • reason string

      Application error message returned with this error.

  • 403 application/json

    Forbidden.

    Hide response attributes Show response attributes object
    • badRequestDetail object

      Bad request detail.

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

        Describes all violations in a client request.

        Hide fields attributes Show fields attributes object
        • description string Required

          A description of why the request element is bad.

        • field string Required

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

    • detail string

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

    • error integer(int32) Required

      HTTP status code returned with this error.

      External documentation
    • errorCode string Required

      Application error code returned with this error.

    • parameters array[object]

      Parameters used to give more information about the error.

    • reason string

      Application error message returned with this error.

  • 404 application/json

    Not Found.

    Hide response attributes Show response attributes object
    • badRequestDetail object

      Bad request detail.

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

        Describes all violations in a client request.

        Hide fields attributes Show fields attributes object
        • description string Required

          A description of why the request element is bad.

        • field string Required

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

    • detail string

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

    • error integer(int32) Required

      HTTP status code returned with this error.

      External documentation
    • errorCode string Required

      Application error code returned with this error.

    • parameters array[object]

      Parameters used to give more information about the error.

    • reason string

      Application error message returned with this error.

  • 500 application/json

    Internal Server Error.

    Hide response attributes Show response attributes object
    • badRequestDetail object

      Bad request detail.

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

        Describes all violations in a client request.

        Hide fields attributes Show fields attributes object
        • description string Required

          A description of why the request element is bad.

        • field string Required

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

    • detail string

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

    • error integer(int32) Required

      HTTP status code returned with this error.

      External documentation
    • errorCode string Required

      Application error code returned with this error.

    • parameters array[object]

      Parameters used to give more information about the error.

    • reason string

      Application error message returned with this error.

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

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

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

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

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








































































































































































































































































































































































































































































































































































































































































































































Create One Private Endpoint Service for One Provider

POST /api/atlas/v2/groups/{groupId}/privateEndpoint/endpointService

Creates one private endpoint service for the specified cloud service provider. This cloud service provider manages the private endpoint service for the project. When you create a private endpoint service, MongoDB Cloud creates a network container in the project for the cloud provider for which you create the private endpoint service if one doesn't already exist. To learn more about private endpoint terminology in MongoDB Cloud, see Private Endpoint Concepts. To use this resource, the requesting Service Account or API Key must have the Project Owner role.

Private Endpoint Concepts

Path parameters

  • groupId string Required

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

    NOTE: Groups and projects are synonymous terms. Your group id is the same as your project id. For existing groups, your group/project id remains the same. The resource and corresponding endpoints use the term groups.

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

Query parameters

  • envelope boolean

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

    Default value is false.

  • pretty boolean

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

    Default value is false.

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

Body Required

Creates one private endpoint for the specified cloud service provider.

  • providerName string Required

    Human-readable label that identifies the cloud service provider for which you want to create the private endpoint service.

    Values are AWS, AZURE, or GCP.

  • region string Required

    Cloud provider region in which you want to create the private endpoint service. Regions accepted as values differ for Amazon Web Services, Google Cloud Platform, and Microsoft Azure.

Responses

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

    OK

    One of:

    Group of Private Endpoint Service settings.

    Hide attributes Show attributes
    • cloudProvider string Required Discriminator

      Cloud service provider that serves the requested endpoint service.

      Value is AWS.

    • errorMessage string

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

    • id string

      Unique 24-hexadecimal digit string that identifies the Private Endpoint Service.

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

    • regionName string

      Cloud provider region that manages this Private Endpoint Service.

    • status string

      State of the Private Endpoint Service connection when MongoDB Cloud received this request.

      Values are INITIATING, AVAILABLE, WAITING_FOR_USER, FAILED, or DELETING.

    • endpointServiceName string

      Unique string that identifies the Amazon Web Services (AWS) PrivateLink endpoint service. MongoDB Cloud returns null while it creates the endpoint service.

      Format should match the following pattern: ^com\.amazonaws\.vpce\.[a-z-0-9]+\.vpce-svc-[0-9a-f]{17}.

    • interfaceEndpoints array[string]

      List of strings that identify private endpoint interfaces applied to the specified project.

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

  • 400 application/json

    Bad Request.

    Hide response attributes Show response attributes object
    • badRequestDetail object

      Bad request detail.

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

        Describes all violations in a client request.

        Hide fields attributes Show fields attributes object
        • description string Required

          A description of why the request element is bad.

        • field string Required

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

    • detail string

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

    • error integer(int32) Required

      HTTP status code returned with this error.

      External documentation
    • errorCode string Required

      Application error code returned with this error.

    • parameters array[object]

      Parameters used to give more information about the error.

    • reason string

      Application error message returned with this error.

  • 401 application/json

    Unauthorized.

    Hide response attributes Show response attributes object
    • badRequestDetail object

      Bad request detail.

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

        Describes all violations in a client request.

        Hide fields attributes Show fields attributes object
        • description string Required

          A description of why the request element is bad.

        • field string Required

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

    • detail string

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

    • error integer(int32) Required

      HTTP status code returned with this error.

      External documentation
    • errorCode string Required

      Application error code returned with this error.

    • parameters array[object]

      Parameters used to give more information about the error.

    • reason string

      Application error message returned with this error.

  • 403 application/json

    Forbidden.

    Hide response attributes Show response attributes object
    • badRequestDetail object

      Bad request detail.

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

        Describes all violations in a client request.

        Hide fields attributes Show fields attributes object
        • description string Required

          A description of why the request element is bad.

        • field string Required

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

    • detail string

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

    • error integer(int32) Required

      HTTP status code returned with this error.

      External documentation
    • errorCode string Required

      Application error code returned with this error.

    • parameters array[object]

      Parameters used to give more information about the error.

    • reason string

      Application error message returned with this error.

  • 404 application/json

    Not Found.

    Hide response attributes Show response attributes object
    • badRequestDetail object

      Bad request detail.

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

        Describes all violations in a client request.

        Hide fields attributes Show fields attributes object
        • description string Required

          A description of why the request element is bad.

        • field string Required

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

    • detail string

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

    • error integer(int32) Required

      HTTP status code returned with this error.

      External documentation
    • errorCode string Required

      Application error code returned with this error.

    • parameters array[object]

      Parameters used to give more information about the error.

    • reason string

      Application error message returned with this error.

  • 500 application/json

    Internal Server Error.

    Hide response attributes Show response attributes object
    • badRequestDetail object

      Bad request detail.

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

        Describes all violations in a client request.

        Hide fields attributes Show fields attributes object
        • description string Required

          A description of why the request element is bad.

        • field string Required

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

    • detail string

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

    • error integer(int32) Required

      HTTP status code returned with this error.

      External documentation
    • errorCode string Required

      Application error code returned with this error.

    • parameters array[object]

      Parameters used to give more information about the error.

    • reason string

      Application error message returned with this error.

POST /api/atlas/v2/groups/{groupId}/privateEndpoint/endpointService
atlas api createPrivateEndpointService --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.CreatePrivateEndpointServiceApiParams{}
	sdkResp, httpResp, err := client.PrivateEndpointServicesApi.
		CreatePrivateEndpointServiceWithParams(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/endpointService" \
  -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/endpointService" \
  -d '{ <Payload> }'
Request examples
{
  "providerName": "AWS",
  "region": "string"
}
{
  "cloudProvider": "AWS",
  "errorMessage": "string",
  "id": "32b6e34b3d91647abb20e7b8",
  "regionName": "string",
  "status": "INITIATING",
  "endpointServiceName": "string",
  "interfaceEndpoints": [
    "32b6e34b3d91647abb20e7b8"
  ]
}
{
  "cloudProvider": "AWS",
  "errorMessage": "string",
  "id": "32b6e34b3d91647abb20e7b8",
  "regionName": "string",
  "status": "INITIATING",
  "privateEndpoints": [
    "string"
  ],
  "privateLinkServiceName": "string",
  "privateLinkServiceResourceId": "/subscriptions/ae349d51-d12b-ee3d-2a27-7d53f6479cf0/resourcegroups/KObGGz/providers/Microsoft.Network/privateLinkServices/pls_d1820713f8153388d533e9de"
}
{
  "cloudProvider": "AWS",
  "errorMessage": "string",
  "id": "32b6e34b3d91647abb20e7b8",
  "regionName": "string",
  "status": "INITIATING",
  "endpointGroupNames": [
    "string"
  ],
  "serviceAttachmentNames": [
    "string"
  ]
}
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 Private Endpoint for One Provider

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

Returns the connection state of the specified private endpoint. The private endpoint service manages this private endpoint which belongs to one project hosted from one cloud service provider. 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})$.

  • cloudProvider string Required

    Cloud service provider that manages this private endpoint.

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

  • endpointId string Required

    Unique string that identifies the private endpoint you want to return. The format of the endpointId parameter differs for AWS and Azure. You must URL encode the endpointId for Azure private endpoints.

    Format should match the following pattern: ^vpce-[0-9a-f]{17}|^%2[fF]subscriptions%2[fF][0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}%2[fF]resource[gG]roups%2[fF]([-\w._()]+)%2[fF]providers%2[fF]Microsoft\.Network%2[fF]privateEndpoints%2[fF]([-\w._()]+).

  • endpointServiceId string Required

    Unique 24-hexadecimal digit string that identifies the private endpoint service for which you want to return 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

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.

  • 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}/privateEndpoint/{cloudProvider}/endpointService/{endpointServiceId}/endpoint/{endpointId}
atlas api getPrivateEndpoint --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.GetPrivateEndpointApiParams{}
	sdkResp, httpResp, err := client.PrivateEndpointServicesApi.
		GetPrivateEndpointWithParams(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}/privateEndpoint/{cloudProvider}/endpointService/{endpointServiceId}/endpoint/{endpointId}?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}/privateEndpoint/{cloudProvider}/endpointService/{endpointServiceId}/endpoint/{endpointId}?pretty=true"
{
  "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 (403)
{
  "error": 403,
  "detail": "(This is just an example, the exception may not be related to this endpoint)",
  "reason": "Forbidden",
  "errorCode": "CANNOT_CHANGE_GROUP_NAME"
}
Response examples (404)
{
  "error": 404,
  "detail": "(This is just an example, the exception may not be related to this endpoint) Cannot find resource AWS",
  "reason": "Not Found",
  "errorCode": "RESOURCE_NOT_FOUND"
}
Response examples (500)
{
  "error": 500,
  "detail": "(This is just an example, the exception may not be related to this endpoint)",
  "reason": "Internal Server Error",
  "errorCode": "UNEXPECTED_ERROR"
}





































Remove One Organization API Key

DELETE /api/atlas/v2/orgs/{orgId}/apiKeys/{apiUserId}

Removes one organization API key from the specified organization. When you remove an API key from an organization, MongoDB Cloud also removes that key from any projects that use that key. To use this resource, the requesting Service Account or API Key must have the Organization Owner role.

Configure Atlas API Access

Path parameters

  • orgId string Required

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

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

  • apiUserId string Required

    Unique 24-hexadecimal digit string that identifies this organization API key.

    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.

  • 401 application/json

    Unauthorized.

    Hide response attributes Show response attributes object
    • badRequestDetail object

      Bad request detail.

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

        Describes all violations in a client request.

        Hide fields attributes Show fields attributes object
        • description string Required

          A description of why the request element is bad.

        • field string Required

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

    • detail string

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

    • error integer(int32) Required

      HTTP status code returned with this error.

      External documentation
    • errorCode string Required

      Application error code returned with this error.

    • parameters array[object]

      Parameters used to give more information about the error.

    • reason string

      Application error message returned with this error.

  • 403 application/json

    Forbidden.

    Hide response attributes Show response attributes object
    • badRequestDetail object

      Bad request detail.

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

        Describes all violations in a client request.

        Hide fields attributes Show fields attributes object
        • description string Required

          A description of why the request element is bad.

        • field string Required

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

    • detail string

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

    • error integer(int32) Required

      HTTP status code returned with this error.

      External documentation
    • errorCode string Required

      Application error code returned with this error.

    • parameters array[object]

      Parameters used to give more information about the error.

    • reason string

      Application error message returned with this error.

  • 404 application/json

    Not Found.

    Hide response attributes Show response attributes object
    • badRequestDetail object

      Bad request detail.

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

        Describes all violations in a client request.

        Hide fields attributes Show fields attributes object
        • description string Required

          A description of why the request element is bad.

        • field string Required

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

    • detail string

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

    • error integer(int32) Required

      HTTP status code returned with this error.

      External documentation
    • errorCode string Required

      Application error code returned with this error.

    • parameters array[object]

      Parameters used to give more information about the error.

    • reason string

      Application error message returned with this error.

  • 500 application/json

    Internal Server Error.

    Hide response attributes Show response attributes object
    • badRequestDetail object

      Bad request detail.

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

        Describes all violations in a client request.

        Hide fields attributes Show fields attributes object
        • description string Required

          A description of why the request element is bad.

        • field string Required

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

    • detail string

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

    • error integer(int32) Required

      HTTP status code returned with this error.

      External documentation
    • errorCode string Required

      Application error code returned with this error.

    • parameters array[object]

      Parameters used to give more information about the error.

    • reason string

      Application error message returned with this error.

DELETE /api/atlas/v2/orgs/{orgId}/apiKeys/{apiUserId}
atlas api deleteApiKey --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.DeleteApiKeyApiParams{}
	httpResp, err := client.ProgrammaticAPIKeysApi.
		DeleteApiKeyWithParams(ctx, params).
		Execute()
}
curl --header "Authorization: Bearer ${ACCESS_TOKEN}" \
  --header "Accept: application/vnd.atlas.2025-03-12+json" \
  -X DELETE "https://cloud.mongodb.com/api/atlas/v2/orgs/{orgId}/apiKeys/{apiUserId}"
curl --user "${PUBLIC_KEY}:${PRIVATE_KEY}" \
  --digest \
  --header "Accept: application/vnd.atlas.2025-03-12+json" \
  -X DELETE "https://cloud.mongodb.com/api/atlas/v2/orgs/{orgId}/apiKeys/{apiUserId}"
Response examples (401)
{
  "error": 401,
  "detail": "(This is just an example, the exception may not be related to this endpoint)",
  "reason": "Unauthorized",
  "errorCode": "NOT_ORG_GROUP_CREATOR"
}
Response examples (403)
{
  "error": 403,
  "detail": "(This is just an example, the exception may not be related to this endpoint)",
  "reason": "Forbidden",
  "errorCode": "CANNOT_CHANGE_GROUP_NAME"
}
Response examples (404)
{
  "error": 404,
  "detail": "(This is just an example, the exception may not be related to this endpoint) Cannot find resource AWS",
  "reason": "Not Found",
  "errorCode": "RESOURCE_NOT_FOUND"
}
Response examples (500)
{
  "error": 500,
  "detail": "(This is just an example, the exception may not be related to this endpoint)",
  "reason": "Internal Server Error",
  "errorCode": "UNEXPECTED_ERROR"
}
































































































































































Create One Atlas Resource Policy

POST /api/atlas/v2/orgs/{orgId}/resourcePolicies

Create one Atlas Resource Policy for an org.

Atlas Resource Policies

Path parameters

  • orgId string Required

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

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

Query parameters

  • envelope boolean

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

    Default value is false.

  • pretty boolean

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

    Default value is false.

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

Body Required

Atlas Resource Policy to create.

  • description string

    Description of the atlas resource policy.

  • name string Required

    Human-readable label that describes the atlas resource policy.

  • policies array[object] Required

    List of policies that make up the atlas resource policy.

    Hide policies attribute Show policies attribute object
    • body string Required

      A string that defines the permissions for the policy. The syntax used is the Cedar Policy language.

Responses

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

    Created

    Hide response attributes Show response attributes object
    • createdByUser object

      The user that last updated the atlas resource policy.

      Hide createdByUser attributes Show createdByUser attributes object
      • id string

        Unique 24-hexadecimal character string that identifies a user.

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

      • name string

        Human-readable label that describes a user.

    • createdDate string(date-time)

      Date and time in UTC when the atlas resource policy was created.

    • description string

      Description of the atlas resource policy.

    • id string

      Unique 24-hexadecimal character string that identifies the atlas resource policy.

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

    • lastUpdatedByUser object

      The user that last updated the atlas resource policy.

      Hide lastUpdatedByUser attributes Show lastUpdatedByUser attributes object
      • id string

        Unique 24-hexadecimal character string that identifies a user.

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

      • name string

        Human-readable label that describes a user.

    • lastUpdatedDate string(date-time)

      Date and time in UTC when the atlas resource policy was last updated.

    • name string

      Human-readable label that describes the atlas resource policy.

    • orgId string

      Unique 24-hexadecimal character string that identifies the organization the atlas resource policy belongs to.

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

    • policies array[object]

      List of policies that make up the atlas resource policy.

      Hide policies attributes Show policies attributes object
      • body string

        A string that defines the permissions for the policy. The syntax used is the Cedar Policy language.

      • id string

        Unique 24-hexadecimal character string that identifies the policy.

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

    • version string

      A string that identifies the version of the atlas resource policy.

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

    Bad request.

    Hide response attributes Show response attributes object
    • errorType string

      Human-readable label that displays the type of an error.

      Values are POLICY_PARSING_ERROR, POLICY_HAS_FAILED_VALIDATIONS, POLICY_HAS_INVALID_PRINCIPAL, POLICY_HAS_BODY_EXCEEDING_MAX_SIZE, or POLICY_HAS_UNEXPECTED_ENTITIES.

    • invalidPolicies array[object]

      List of invalid policies containing details of their validation errors.

      Hide invalidPolicies attributes Show invalidPolicies attributes object
      • body string

        A string that defines the permissions for the policy. The syntax used is the Cedar Policy language.

      • errors array[object]

        List of validation errors.

        Hide errors attribute Show errors attribute object
        • detail string

          A string that provides a detailed description of a validation error.

  • 401 application/json

    Unauthorized.

    Hide response attributes Show response attributes object
    • badRequestDetail object

      Bad request detail.

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

        Describes all violations in a client request.

        Hide fields attributes Show fields attributes object
        • description string Required

          A description of why the request element is bad.

        • field string Required

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

    • detail string

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

    • error integer(int32) Required

      HTTP status code returned with this error.

      External documentation
    • errorCode string Required

      Application error code returned with this error.

    • parameters array[object]

      Parameters used to give more information about the error.

    • reason string

      Application error message returned with this error.

  • 403 application/json

    Forbidden.

    Hide response attributes Show response attributes object
    • badRequestDetail object

      Bad request detail.

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

        Describes all violations in a client request.

        Hide fields attributes Show fields attributes object
        • description string Required

          A description of why the request element is bad.

        • field string Required

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

    • detail string

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

    • error integer(int32) Required

      HTTP status code returned with this error.

      External documentation
    • errorCode string Required

      Application error code returned with this error.

    • parameters array[object]

      Parameters used to give more information about the error.

    • reason string

      Application error message returned with this error.

  • 404 application/json

    Not Found.

    Hide response attributes Show response attributes object
    • badRequestDetail object

      Bad request detail.

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

        Describes all violations in a client request.

        Hide fields attributes Show fields attributes object
        • description string Required

          A description of why the request element is bad.

        • field string Required

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

    • detail string

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

    • error integer(int32) Required

      HTTP status code returned with this error.

      External documentation
    • errorCode string Required

      Application error code returned with this error.

    • parameters array[object]

      Parameters used to give more information about the error.

    • reason string

      Application error message returned with this error.

  • 500 application/json

    Internal Server Error.

    Hide response attributes Show response attributes object
    • badRequestDetail object

      Bad request detail.

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

        Describes all violations in a client request.

        Hide fields attributes Show fields attributes object
        • description string Required

          A description of why the request element is bad.

        • field string Required

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

    • detail string

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

    • error integer(int32) Required

      HTTP status code returned with this error.

      External documentation
    • errorCode string Required

      Application error code returned with this error.

    • parameters array[object]

      Parameters used to give more information about the error.

    • reason string

      Application error message returned with this error.

POST /api/atlas/v2/orgs/{orgId}/resourcePolicies
atlas api createOrgResourcePolicy --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.CreateOrgResourcePolicyApiParams{}
	sdkResp, httpResp, err := client.ResourcePoliciesApi.
		CreateOrgResourcePolicyWithParams(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/orgs/{orgId}/resourcePolicies" \
  -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/orgs/{orgId}/resourcePolicies" \
  -d '{ <Payload> }'
Request examples
{
  "description": "string",
  "name": "string",
  "policies": [
    {
      "body": "  forbid (\n    principal,\n    action == cloud::Action::\"cluster.createEdit\",\n    resource\n  ) when {\n   context.cluster.regions.contains(cloud::region::\"aws:us-east-1\")\n  };\n"
    }
  ]
}
Response examples (201)
{
  "createdByUser": {
    "id": "32b6e34b3d91647abb20e7b8",
    "name": "string"
  },
  "createdDate": "2025-05-04T09:42:00Z",
  "description": "string",
  "id": "32b6e34b3d91647abb20e7b8",
  "lastUpdatedByUser": {
    "id": "32b6e34b3d91647abb20e7b8",
    "name": "string"
  },
  "lastUpdatedDate": "2025-05-04T09:42:00Z",
  "name": "string",
  "orgId": "32b6e34b3d91647abb20e7b8",
  "policies": [
    {
      "body": "  forbid (\n    principal,\n    action == cloud::Action::\"cluster.createEdit\",\n    resource\n  ) when {\n   context.cluster.regions.contains(cloud::region::\"aws:us-east-1\")\n  };\n",
      "id": "32b6e34b3d91647abb20e7b8"
    }
  ],
  "version": "v1"
}
Response examples (400)
{
  "errorType": "POLICY_PARSING_ERROR",
  "invalidPolicies": [
    {
      "body": "  forbid (\n    principal,\n    action == cloud::Action::\"cluster.createEdit\",\n    resource\n  ) when {\n   context.cluster.regions.contains(cloud::region::\"aws:us-east-1\")\n  };\n",
      "errors": [
        {
          "detail": "string"
        }
      ]
    }
  ]
}
Response examples (401)
{
  "error": 401,
  "detail": "(This is just an example, the exception may not be related to this endpoint)",
  "reason": "Unauthorized",
  "errorCode": "NOT_ORG_GROUP_CREATOR"
}
Response examples (403)
{
  "error": 403,
  "detail": "(This is just an example, the exception may not be related to this endpoint)",
  "reason": "Forbidden",
  "errorCode": "CANNOT_CHANGE_GROUP_NAME"
}
Response examples (404)
{
  "error": 404,
  "detail": "(This is just an example, the exception may not be related to this endpoint) Cannot find resource AWS",
  "reason": "Not Found",
  "errorCode": "RESOURCE_NOT_FOUND"
}
Response examples (500)
{
  "error": 500,
  "detail": "(This is just an example, the exception may not be related to this endpoint)",
  "reason": "Internal Server Error",
  "errorCode": "UNEXPECTED_ERROR"
}




























































































































































































































































































Update One Stream Processor

PATCH /api/atlas/v2/groups/{groupId}/streams/{tenantName}/processor/{processorName}

Modify one existing Stream Processor within the specified stream instance. To use this resource, the requesting Service Account or API Key must have the Project Owner role or Project Stream Processing 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})$.

  • tenantName string Required

    Human-readable label that identifies the stream instance.

  • processorName string Required

    Human-readable label that identifies the stream processor.

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

Modifications to apply to the stream processor.

  • name string

    New name for the stream processor.

  • options object

    Additional options for modifying a stream processor.

    Hide options attributes Show options attributes object
    • dlq object

      Dead letter queue for the stream processor.

      External documentation
      Hide dlq attributes Show dlq attributes object
      • coll string

        Name of the collection to use for the DLQ.

      • connectionName string

        Name of the connection to write DLQ messages to. Must be an Atlas connection.

      • db string

        Name of the database to use for the DLQ.

    • resumeFromCheckpoint boolean

      When true, the modified stream processor resumes from its last checkpoint.

  • pipeline array[object]

    New pipeline for the stream processor.

    Supported Aggregation Pipeline Stages
    Hide pipeline attribute Show pipeline attribute object
    • * object Additional properties

Responses

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

    OK

    Hide response attributes Show response attributes object
    • _id string Required

      Unique 24-hexadecimal character string that identifies the stream processor.

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

    • name string Required

      Human-readable name of the stream processor.

    • options object

      Optional configuration for the stream processor.

      Hide options attributes Show options attributes object
      • dlq object

        Dead letter queue for the stream processor.

        External documentation
        Hide dlq attributes Show dlq attributes object
        • coll string

          Name of the collection to use for the DLQ.

        • connectionName string

          Name of the connection to write DLQ messages to. Must be an Atlas connection.

        • db string

          Name of the database to use for the DLQ.

    • pipeline array[object] Required

      Stream aggregation pipeline you want to apply to your streaming data.

      Hide pipeline attribute Show pipeline attribute object
      • * object Additional properties
    • state string Required

      The state of the stream processor. Commonly occurring states are 'CREATED', 'STARTED', 'STOPPED' and 'FAILED'.

    • stats object

      The stats associated with the stream processor.

      External documentation
      Hide stats attribute Show stats attribute object
  • 400 application/json

    Bad Request.

    Hide response attributes Show response attributes object
    • badRequestDetail object

      Bad request detail.

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

        Describes all violations in a client request.

        Hide fields attributes Show fields attributes object
        • description string Required

          A description of why the request element is bad.

        • field string Required

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

    • detail string

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

    • error integer(int32) Required

      HTTP status code returned with this error.

      External documentation
    • errorCode string Required

      Application error code returned with this error.

    • parameters array[object]

      Parameters used to give more information about the error.

    • reason string

      Application error message returned with this error.

  • 401 application/json

    Unauthorized.

    Hide response attributes Show response attributes object
    • badRequestDetail object

      Bad request detail.

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

        Describes all violations in a client request.

        Hide fields attributes Show fields attributes object
        • description string Required

          A description of why the request element is bad.

        • field string Required

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

    • detail string

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

    • error integer(int32) Required

      HTTP status code returned with this error.

      External documentation
    • errorCode string Required

      Application error code returned with this error.

    • parameters array[object]

      Parameters used to give more information about the error.

    • reason string

      Application error message returned with this error.

  • 403 application/json

    Forbidden.

    Hide response attributes Show response attributes object
    • badRequestDetail object

      Bad request detail.

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

        Describes all violations in a client request.

        Hide fields attributes Show fields attributes object
        • description string Required

          A description of why the request element is bad.

        • field string Required

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

    • detail string

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

    • error integer(int32) Required

      HTTP status code returned with this error.

      External documentation
    • errorCode string Required

      Application error code returned with this error.

    • parameters array[object]

      Parameters used to give more information about the error.

    • reason string

      Application error message returned with this error.

  • 404 application/json

    Not Found.

    Hide response attributes Show response attributes object
    • badRequestDetail object

      Bad request detail.

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

        Describes all violations in a client request.

        Hide fields attributes Show fields attributes object
        • description string Required

          A description of why the request element is bad.

        • field string Required

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

    • detail string

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

    • error integer(int32) Required

      HTTP status code returned with this error.

      External documentation
    • errorCode string Required

      Application error code returned with this error.

    • parameters array[object]

      Parameters used to give more information about the error.

    • reason string

      Application error message returned with this error.

  • 500 application/json

    Internal Server Error.

    Hide response attributes Show response attributes object
    • badRequestDetail object

      Bad request detail.

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

        Describes all violations in a client request.

        Hide fields attributes Show fields attributes object
        • description string Required

          A description of why the request element is bad.

        • field string Required

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

    • detail string

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

    • error integer(int32) Required

      HTTP status code returned with this error.

      External documentation
    • errorCode string Required

      Application error code returned with this error.

    • parameters array[object]

      Parameters used to give more information about the error.

    • reason string

      Application error message returned with this error.

PATCH /api/atlas/v2/groups/{groupId}/streams/{tenantName}/processor/{processorName}
atlas api modifyStreamProcessor --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.ModifyStreamProcessorApiParams{}
	sdkResp, httpResp, err := client.StreamsApi.
		ModifyStreamProcessorWithParams(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}/streams/{tenantName}/processor/{processorName}" \
  -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}/streams/{tenantName}/processor/{processorName}" \
  -d '{ <Payload> }'
Request examples
{
  "name": "string",
  "options": {
    "dlq": {
      "coll": "string",
      "connectionName": "string",
      "db": "string"
    },
    "resumeFromCheckpoint": true
  },
  "pipeline": [
    {
      "additionalProperty1": {},
      "additionalProperty2": {}
    }
  ]
}
Response examples (200)
{
  "_id": "32b6e34b3d91647abb20e7b8",
  "links": [
    {
      "href": "https://cloud.mongodb.com/api/atlas",
      "rel": "self"
    }
  ],
  "name": "string",
  "options": {
    "dlq": {
      "coll": "string",
      "connectionName": "string",
      "db": "string",
      "links": [
        {
          "href": "https://cloud.mongodb.com/api/atlas",
          "rel": "self"
        }
      ]
    },
    "links": [
      {
        "href": "https://cloud.mongodb.com/api/atlas",
        "rel": "self"
      }
    ]
  },
  "pipeline": [
    {
      "additionalProperty1": {},
      "additionalProperty2": {}
    }
  ],
  "state": "string",
  "stats": {
    "additionalProperty1": {},
    "additionalProperty2": {}
  }
}
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"
}