Navigation

Delete Custom Zone Mappings

Info With Circle IconCreated with Sketch.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.

The Atlas API authenticates using HTTP Digest Authentication. Provide a programmatic API public key and corresponding private key as the username and password when constructing the HTTP request.

To learn how to configure API access for an Atlas project, see Configure Atlas API Access.

https://cloud.mongodb.com/api/atlas/v1.0

Removes all custom zone mappings from the specified Global Cluster.

DELETE /groups/{GROUP-ID}/clusters/{CLUSTER-NAME}/globalWrites/customZoneMapping
Path ElementRequired/OptionalDescription
GROUP-IDRequired.The unique identifier for the project that contains the Global Cluster.
CLUSTER-NAMERequired.The name of the Global Cluster.

The following query parameters are optional:

Query ParameterTypeDescriptionDefault
prettybooleanDisplays response in a prettyprint format.false
envelopebooleanSpecifies whether or not to wrap the response in an envelope.false

This endpoint does not use HTTP request body parameters.

NameTypeDescription
customZoneMappingdocumentAn empty document.
managedNamespacesarray of documentsEach document specifies a managed namespace for a Global Cluster managed by Atlas. The array is empty if no managed namespaces are specified for the Global Cluster. For more information, see Global Clusters.
managedNamespaces[n].collectionstringThe name of the collection associated with the managed namespace.
managedNamespaces[n].customShardKeystringThe custom shard key for the collection. Global Clusters require a compound shard key consisting of a location field and a user-selected second key, the custom shard key.
managedNamespaces[n].dbstringThe name of the database containing the collection.
curl -X DELETE -i -u "{PUBLIC-KEY}:{PRIVATE-KEY}" --digest -H "Content-Type: application/json" \
"https://cloud.mongodb.com/api/atlas/v1.0/groups/6c391af480eef519ea5ceeb1/clusters/GlobalCluster1/globalWrites/customZoneMapping?pretty=true"
{
"customZoneMapping" : { },
"managedNamespaces" : [ {
"collection" : "publishers",
"customShardKey" : "city",
"db" : "myData"
} ]
}
Give Feedback