Get the SnapMirror policies

Contributors netapp-ranuk

You can use this workflow to retrieve the SnapMirror policies based on the source and destination Cloud Volume ONTAP instances.

1. Select the working environment to use

Perform the workflow Get working environments and choose the publicId values for the working environments and destination volume name.

2. Get the SnapMirror policies

HTTP method Path

GET

/occm/api/replication/metadata/snapmirror-policies/{workingEnvironmentId}/{destinationVolumeName}

curl example
curl --location --request GET 'https://cloudmanager.cloud.netapp.com/occm/api/replication/metadata/snapmirror-policies/<WORKING_ENV_ID>/<DEST_VOL_NAME>' --header 'x-agent-id: <AGENT_ID>' --header 'Authorization: Bearer <ACCESS_TOKEN>' --header 'Content-Type: application/json'
Input

Path parameters:

  • <WORKING_ENV_ID> workingEnvironmentId

  • <DEST_VOL_NAME> destinationVolumeName

Output

The JSON output example includes the list of SnapMirror policies.

JSON output example
[
    {
        "name": "MirrorAnd7YearsBackup",
        "comment": "A unified Asynchronous SnapMirror and SnapVault policy for mirroring the latest active file system and daily and weekly and monthly Snapshot copies.",
        "policyType": "mirror_vault",
        "rules": [
            {
                "snapMirrorLabel": "sm_created",
                "retention": 1
            },
            {
                "snapMirrorLabel": "daily",
                "retention": 7
            },
            {
                "snapMirrorLabel": "weekly",
                "retention": 5
            },
            {
                "snapMirrorLabel": "monthly",
                "retention": 84
            }
        ],
        "isDefault": false,
        "isSupported": true,
        "reason": null
    },
    {
        "name": "MirrorAndMonthlyBackup",
        "comment": "A unified Asynchronous SnapMirror and SnapVault policy for mirroring the latest active file system and daily and weekly Snapshot copies.",
        "policyType": "mirror_vault",
        "rules": [
            {
                "snapMirrorLabel": "sm_created",
                "retention": 1
            },
            {
                "snapMirrorLabel": "daily",
                "retention": 7
            },
            {
                "snapMirrorLabel": "weekly",
                "retention": 5
            }
        ],
        "isDefault": true,
        "isSupported": true,
        "reason": null
    },
    {
        "name": "MirrorAndYearlyBackup",
        "comment": "A unified Asynchronous SnapMirror and SnapVault policy for mirroring the latest active file system and daily and weekly and monthly Snapshot copies.",
        "policyType": "mirror_vault",
        "rules": [
            {
                "snapMirrorLabel": "sm_created",
                "retention": 1
            },
            {
                "snapMirrorLabel": "daily",
                "retention": 7
            },
            {
                "snapMirrorLabel": "weekly",
                "retention": 5
            },
            {
                "snapMirrorLabel": "monthly",
                "retention": 12
            }
        ],
        "isDefault": false,
        "isSupported": true,
        "reason": null
    }
]