Search + K

Command Palette

Search for a command to run...

Sign In

Update Expiration Date for One Legacy Backup Snapshot

Deprecated
PATCH /api/atlas/v2/groups/{groupId}/clusters/{clusterName}/snapshots/{snapshotId}
Copy endpoint
https://cloud.mongodb.com

Changes the expiration date for one legacy backup snapshot for one cluster in the specified project. To use this resource, the requesting Service Account or API Key must have the Project Owner role. Effective 23 March 2020, all new clusters can use only Cloud Backups. When you upgrade to 4.2, your backup system upgrades to cloud backup if it is currently set to legacy backup. After this upgrade, all your existing legacy backup snapshots remain available. They expire over time in accordance with your retention policy. Your backup policy resets to the default schedule. If you had a custom backup policy in place with legacy backups, you must re-create it with the procedure outlined in the Cloud Backup documentation.

Parameters

path Path Parameters

Name Type
groupId 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.

string
clusterName required

Human-readable label that identifies the cluster.

string
snapshotId required

Unique 24-hexadecimal digit string that identifies the desired snapshot.

string

query Query Parameters

Name Type
envelope

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.

boolean
pretty

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

boolean

Request Body

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

Changes One Legacy Backup Snapshot Expiration.

interface BackupSnapshot {
clusterId?: string;
clusterName?: string;
complete?: boolean;
created?: ApiBSONTimestampView

BSON timestamp that indicates when the checkpoint token entry in the oplog occurred.

interface ApiBSONTimestampView {
date?: string;
increment?: number;
}
;
doNotDelete?: boolean;
expires?: string;
groupId?: string;
id?: string;
incremental?: boolean;
lastOplogAppliedTimestamp?: ApiBSONTimestampView

BSON timestamp that indicates when the checkpoint token entry in the oplog occurred.

interface ApiBSONTimestampView {
date?: string;
increment?: number;
}
;
links?: readonly Link
interface Link {
href?: string;
rel?: string;
}
[]
;
parts?: readonly BackupSnapshotPart

Characteristics that identify this snapshot.

interface BackupSnapshotPart {
clusterId?: string;
completedTime?: string;
compressionSetting?: "NONE" | "GZIP";
dataSizeBytes?: number;
encryptionEnabled?: boolean;
fcv?: string;
fileSizeBytes?: number;
machineId?: string;
masterKeyUUID?: string;
mongodVersion?: string;
replicaSetName?: string;
replicaState?: string;
storageSizeBytes?: number;
typeName?: "REPLICA_SET" | "CONFIG_SERVER" | "CONFIG_SERVER_REPLICA_SET" | "CONFIG_SHARD_REPLICA_SET";
}
[]
;
}

Responses

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

OK

interface BackupSnapshot {
clusterId?: string;
clusterName?: string;
complete?: boolean;
created?: ApiBSONTimestampView

BSON timestamp that indicates when the checkpoint token entry in the oplog occurred.

interface ApiBSONTimestampView {
date?: string;
increment?: number;
}
;
doNotDelete?: boolean;
expires?: string;
groupId?: string;
id?: string;
incremental?: boolean;
lastOplogAppliedTimestamp?: ApiBSONTimestampView

BSON timestamp that indicates when the checkpoint token entry in the oplog occurred.

interface ApiBSONTimestampView {
date?: string;
increment?: number;
}
;
links?: readonly Link
interface Link {
href?: string;
rel?: string;
}
[]
;
parts?: readonly BackupSnapshotPart

Characteristics that identify this snapshot.

interface BackupSnapshotPart {
clusterId?: string;
completedTime?: string;
compressionSetting?: "NONE" | "GZIP";
dataSizeBytes?: number;
encryptionEnabled?: boolean;
fcv?: string;
fileSizeBytes?: number;
machineId?: string;
masterKeyUUID?: string;
mongodVersion?: string;
replicaSetName?: string;
replicaState?: string;
storageSizeBytes?: number;
typeName?: "REPLICA_SET" | "CONFIG_SERVER" | "CONFIG_SERVER_REPLICA_SET" | "CONFIG_SHARD_REPLICA_SET";
}
[]
;
}

Client Errors

401 application/json

Unauthorized.

interface ApiError {
badRequestDetail?: BadRequestDetail

Bad request detail.

interface BadRequestDetail {
fields?: FieldViolation[];
}
;
detail?: string;
error: number;
errorCode: string;
parameters?: readonly {}[];
reason?: string;
}
403 application/json

Forbidden.

interface ApiError {
badRequestDetail?: BadRequestDetail

Bad request detail.

interface BadRequestDetail {
fields?: FieldViolation[];
}
;
detail?: string;
error: number;
errorCode: string;
parameters?: readonly {}[];
reason?: string;
}
404 application/json

Not Found.

interface ApiError {
badRequestDetail?: BadRequestDetail

Bad request detail.

interface BadRequestDetail {
fields?: FieldViolation[];
}
;
detail?: string;
error: number;
errorCode: string;
parameters?: readonly {}[];
reason?: string;
}

Server Errors

500 application/json

Internal Server Error.

interface ApiError {
badRequestDetail?: BadRequestDetail

Bad request detail.

interface BadRequestDetail {
fields?: FieldViolation[];
}
;
detail?: string;
error: number;
errorCode: string;
parameters?: readonly {}[];
reason?: string;
}