Service accounts (oauth2)
Learn more about Service Accounts.
Flow type | clientCredentials |
---|---|
Token URL | https://cloud.mongodb.com/api/oauth/token |
The API accepts 2 different authentication methods:
Learn more about Service Accounts.
Flow type | clientCredentials |
---|---|
Token URL | https://cloud.mongodb.com/api/oauth/token |
Returns the details for all clusters in the specific project to which you have access. Clusters contain a group of hosts that maintain the same data set. The response includes clusters with asymmetrically-sized shards. To use this resource, the requesting Service Account or API Key must have the Project Read Only role. This feature is not available for serverless clusters.
This endpoint can also be used on Flex clusters that were created using the createCluster endpoint or former M2/M5 clusters that have been migrated to Flex clusters until January 2026. Please use the listFlexClusters endpoint for Flex clusters instead.
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})$
.
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
.
Flag that indicates whether the response returns the total number of items (totalCount) in the response.
Default value is true
.
Number of items that the response returns per page.
Minimum value is 1
, maximum value is 500
. Default value is 100
.
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
.
Flag that indicates whether the response body should be in the prettyprint format.
Default value is false
.
Flag that indicates whether to return Clusters with retain backups.
Default value is false
.
curl \
--request GET 'https://cloud.mongodb.com/api/atlas/v2/groups/32b6e34b3d91647abb20e7b8/clusters' \
--header "Authorization: Bearer $ACCESS_TOKEN"
{
"links": [
{
"href": "https://cloud.mongodb.com/api/atlas",
"rel": "self"
}
],
"results": [
{
"acceptDataRisksAndForceReplicaSetReconfig": "2025-05-04T09:42:00Z",
"advancedConfiguration": {
"customOpensslCipherConfigTls12": [
"TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384"
],
"minimumEnabledTlsProtocol": "TLS1_0",
"tlsCipherConfigMode": "CUSTOM"
},
"autoScaling": {
"compute": {
"enabled": false,
"predictiveEnabled": false,
"scaleDownEnabled": false
},
"diskGBEnabled": false
},
"backupEnabled": true,
"biConnector": {
"enabled": true,
"readPreference": "PRIMARY"
},
"clusterType": "REPLICASET",
"configServerManagementMode": "ATLAS_MANAGED",
"configServerType": "DEDICATED",
"connectionStrings": {
"awsPrivateLink": {
"additionalProperty1": "string",
"additionalProperty2": "string"
},
"awsPrivateLinkSrv": {
"additionalProperty1": "string",
"additionalProperty2": "string"
},
"private": "string",
"privateEndpoint": [
{
"connectionString": "string",
"endpoints": [
{
"endpointId": "string",
"providerName": "AWS",
"region": "string"
}
],
"srvConnectionString": "string",
"srvShardOptimizedConnectionString": "string",
"type": "MONGOD"
}
],
"privateSrv": "string",
"standard": "string",
"standardSrv": "string"
},
"createDate": "2025-05-04T09:42:00Z",
"diskSizeGB": 42.0,
"diskWarmingMode": "FULLY_WARMED",
"encryptionAtRestProvider": "NONE",
"featureCompatibilityVersion": "string",
"featureCompatibilityVersionExpirationDate": "2025-05-04T09:42:00Z",
"globalClusterSelfManagedSharding": true,
"groupId": "32b6e34b3d91647abb20e7b8",
"id": "32b6e34b3d91647abb20e7b8",
"labels": [
{
"key": "string",
"value": "string"
}
],
"links": [
{
"href": "https://cloud.mongodb.com/api/atlas",
"rel": "self"
}
],
"mongoDBEmployeeAccessGrant": {
"expirationTime": "2025-05-04T09:42:00Z",
"grantType": "CLUSTER_DATABASE_LOGS",
"links": [
{
"href": "https://cloud.mongodb.com/api/atlas",
"rel": "self"
}
]
},
"mongoDBMajorVersion": "5.0",
"mongoDBVersion": "5.0.25",
"mongoURI": "string",
"mongoURIUpdated": "2025-05-04T09:42:00Z",
"mongoURIWithOptions": "string",
"name": "string",
"numShards": 1,
"paused": true,
"pitEnabled": true,
"providerBackupEnabled": true,
"providerSettings": {
"providerName": "AWS",
"autoScaling": {
"compute": {
"maxInstanceSize": "M10",
"minInstanceSize": "M10"
}
},
"diskIOPS": 42,
"encryptEBSVolume": true,
"instanceSizeName": "M10",
"regionName": "US_GOV_WEST_1",
"volumeType": "STANDARD"
},
"replicaSetScalingStrategy": "WORKLOAD_TYPE",
"replicationFactor": 3,
"replicationSpec": {
"additionalProperty1": {
"analyticsNodes": 42,
"electableNodes": 0,
"priority": 42,
"readOnlyNodes": 42
},
"additionalProperty2": {
"analyticsNodes": 42,
"electableNodes": 0,
"priority": 42,
"readOnlyNodes": 42
}
},
"replicationSpecs": [
{
"id": "32b6e34b3d91647abb20e7b8",
"numShards": 1,
"regionsConfig": {
"additionalProperty1": {
"analyticsNodes": 42,
"electableNodes": 0,
"priority": 42,
"readOnlyNodes": 42
},
"additionalProperty2": {
"analyticsNodes": 42,
"electableNodes": 0,
"priority": 42,
"readOnlyNodes": 42
}
},
"zoneName": "string"
}
],
"rootCertType": "ISRGROOTX1",
"srvAddress": "string",
"stateName": "IDLE",
"tags": [
{
"key": "string",
"value": "string"
}
],
"terminationProtectionEnabled": false,
"versionReleaseSystem": "LTS"
}
],
"totalCount": 42
}
{
"links": [
{
"href": "https://cloud.mongodb.com/api/atlas",
"rel": "self"
}
],
"results": [
{
"acceptDataRisksAndForceReplicaSetReconfig": "2025-05-04T09:42:00Z",
"advancedConfiguration": {
"customOpensslCipherConfigTls12": [
"TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384"
],
"minimumEnabledTlsProtocol": "TLS1_0",
"tlsCipherConfigMode": "CUSTOM"
},
"backupEnabled": false,
"biConnector": {
"enabled": true,
"readPreference": "PRIMARY"
},
"clusterType": "REPLICASET",
"configServerManagementMode": "ATLAS_MANAGED",
"configServerType": "DEDICATED",
"connectionStrings": {
"awsPrivateLink": {
"additionalProperty1": "string",
"additionalProperty2": "string"
},
"awsPrivateLinkSrv": {
"additionalProperty1": "string",
"additionalProperty2": "string"
},
"private": "string",
"privateEndpoint": [
{
"connectionString": "string",
"endpoints": [
{
"endpointId": "string",
"providerName": "AWS",
"region": "string"
}
],
"srvConnectionString": "string",
"srvShardOptimizedConnectionString": "string",
"type": "MONGOD"
}
],
"privateSrv": "string",
"standard": "string",
"standardSrv": "string"
},
"createDate": "2025-05-04T09:42:00Z",
"diskSizeGB": 42.0,
"diskWarmingMode": "FULLY_WARMED",
"encryptionAtRestProvider": "NONE",
"featureCompatibilityVersion": "string",
"featureCompatibilityVersionExpirationDate": "2025-05-04T09:42:00Z",
"globalClusterSelfManagedSharding": true,
"groupId": "32b6e34b3d91647abb20e7b8",
"id": "32b6e34b3d91647abb20e7b8",
"labels": [
{
"key": "string",
"value": "string"
}
],
"links": [
{
"href": "https://cloud.mongodb.com/api/atlas",
"rel": "self"
}
],
"mongoDBEmployeeAccessGrant": {
"expirationTime": "2025-05-04T09:42:00Z",
"grantType": "CLUSTER_DATABASE_LOGS",
"links": [
{
"href": "https://cloud.mongodb.com/api/atlas",
"rel": "self"
}
]
},
"mongoDBMajorVersion": "string",
"mongoDBVersion": "string",
"name": "string",
"paused": true,
"pitEnabled": true,
"replicaSetScalingStrategy": "WORKLOAD_TYPE",
"replicationSpecs": [
{
"id": "32b6e34b3d91647abb20e7b8",
"numShards": 42,
"regionConfigs": [
{
"": {
"instanceSize": "M10",
"diskIOPS": 42,
"ebsVolumeType": "STANDARD",
"nodeCount": 42
},
"priority": 42,
"providerName": "AWS",
"regionName": "US_GOV_WEST_1",
"analyticsAutoScaling": {
"compute": {
"enabled": true,
"": "M10",
"predictiveEnabled": true,
"scaleDownEnabled": true
},
"diskGB": {
"enabled": true
}
},
"analyticsSpecs": {
"nodeCount": 42,
"instanceSize": "M10",
"diskIOPS": 42,
"ebsVolumeType": "STANDARD"
},
"autoScaling": {
"compute": {
"enabled": true,
"": "M10",
"predictiveEnabled": true,
"scaleDownEnabled": true
},
"diskGB": {
"enabled": true
}
},
"readOnlySpecs": {
"nodeCount": 42,
"instanceSize": "M10",
"diskIOPS": 42,
"ebsVolumeType": "STANDARD"
}
}
],
"zoneId": "32b6e34b3d91647abb20e7b8",
"zoneName": "string"
}
],
"rootCertType": "ISRGROOTX1",
"stateName": "IDLE",
"tags": [
{
"key": "string",
"value": "string"
}
],
"terminationProtectionEnabled": false,
"versionReleaseSystem": "LTS"
}
],
"totalCount": 42
}
{
"links": [
{
"href": "https://cloud.mongodb.com/api/atlas",
"rel": "self"
}
],
"results": [
{
"acceptDataRisksAndForceReplicaSetReconfig": "2025-05-04T09:42:00Z",
"advancedConfiguration": {
"customOpensslCipherConfigTls12": [
"TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384"
],
"minimumEnabledTlsProtocol": "TLS1_0",
"tlsCipherConfigMode": "CUSTOM"
},
"backupEnabled": false,
"biConnector": {
"enabled": true,
"readPreference": "PRIMARY"
},
"clusterType": "REPLICASET",
"configServerManagementMode": "ATLAS_MANAGED",
"configServerType": "DEDICATED",
"connectionStrings": {
"awsPrivateLink": {
"additionalProperty1": "string",
"additionalProperty2": "string"
},
"awsPrivateLinkSrv": {
"additionalProperty1": "string",
"additionalProperty2": "string"
},
"private": "string",
"privateEndpoint": [
{
"connectionString": "string",
"endpoints": [
{
"endpointId": "string",
"providerName": "AWS",
"region": "string"
}
],
"srvConnectionString": "string",
"srvShardOptimizedConnectionString": "string",
"type": "MONGOD"
}
],
"privateSrv": "string",
"standard": "string",
"standardSrv": "string"
},
"createDate": "2025-05-04T09:42:00Z",
"diskWarmingMode": "FULLY_WARMED",
"encryptionAtRestProvider": "NONE",
"featureCompatibilityVersion": "string",
"featureCompatibilityVersionExpirationDate": "2025-05-04T09:42:00Z",
"globalClusterSelfManagedSharding": true,
"groupId": "32b6e34b3d91647abb20e7b8",
"id": "32b6e34b3d91647abb20e7b8",
"labels": [
{
"key": "string",
"value": "string"
}
],
"links": [
{
"href": "https://cloud.mongodb.com/api/atlas",
"rel": "self"
}
],
"mongoDBEmployeeAccessGrant": {
"expirationTime": "2025-05-04T09:42:00Z",
"grantType": "CLUSTER_DATABASE_LOGS",
"links": [
{
"href": "https://cloud.mongodb.com/api/atlas",
"rel": "self"
}
]
},
"mongoDBMajorVersion": "string",
"mongoDBVersion": "string",
"name": "string",
"paused": true,
"pitEnabled": true,
"redactClientLogData": true,
"replicaSetScalingStrategy": "WORKLOAD_TYPE",
"replicationSpecs": [
{
"id": "32b6e34b3d91647abb20e7b8",
"regionConfigs": [
{
"electableSpecs": {
"diskSizeGB": 42.0,
"instanceSize": "M10",
"diskIOPS": 42,
"ebsVolumeType": "STANDARD",
"nodeCount": 42
},
"priority": 42,
"providerName": "AWS",
"regionName": "US_GOV_WEST_1",
"analyticsAutoScaling": {
"compute": {
"enabled": true,
"": "M10",
"predictiveEnabled": true,
"scaleDownEnabled": true
},
"diskGB": {
"enabled": true
}
},
"analyticsSpecs": {
"diskSizeGB": 42.0,
"nodeCount": 42,
"instanceSize": "M10",
"diskIOPS": 42,
"ebsVolumeType": "STANDARD"
},
"autoScaling": {
"compute": {
"enabled": true,
"": "M10",
"predictiveEnabled": true,
"scaleDownEnabled": true
},
"diskGB": {
"enabled": true
}
},
"readOnlySpecs": {
"diskSizeGB": 42.0,
"nodeCount": 42,
"instanceSize": "M10",
"diskIOPS": 42,
"ebsVolumeType": "STANDARD"
}
}
],
"zoneId": "32b6e34b3d91647abb20e7b8",
"zoneName": "string"
}
],
"rootCertType": "ISRGROOTX1",
"stateName": "IDLE",
"tags": [
{
"key": "string",
"value": "string"
}
],
"terminationProtectionEnabled": false,
"versionReleaseSystem": "LTS"
}
],
"totalCount": 42
}
{
"error": 401,
"detail": "(This is just an example, the exception may not be related to this endpoint)",
"reason": "Unauthorized",
"errorCode": "NOT_ORG_GROUP_CREATOR"
}
{
"error": 403,
"detail": "(This is just an example, the exception may not be related to this endpoint)",
"reason": "Forbidden",
"errorCode": "CANNOT_CHANGE_GROUP_NAME"
}
{
"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"
}
{
"error": 500,
"detail": "(This is just an example, the exception may not be related to this endpoint)",
"reason": "Internal Server Error",
"errorCode": "UNEXPECTED_ERROR"
}
Returns, adds, and removes Global Cluster managed namespaces and custom zone mappings. Each collection in a Global Cluster is associated with a managed namespace. When you create a managed namespace for a Global Cluster, MongoDB Cloud creates an empty collection for that namespace. Creating a managed namespace doesn't populate a collection with data. Similarly, deleting a managed namespace doesn't delete the associated collection.
MongoDB Cloud shards the empty collection using the required location field and a custom shard key. For example, if your custom shard key is city
, the compound shard key is location, city
. Each Global Cluster is also associated with one or more Global Writes Zones. When a user creates a Global Cluster, MongoDB Cloud automatically maps each location code to the closest geographical zone. Custom zone mappings allow administrators to override these automatic mappings. For example, a use case might require mapping a location code to a geographically distant zone. Administrators can manage custom zone mappings with the APIs below and the Global Cluster Configuration pane when you create or modify your Global Cluster.
Returns information about the specified MongoDB Cloud user within the context of the specified project. To use this resource, the requesting Service Account or API Key must have the Project Read Only role.
Note: You can only use this resource to fetch information about MongoDB Cloud human users. To return information about an API Key, use the Return One Organization API Key endpoint.
Note: This resource does not return information about pending users invited via the deprecated Invite One MongoDB Cloud User to Join One Project endpoint.
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})$
.
Unique 24-hexadecimal digit string that identifies the pending or active user in the project. If you need to lookup a user's userId or verify a user's status in the organization, use the Return All MongoDB Cloud Users in One Project resource and filter by username.
Format should match the following pattern: ^([a-f0-9]{24})$
.
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
.
Flag that indicates whether the response body should be in the prettyprint format.
Default value is false
.
curl \
--request GET 'https://cloud.mongodb.com/api/atlas/v2/groups/32b6e34b3d91647abb20e7b8/users/{userId}' \
--header "Authorization: Bearer $ACCESS_TOKEN"
{
"id": "32b6e34b3d91647abb20e7b8",
"orgMembershipStatus": "PENDING",
"roles": [
"GROUP_OWNER"
],
"username": "hello@example.com",
"invitationCreatedAt": "2025-05-04T09:42:00Z",
"invitationExpiresAt": "2025-05-04T09:42:00Z",
"inviterUsername": "hello@example.com"
}
{
"id": "32b6e34b3d91647abb20e7b8",
"orgMembershipStatus": "ACTIVE",
"roles": [
"GROUP_OWNER"
],
"username": "hello@example.com",
"country": "US",
"createdAt": "2025-05-04T09:42:00Z",
"firstName": "John",
"lastAuth": "2025-05-04T09:42:00Z",
"lastName": "Doe",
"mobileNumber": "string"
}
{
"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"
}
{
"error": 401,
"detail": "(This is just an example, the exception may not be related to this endpoint)",
"reason": "Unauthorized",
"errorCode": "NOT_ORG_GROUP_CREATOR"
}
{
"error": 403,
"detail": "(This is just an example, the exception may not be related to this endpoint)",
"reason": "Forbidden",
"errorCode": "CANNOT_CHANGE_GROUP_NAME"
}
{
"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"
}
{
"error": 500,
"detail": "(This is just an example, the exception may not be related to this endpoint)",
"reason": "Internal Server Error",
"errorCode": "UNEXPECTED_ERROR"
}
Creates one new network peering connection in the specified project. Network peering allows multiple cloud-hosted applications to securely connect to the same project. To use this resource, the requesting Service Account or API Key must have the Project Owner role. To learn more about considerations and prerequisites, see the Network Peering Documentation.
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})$
.
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
.
Flag that indicates whether the response body should be in the prettyprint format.
Default value is false
.
Create one network peering connection.
Group of Network Peering connection settings.
Unique 24-hexadecimal digit string that identifies the MongoDB Cloud network container that contains the specified network peering connection.
Format should match the following pattern: ^([a-f0-9]{24})$
.
Cloud service provider that serves the requested network peering connection.
Value is AWS
.
Amazon Web Services (AWS) region where the Virtual Peering Connection (VPC) that you peered with the MongoDB Cloud VPC resides. The resource returns null
if your VPC and the MongoDB Cloud VPC reside in the same region.
Unique twelve-digit string that identifies the Amazon Web Services (AWS) account that owns the VPC that you peered with the MongoDB Cloud VPC.
Format should match the following pattern: ^[0-9]{12}$
.
Internet Protocol (IP) addresses expressed in Classless Inter-Domain Routing (CIDR) notation of the VPC's subnet that you want to peer with the MongoDB Cloud VPC.
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}$
.
Unique string that identifies the VPC on Amazon Web Services (AWS) that you want to peer with the MongoDB Cloud VPC.
Format should match the following pattern: ^vpc-[0-9a-f]{17}$
.
curl \
--request POST 'https://cloud.mongodb.com/api/atlas/v2/groups/32b6e34b3d91647abb20e7b8/peers' \
--header "Authorization: Bearer $ACCESS_TOKEN" \
--header "Content-Type: application/vnd.atlas.2023-01-01+json"
{
"containerId": "32b6e34b3d91647abb20e7b8",
"providerName": "AWS",
"accepterRegionName": "string",
"awsAccountId": "string",
"routeTableCidrBlock": "string",
"vpcId": "string"
}
{
"containerId": "32b6e34b3d91647abb20e7b8",
"providerName": "AZURE",
"azureDirectoryId": "string",
"azureSubscriptionId": "string",
"resourceGroupName": "string",
"vnetName": "string"
}
{
"containerId": "32b6e34b3d91647abb20e7b8",
"providerName": "GCP",
"gcpProjectId": "string",
"networkName": "string"
}
{
"containerId": "32b6e34b3d91647abb20e7b8",
"id": "32b6e34b3d91647abb20e7b8",
"providerName": "AWS",
"accepterRegionName": "string",
"awsAccountId": "string",
"connectionId": "string",
"errorStateName": "REJECTED",
"routeTableCidrBlock": "string",
"statusName": "INITIATING",
"vpcId": "string"
}
{
"containerId": "32b6e34b3d91647abb20e7b8",
"id": "32b6e34b3d91647abb20e7b8",
"providerName": "AZURE",
"azureDirectoryId": "string",
"azureSubscriptionId": "string",
"errorState": "string",
"resourceGroupName": "string",
"status": "ADDING_PEER",
"vnetName": "string"
}
{
"containerId": "32b6e34b3d91647abb20e7b8",
"id": "32b6e34b3d91647abb20e7b8",
"providerName": "GCP",
"errorMessage": "string",
"gcpProjectId": "string",
"networkName": "string",
"status": "ADDING_PEER"
}
{
"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"
}
{
"error": 401,
"detail": "(This is just an example, the exception may not be related to this endpoint)",
"reason": "Unauthorized",
"errorCode": "NOT_ORG_GROUP_CREATOR"
}
{
"error": 403,
"detail": "(This is just an example, the exception may not be related to this endpoint)",
"reason": "Forbidden",
"errorCode": "CANNOT_CHANGE_GROUP_NAME"
}
{
"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"
}
{
"error": 409,
"detail": "(This is just an example, the exception may not be related to this endpoint) Cannot delete organization link while there is active migration in following project ids: 60c4fd418ebe251047c50554",
"reason": "Conflict",
"errorCode": "CANNOT_DELETE_ORG_ACTIVE_LIVE_MIGRATION_ATLAS_ORG_LINK"
}
{
"error": 500,
"detail": "(This is just an example, the exception may not be related to this endpoint)",
"reason": "Internal Server Error",
"errorCode": "UNEXPECTED_ERROR"
}
Removes one online archive. This archive stores data from one cluster within one project. To use this resource, the requesting Service Account or API Key must have the Project Data Access Admin role.
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})$
.
Unique 24-hexadecimal digit string that identifies the online archive to delete.
Format should match the following pattern: ^([a-f0-9]{24})$
.
Human-readable label that identifies the cluster that contains the collection from which you want to remove an online archive.
Format should match the following pattern: ^[a-zA-Z0-9][a-zA-Z0-9-]*$
.
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
.
Flag that indicates whether the response body should be in the prettyprint format.
Default value is false
.
curl \
--request DELETE 'https://cloud.mongodb.com/api/atlas/v2/groups/32b6e34b3d91647abb20e7b8/clusters/{clusterName}/onlineArchives/{archiveId}' \
--header "Authorization: Bearer $ACCESS_TOKEN"
{
"error": 401,
"detail": "(This is just an example, the exception may not be related to this endpoint)",
"reason": "Unauthorized",
"errorCode": "NOT_ORG_GROUP_CREATOR"
}
{
"error": 403,
"detail": "(This is just an example, the exception may not be related to this endpoint)",
"reason": "Forbidden",
"errorCode": "CANNOT_CHANGE_GROUP_NAME"
}
{
"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"
}
{
"error": 500,
"detail": "(This is just an example, the exception may not be related to this endpoint)",
"reason": "Internal Server Error",
"errorCode": "UNEXPECTED_ERROR"
}
Cancels one pending invitation sent to the specified MongoDB Cloud user to join an organization. You can't cancel an invitation that the user accepted. To use this resource, the requesting Service Account or API Key must have the Organization Owner role.
Note: Invitation management APIs are deprecated. Use Remove One MongoDB Cloud User From One Organization to remove a pending user.
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})$
.
Unique 24-hexadecimal digit string that identifies the invitation.
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
.
Flag that indicates whether the response body should be in the prettyprint format.
Default value is false
.
curl \
--request DELETE 'https://cloud.mongodb.com/api/atlas/v2/orgs/4888442a3354817a7320eb61/invites/{invitationId}' \
--header "Authorization: Bearer $ACCESS_TOKEN"
{
"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"
}
{
"error": 401,
"detail": "(This is just an example, the exception may not be related to this endpoint)",
"reason": "Unauthorized",
"errorCode": "NOT_ORG_GROUP_CREATOR"
}
{
"error": 403,
"detail": "(This is just an example, the exception may not be related to this endpoint)",
"reason": "Forbidden",
"errorCode": "CANNOT_CHANGE_GROUP_NAME"
}
{
"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"
}
{
"error": 500,
"detail": "(This is just an example, the exception may not be related to this endpoint)",
"reason": "Internal Server Error",
"errorCode": "UNEXPECTED_ERROR"
}
Add Access List Entries for the specified Service Account for the organization. Resources require all API requests to originate from IP addresses on the API access list.
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})$
.
The Client ID of the Service Account.
Format should match the following pattern: ^mdb_sa_id_[a-fA-F\d]{24}$
.
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
.
Flag that indicates whether the response returns the total number of items (totalCount) in the response.
Default value is true
.
Number of items that the response returns per page.
Minimum value is 1
, maximum value is 500
. Default value is 100
.
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
.
Flag that indicates whether the response body should be in the prettyprint format.
Default value is false
.
A list of access list entries to add to the access list of the specified Service Account for the organization.
Range of network addresses in the access list for the Service Account. This parameter requires the range to be expressed in Classless Inter-Domain Routing (CIDR) notation of Internet Protocol version 4 or version 6 addresses. You can set a value for this parameter or ipAddress, but not for both in the same request.
Format should match the following pattern: ^((([0-9]{1,3}\.){3}[0-9]{1,3})|(:{0,2}([0-9a-f]{1,4}:){0,7}[0-9a-f]{1,4}[:]{0,2}))((%2[fF]|/)[0-9]{1,3})+$
.
Network address in the access list for the Service Account. This parameter requires the address to be expressed as one Internet Protocol version 4 or version 6 address. You can set a value for this parameter or cidrBlock, but not for both in the same request.
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}$
.
curl \
--request POST 'https://cloud.mongodb.com/api/atlas/v2/orgs/4888442a3354817a7320eb61/serviceAccounts/mdb_sa_id_1234567890abcdef12345678/accessList' \
--header "Authorization: Bearer $ACCESS_TOKEN" \
--header "Content-Type: application/vnd.atlas.2024-08-05+json"
[
{
"cidrBlock": "203.0.113.0/24",
"ipAddress": "203.0.113.10"
}
]
{
"links": [
{
"href": "https://cloud.mongodb.com/api/atlas",
"rel": "self"
}
],
"results": [
{
"cidrBlock": "203.0.113.0/24",
"createdAt": "2025-05-04T09:42:00Z",
"ipAddress": "203.0.113.10",
"lastUsedAddress": "203.0.113.10",
"lastUsedAt": "2025-05-04T09:42:00Z",
"requestCount": 42
}
],
"totalCount": 42
}
{
"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"
}
{
"error": 401,
"detail": "(This is just an example, the exception may not be related to this endpoint)",
"reason": "Unauthorized",
"errorCode": "NOT_ORG_GROUP_CREATOR"
}
{
"error": 403,
"detail": "(This is just an example, the exception may not be related to this endpoint)",
"reason": "Forbidden",
"errorCode": "CANNOT_CHANGE_GROUP_NAME"
}
{
"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"
}
{
"error": 409,
"detail": "(This is just an example, the exception may not be related to this endpoint) Cannot delete organization link while there is active migration in following project ids: 60c4fd418ebe251047c50554",
"reason": "Conflict",
"errorCode": "CANNOT_DELETE_ORG_ACTIVE_LIVE_MIGRATION_ATLAS_ORG_LINK"
}
{
"error": 500,
"detail": "(This is just an example, the exception may not be related to this endpoint)",
"reason": "Internal Server Error",
"errorCode": "UNEXPECTED_ERROR"
}