Return One Legacy Backup Restore Job Deprecated

GET /api/atlas/v1.0/groups/{groupId}/clusters/{clusterName}/restoreJobs/{jobId}

Returns one legacy backup restore job for one cluster in the specified project. To use this resource, the requesting Service Account or API Key must have the Project Read Only 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.

Cloud Backup Documentation

Path parameters

  • groupId string 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.

    Format should match the following pattern: ^([a-f0-9]{24})$.

  • clusterName string Required

    Human-readable label that identifies the cluster with the snapshot you want to return.

    Format should match the following pattern: ^[a-zA-Z0-9][a-zA-Z0-9-]*$.

  • jobId string Required

    Unique 24-hexadecimal digit string that identifies the restore job.

    Format should match the following pattern: ^([a-f0-9]{24})$.

Query parameters

  • envelope boolean

    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.

  • pretty boolean

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

    Default value is false.

    Prettyprint

Responses

  • 200 application/json

    OK

    Hide response attributes Show response attributes object
    • batchId string

      Unique 24-hexadecimal digit string that identifies the batch to which this restore job belongs. This parameter exists only for a sharded cluster restore.

      Format should match the following pattern: ^([a-f0-9]{24})$.

    • clusterId string

      Unique 24-hexadecimal digit string that identifies the cluster with the snapshot you want to return. This parameter returns for restore clusters.

      Format should match the following pattern: ^([a-f0-9]{24})$.

    • clusterName string

      Human-readable label that identifies the cluster containing the snapshots you want to retrieve.

      Format should match the following pattern: ^[a-zA-Z0-9][a-zA-Z0-9-]*$.

    • created string(date-time)

      Date and time when someone requested this restore job. This parameter expresses its value in the ISO 8601 timestamp format in UTC.

    • delivery object Required

      Method and details that indicate how to deliver the restored snapshot data.

      Hide delivery attributes Show delivery attributes object
      • authHeader string

        Header name to use when downloading the restore, used with "delivery.methodName" : "HTTP".

      • authValue string

        Header value to use when downloading the restore, used with "delivery.methodName" : "HTTP".

      • expirationHours integer(int32)

        Number of hours after the restore job completes that indicates when the Uniform Resource Locator (URL) for the snapshot download file expires. The resource returns this parameter when "delivery.methodName" : "HTTP".

        Minimum value is 1.

      • expires string(date-time)

        Date and time when the Uniform Resource Locator (URL) for the snapshot download file expires. This parameter expresses its value in the ISO 8601 timestamp format in UTC. The resource returns this parameter when "delivery.methodName" : "HTTP".

      • maxDownloads integer(int32)

        Positive integer that indicates how many times you can use the Uniform Resource Locator (URL) for the snapshot download file. The resource returns this parameter when "delivery.methodName" : "HTTP".

        Minimum value is 1.

      • methodName string Required

        Human-readable label that identifies the means for delivering the data. If you set "delivery.methodName" : "AUTOMATED_RESTORE", you must also set: delivery.targetGroupId and delivery.targetClusterName or delivery.targetClusterId. The response returns "delivery.methodName" : "HTTP" as an automated restore uses HyperText Transport Protocol (HTTP) to deliver the restore job to the target host.

        Values are CLIENT_PIT_HTTP, QUERY, AUTOMATED_RESTORE, HTTP, THIRD_PARTY_COPY, CLIENT_PIT_SCP, or SCP.

      • statusName string

        State of the downloadable snapshot file when MongoDB Cloud received this request.

        Values are NOT_STARTED, IN_PROGRESS, READY, FAILED, INTERRUPTED, EXPIRED, MAX_DOWNLOADS_EXCEEDED, or PENDING.

      • targetClusterId string

        Unique 24-hexadecimal digit string that identifies the target cluster. Use the clusterId returned in the response body of the Get All Snapshots and Get a Snapshot endpoints. This parameter applies when "delivery.methodName" : "AUTOMATED_RESTORE".

        If the target cluster doesn't have backup enabled, two resources return parameters with empty values:

        • Get All Snapshots endpoint returns an empty results array without clusterId elements
        • Get a Snapshot endpoint doesn't return a clusterId parameter.

        To return a response with the clusterId parameter, either use the delivery.targetClusterName parameter or enable backup on the target cluster.

        Format should match the following pattern: ^([a-f0-9]{24})$.

      • targetClusterName string

        Human-readable label that identifies the target cluster. Use the clusterName returned in the response body of the Get All Snapshots and Get a Snapshot endpoints. This parameter applies when "delivery.methodName" : "AUTOMATED_RESTORE".

        If the target cluster doesn't have backup enabled, two resources return parameters with empty values:

        • Get All Snapshots endpoint returns an empty results array without clusterId elements
        • Get a Snapshot endpoint doesn't return a clusterId parameter.

        To return a response with the clusterId parameter, either use the delivery.targetClusterName parameter or enable backup on the target cluster.

        Format should match the following pattern: ^[a-zA-Z0-9][a-zA-Z0-9-]*$.

      • targetGroupId string

        Unique 24-hexadecimal digit string that identifies the project that contains the destination cluster for the restore job. The resource returns this parameter when "delivery.methodName" : "AUTOMATED_RESTORE".

        Format should match the following pattern: ^([a-f0-9]{24})$.

      • url string Deprecated

        Uniform Resource Locator (URL) from which you can download the restored snapshot data. Url includes the verification key. The resource returns this parameter when "delivery.methodName" : "HTTP".

      • urlV2 string

        Uniform Resource Locator (URL) from which you can download the restored snapshot data. This should be preferred over url. The verification key must be sent as an HTTP header. The resource returns this parameter when "delivery.methodName" : "HTTP".

    • encryptionEnabled boolean

      Flag that indicates whether someone encrypted the data in the restored snapshot.

    • groupId string

      Unique 24-hexadecimal digit string that identifies the project that owns the snapshots.

      Format should match the following pattern: ^([a-f0-9]{24})$.

    • hashes array[object]

      List that contains documents mapping each restore file to a hashed checksum. This parameter applies after you download the corresponding delivery.url. If "methodName" : "HTTP", this list contains one object that represents the hash of the .tar.gz file.

      Key and value pair that map one restore file to one hashed checksum. This parameter applies after you download the corresponding delivery.url.

      Hide hashes attributes Show hashes attributes object
      • fileName string

        Human-readable label that identifies the hashed file.

      • hash string

        Hashed checksum that maps to the restore file.

      • typeName string

        Human-readable label that identifies the hashing algorithm used to compute the hash value.

        Value is SHA1.

    • id string

      Unique 24-hexadecimal digit string that identifies the restore job.

      Format should match the following pattern: ^([a-f0-9]{24})$.

    • masterKeyUUID string(uuid)

      Universally Unique Identifier (UUID) that identifies the Key Management Interoperability (KMIP) master key used to encrypt the snapshot data. This parameter applies only when "encryptionEnabled" : "true".

    • snapshotId string

      Unique 24-hexadecimal digit string that identifies the snapshot to restore. If you set snapshotId, you can't set oplogInc, oplogTs, pointInTimeUTCMillis, or checkpointId.

      Format should match the following pattern: ^([a-f0-9]{24})$.

    • statusName string

      Human-readable label that identifies the status of the downloadable file at the time of the request.

      Values are IN_PROGRESS, BROKEN, KILLED, or FINISHED.

    • timestamp object

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

      Hide timestamp attributes Show timestamp attributes object
      • increment integer(int32)

        Order of the database operation that the oplog recorded at specific date and time.

        Minimum value is 1199145600.

      • date string(date-time)

        Date and time when the oplog recorded this database operation. This parameter expresses its value in the ISO 8601 timestamp format in UTC.

  • 400 application/json

    Bad Request.

    Hide response attributes Show response attributes object
    • badRequestDetail object

      Bad request detail.

      Hide badRequestDetail attribute Show badRequestDetail attribute object
      • fields array[object]

        Describes all violations in a client request.

        Hide fields attributes Show fields attributes object
        • description string Required

          A description of why the request element is bad.

        • field string Required

          A path that leads to a field in the request body.

    • detail string

      Describes the specific conditions or reasons that cause each type of error.

    • error integer(int32) Required

      HTTP status code returned with this error.

      External documentation
    • errorCode string Required

      Application error code returned with this error.

    • parameters array[object]

      Parameters used to give more information about the error.

    • reason string

      Application error message returned with this error.

  • 401 application/json

    Unauthorized.

    Hide response attributes Show response attributes object
    • badRequestDetail object

      Bad request detail.

      Hide badRequestDetail attribute Show badRequestDetail attribute object
      • fields array[object]

        Describes all violations in a client request.

        Hide fields attributes Show fields attributes object
        • description string Required

          A description of why the request element is bad.

        • field string Required

          A path that leads to a field in the request body.

    • detail string

      Describes the specific conditions or reasons that cause each type of error.

    • error integer(int32) Required

      HTTP status code returned with this error.

      External documentation
    • errorCode string Required

      Application error code returned with this error.

    • parameters array[object]

      Parameters used to give more information about the error.

    • reason string

      Application error message returned with this error.

  • 403 application/json

    Forbidden.

    Hide response attributes Show response attributes object
    • badRequestDetail object

      Bad request detail.

      Hide badRequestDetail attribute Show badRequestDetail attribute object
      • fields array[object]

        Describes all violations in a client request.

        Hide fields attributes Show fields attributes object
        • description string Required

          A description of why the request element is bad.

        • field string Required

          A path that leads to a field in the request body.

    • detail string

      Describes the specific conditions or reasons that cause each type of error.

    • error integer(int32) Required

      HTTP status code returned with this error.

      External documentation
    • errorCode string Required

      Application error code returned with this error.

    • parameters array[object]

      Parameters used to give more information about the error.

    • reason string

      Application error message returned with this error.

  • 404 application/json

    Not Found.

    Hide response attributes Show response attributes object
    • badRequestDetail object

      Bad request detail.

      Hide badRequestDetail attribute Show badRequestDetail attribute object
      • fields array[object]

        Describes all violations in a client request.

        Hide fields attributes Show fields attributes object
        • description string Required

          A description of why the request element is bad.

        • field string Required

          A path that leads to a field in the request body.

    • detail string

      Describes the specific conditions or reasons that cause each type of error.

    • error integer(int32) Required

      HTTP status code returned with this error.

      External documentation
    • errorCode string Required

      Application error code returned with this error.

    • parameters array[object]

      Parameters used to give more information about the error.

    • reason string

      Application error message returned with this error.

  • 500 application/json

    Internal Server Error.

    Hide response attributes Show response attributes object
    • badRequestDetail object

      Bad request detail.

      Hide badRequestDetail attribute Show badRequestDetail attribute object
      • fields array[object]

        Describes all violations in a client request.

        Hide fields attributes Show fields attributes object
        • description string Required

          A description of why the request element is bad.

        • field string Required

          A path that leads to a field in the request body.

    • detail string

      Describes the specific conditions or reasons that cause each type of error.

    • error integer(int32) Required

      HTTP status code returned with this error.

      External documentation
    • errorCode string Required

      Application error code returned with this error.

    • parameters array[object]

      Parameters used to give more information about the error.

    • reason string

      Application error message returned with this error.

GET /api/atlas/v1.0/groups/{groupId}/clusters/{clusterName}/restoreJobs/{jobId}
curl \ --request GET 'https://cloud.mongodb.com/api/atlas/v1.0/groups/32b6e34b3d91647abb20e7b8/clusters/{clusterName}/restoreJobs/{jobId}' \ --header "Authorization: Bearer $ACCESS_TOKEN"
Response examples (200)
{ "batchId": "32b6e34b3d91647abb20e7b8", "clusterId": "32b6e34b3d91647abb20e7b8", "clusterName": "string", "created": "2025-05-04T09:42:00Z", "delivery": { "authHeader": "string", "authValue": "string", "expirationHours": 42, "expires": "2025-05-04T09:42:00Z", "maxDownloads": 42, "methodName": "CLIENT_PIT_HTTP", "statusName": "NOT_STARTED", "targetClusterId": "32b6e34b3d91647abb20e7b8", "targetClusterName": "string", "targetGroupId": "32b6e34b3d91647abb20e7b8", "url": "string", "urlV2": "string" }, "encryptionEnabled": true, "groupId": "32b6e34b3d91647abb20e7b8", "hashes": [ { "fileName": "string", "hash": "string", "links": [ { "href": "https://cloud.mongodb.com/api/atlas", "rel": "self" } ], "typeName": "SHA1" } ], "id": "32b6e34b3d91647abb20e7b8", "links": [ { "href": "https://cloud.mongodb.com/api/atlas", "rel": "self" } ], "masterKeyUUID": "string", "snapshotId": "32b6e34b3d91647abb20e7b8", "statusName": "IN_PROGRESS", "timestamp": { "increment": 1199145600, "date": "2025-05-04T09:42:00Z" } }
Response examples (400)
{ "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" }
Response examples (401)
{ "error": 401, "detail": "(This is just an example, the exception may not be related to this endpoint)", "reason": "Unauthorized", "errorCode": "NOT_ORG_GROUP_CREATOR" }
Response examples (403)
{ "error": 403, "detail": "(This is just an example, the exception may not be related to this endpoint)", "reason": "Forbidden", "errorCode": "CANNOT_CHANGE_GROUP_NAME" }
Response examples (404)
{ "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" }
Response examples (500)
{ "error": 500, "detail": "(This is just an example, the exception may not be related to this endpoint)", "reason": "Internal Server Error", "errorCode": "UNEXPECTED_ERROR" }