Navigation

Delete an Online Archive

You can delete an online archive from the API or the Atlas UI. You must have the GROUP_DATA_ACCESS_ADMIN (Project Data Access Admin) role to delete an online archive.

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.

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.

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

DELETE /groups/{GROUP-ID}/clusters/{CLUSTER-NAME}/onlineArchives/{ARCHIVE-ID}
Path ElementNecessityDescription
GROUP-IDRequiredUnique identifier of the project that contains the specified cluster.
CLUSTER-NAMERequiredName of the cluster that contains the collection.
ARCHIVE-IDRequiredUnique identifier of the online archive to delete.

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

The HTTP response returns an empty JSON document.

The following example request deletes the online archive by its ID.

curl --user "{PUBLIC-KEY}:{PRIVATE-KEY}" --digest \
--header "Content-Type: application/json" \
--include \
--request DELETE "https://cloud.mongodb.com/api/atlas/v1.0/groups/{GROUP-ID}/clusters/{CLUSTER-NAME}/onlineArchives/{ARCHIVE-ID}"

If the request fails, it returns the following error:

Error CodeDescription
RESOURCE_NOT_FOUNDThe specified archive ID is not valid.
Give Feedback