Skip to main content

Get Snapshot policies

Contributors netapp-ranuk

You can perform this workflow to retrieve the default snapshot policies available on the cluster.

Choose the workflow to use based on the type of Cloud Volumes ONTAP deployment:

Get Snapshot policies for single node

You can use this workflow to retrieve the Snapshot policies in a single node working environment.

1. Get the snapshot policies

HTTP method Path

GET

/occm/api/gcp/vsa/metadata/default-snapshot-policies

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

None

Output

The JSON output example includes the list of default snapshot policies available on the cluster.

JSON output example
[
    {
        "name": "default",
        "schedules": [
            {
                "frequency": "hourly",
                "retention": 6
            },
            {
                "frequency": "daily",
                "retention": 2
            },
            {
                "frequency": "weekly",
                "retention": 2
            }
        ],
        "description": "Default policy with hourly, daily & weekly schedules."
    },
    {
        "name": "none",
        "schedules": [],
        "description": "Policy for no automatic snapshots."
    }
]

Get Snapshot policies for high availability pair

You can use this workflow to retrieve the Snapshot policies in an HA working environment.

1. Get the snapshot policies

HTTP method Path

GET

/occm/api/gcp/ha/metadata/default-snapshot-policies

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

None

Output

The JSON output example includes the list of default snapshot policies available on the cluster.

JSON output example
[
    {
        "name": "default",
        "schedules": [
            {
                "frequency": "hourly",
                "retention": 6
            },
            {
                "frequency": "daily",
                "retention": 2
            },
            {
                "frequency": "weekly",
                "retention": 2
            }
        ],
        "description": "Default policy with hourly, daily & weekly schedules."
    },
    {
        "name": "none",
        "schedules": [],
        "description": "Policy for no automatic snapshots."
    }
]