Home > Storage > PowerMax and VMAX > Data Protection > Dell EMC PowerMax and VMAX All Flash: Snapshot Policies > Appendix B: REST API examples
To help set up and manage snapshots using the REST API, Unisphere 9.2 adds new endpoints and additional REST parameters to new versions of existing REST calls.
The versioned calls are all under the new branch of the API at the following URI:
https://{IPaddress|hostname}:8443/univmax/restapi/92/
Note: The Dell EMC REST API officially supports up to three versions of the API in a release of Unisphere with N-2 version support. Version 9.2 supports API versions 9.2, 9.1, and 9.0. When Unisphere is upgraded, REST API continues to work the same. However, newer versions of a call may provide extra functionality. Check the REST API change log available on Dell.com/support.
Provisioning calls for service-level provisioning can now assign a policy when SGs are created. The other parameters are highlighted in the following screenshot.
Note: It is possible to assign multiple policies at the time of SG creation. The following POST example associates the hourly, daily, and weekly default policies while creating an SG with 5 volumes.
Create a snapshot policy REST API (POST): Snapshot policies can also be created or modified with REST POST and PUT calls under https://{ipaddress|hostname}:8443/univmax/restapi/92/replication/symmetrix/{symmetrixId}/snapshot_policy calls. The following screen shows an example to create a 15-minute policy with a retention of 5 snapshots.
View a snapshot policy REST API (GET):
Modify, Suspend, or Add an SG to a snapshot policy:
In addition to the method of calling the API directly, the Python SDK from Dell Technologies helps users create their own scripts with minimal effort. The SDK PyU4V is available on PyPI.
We have added a new functional module for snapshot-policy management and support for assigning policies when creating or modifying a storage group. The following functions are present in the snapshot_policy.py function library:
Provisioning functions also enable associating policies to storage groups upon creation or later.
Sample python script to create a new storage group and assign DailyDefault and HourlyDefault existing snapshot policies.