Search + K

Command Palette

Search for a command to run...

Sign In

Create One Snapshot Export Job

POST /api/atlas/v2/groups/{groupId}/clusters/{clusterName}/backup/exports
Copy endpoint
https://cloud.mongodb.com

Exports one backup Snapshot for dedicated Atlas cluster using Cloud Backups to an Export Bucket. To use this resource, the requesting Service Account or API Key must have the Project Atlas Admin role.

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

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

Request Body

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

Information about the Cloud Backup Snapshot Export Job to create.

interface DiskBackupExportJobRequest {
customData?: BackupLabel

Collection of key-value pairs that represent custom data to add to the metadata file that MongoDB Cloud uploads to the bucket when the export job finishes.

interface BackupLabel {
key?: string;
value?: string;
}
[]
;
exportBucketId: string;
links?: readonly Link
interface Link {
href?: string;
rel?: string;
}
[]
;
snapshotId: string;
}

Responses

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

OK

interface DiskBackupExportJob {
components?: readonly DiskBackupExportMember
interface DiskBackupExportMember {
exportId?: string;
replicaSetName?: string;
}
[]
;
createdAt?: string;
customData?: BackupLabel

Collection of key-value pairs that represent custom data to add to the metadata file that MongoDB Cloud uploads to the bucket when the export job finishes.

interface BackupLabel {
key?: string;
value?: string;
}
[]
;
exportBucketId: string;
exportStatus?: ExportStatus

State of the Export Job.

interface ExportStatus {
exportedCollections?: number;
totalCollections?: number;
}
;
finishedAt?: string;
id?: string;
links?: readonly Link
interface Link {
href?: string;
rel?: string;
}
[]
;
prefix?: string;
snapshotId?: string;
state?: "Cancelled" | "Failed" | "InProgress" | "Queued" | "Successful";
stateReason?: StateReason

State reason of the Job. This is set when the job state is "Failed".

interface StateReason {
errorCode?: string;
message?: string;
}
;
}

Client Errors

400 application/json

Bad Request.

interface ApiError {
badRequestDetail?: BadRequestDetail

Bad request detail.

interface BadRequestDetail {
fields?: FieldViolation[];
}
;
detail?: string;
error: number;
errorCode: string;
parameters?: readonly {}[];
reason?: string;
}
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;
}
409 application/json

Conflict.

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;
}