Return Backup Compliance Policy Settings

GET /api/atlas/v1.0/groups/{groupId}/backupCompliancePolicy

Returns the Backup Compliance Policy settings with the specified project. To use this resource, the requesting Service Account or API Key must have the Project Owner role.

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})$.

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
    • authorizedEmail string(email) Required

      Email address of the user who authorized to update the Backup Compliance Policy settings.

    • authorizedUserFirstName string

      First name of the user who authorized to update the Backup Compliance Policy settings.

    • authorizedUserLastName string

      Last name of the user who authorized to update the Backup Compliance Policy settings.

    • copyProtectionEnabled boolean

      Flag that indicates whether to prevent cluster users from deleting backups copied to other regions, even if those additional snapshot regions are removed. If unspecified, this value defaults to false.

      Default value is false.

    • deletable boolean

      Flag that indicates whether the Backup Compliance Policy is allowed to be disabled. It is default to false and a support ticket needs to be filed to request setting to true.

      Default value is false.

      Configure a Backup Compliance Policy
    • encryptionAtRestEnabled boolean

      Flag that indicates whether Encryption at Rest using Customer Key Management is required for all clusters with a Backup Compliance Policy. If unspecified, this value defaults to false.

      Default value is false.

      Encryption at Rest using Customer Key Management
    • onDemandPolicyItem object

      Specifications for on-demand policy.

      Hide onDemandPolicyItem attributes Show onDemandPolicyItem attributes object
      • frequencyInterval integer(int32) Required

        Number that indicates the frequency interval for a set of snapshots. MongoDB Cloud ignores this setting for non-hourly policy items in Backup Compliance Policy settings.

        Values are 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, or 40.

      • frequencyType string Required

        Human-readable label that identifies the frequency type associated with the backup policy.

        Value is ondemand.

      • id string

        Unique 24-hexadecimal digit string that identifies this backup policy item.

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

      • retentionUnit string Required

        Unit of time in which MongoDB Cloud measures snapshot retention.

        Values are days, weeks, months, or years.

      • retentionValue integer(int32) Required

        Duration in days, weeks, months, or years that MongoDB Cloud retains the snapshot. For less frequent policy items, MongoDB Cloud requires that you specify a value greater than or equal to the value specified for more frequent policy items.

        For example: If the hourly policy item specifies a retention of two days, you must specify two days or greater for the retention of the weekly policy item.

    • pitEnabled boolean

      Flag that indicates whether the cluster uses Continuous Cloud Backups with a Backup Compliance Policy. If unspecified, this value defaults to false.

      Default value is false.

      Continuous Cloud Backups
    • projectId string

      Unique 24-hexadecimal digit string that identifies the project for the Backup Compliance Policy.

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

    • restoreWindowDays integer(int32)

      Number of previous days that you can restore back to with Continuous Cloud Backup with a Backup Compliance Policy. You must specify a positive, non-zero integer, and the maximum retention window can't exceed the hourly retention time. This parameter applies only to Continuous Cloud Backups with a Backup Compliance Policy.

    • scheduledPolicyItems array[object]

      List that contains the specifications for one scheduled policy.

      Specifications for scheduled policy.

      Hide scheduledPolicyItems attributes Show scheduledPolicyItems attributes object
      • frequencyInterval integer(int32) Required

        Number that indicates the frequency interval for a set of Snapshots. A value of 1 specifies the first instance of the corresponding frequencyType.

        • In a yearly policy item, 1 indicates that the yearly Snapshot occurs on the first day of January and 12 indicates the first day of December.

        • In a monthly policy item, 1 indicates that the monthly Snapshot occurs on the first day of the month and 40 indicates the last day of the month.

        • In a weekly policy item, 1 indicates that the weekly Snapshot occurs on Monday and 7 indicates Sunday.

        • In an hourly policy item, you can set the frequency interval to 1, 2, 4, 6, 8, or 12. For hourly policy items for NVMe clusters, MongoDB Cloud accepts only 12 as the frequency interval value.

        MongoDB Cloud ignores this setting for non-hourly policy items in Backup Compliance Policy settings.

        Values are 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, or 40.

      • frequencyType string Required

        Human-readable label that identifies the frequency type associated with the backup policy.

        Values are daily, hourly, weekly, monthly, or yearly.

      • id string

        Unique 24-hexadecimal digit string that identifies this backup policy item.

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

      • retentionUnit string Required

        Unit of time in which MongoDB Cloud measures Snapshot retention.

        Values are days, weeks, months, or years.

      • retentionValue integer(int32) Required

        Duration in days, weeks, months, or years that MongoDB Cloud retains the Snapshot. For less frequent policy items, MongoDB Cloud requires that you specify a value greater than or equal to the value specified for more frequent policy items.

        For example: If the hourly policy item specifies a retention of two days, you must specify two days or greater for the retention of the weekly policy item.

    • state string

      Label that indicates the state of the Backup Compliance Policy settings. MongoDB Cloud ignores this setting when you enable or update the Backup Compliance Policy settings.

      Values are ACTIVE, ENABLING, UPDATING, or DISABLING.

    • updatedDate string(date-time)

      ISO 8601 timestamp format in UTC that indicates when the user updated the Data Protection Policy settings. MongoDB Cloud ignores this setting when you enable or update the Backup Compliance Policy settings.

    • updatedUser string(email)

      Email address that identifies the user who updated the Backup Compliance Policy settings. MongoDB Cloud ignores this email setting when you enable or update the Backup Compliance Policy settings.

  • 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}/backupCompliancePolicy
curl \ --request GET 'https://cloud.mongodb.com/api/atlas/v1.0/groups/32b6e34b3d91647abb20e7b8/backupCompliancePolicy' \ --header "Authorization: Bearer $ACCESS_TOKEN"
Response examples (200)
{ "authorizedEmail": "hello@example.com", "authorizedUserFirstName": "string", "authorizedUserLastName": "string", "copyProtectionEnabled": false, "deletable": false, "encryptionAtRestEnabled": false, "onDemandPolicyItem": { "frequencyInterval": 0, "frequencyType": "ondemand", "id": "32b6e34b3d91647abb20e7b8", "retentionUnit": "days", "retentionValue": 42 }, "pitEnabled": false, "projectId": "32b6e34b3d91647abb20e7b8", "restoreWindowDays": 42, "scheduledPolicyItems": [ { "frequencyInterval": 1, "frequencyType": "daily", "id": "32b6e34b3d91647abb20e7b8", "retentionUnit": "days", "retentionValue": 42 } ], "state": "ACTIVE", "updatedDate": "2025-05-04T09:42:00Z", "updatedUser": "hello@example.com" }
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" }