White Papers

Configuration details
38 Dell Storage Manager REST API Cookbook | 3089-WP-SAN
3.6 Replays
This section provides the REST API calls used to create, manage, and remove Replays (also known as
snapshots) and view volume objects on an SC Series array.
Replay REST API calls used in this section
REST API
Method
/StorageCenter/ScVolume/<instanceId>/CreateReplay
POST
/StorageCenter/ScReplay/GetList
POST
/StorageCenter/ScReplay/<instanceId>/CreateView
POST
/StorageCenter/ScReplay/<instanceId>
PUT
/StorageCenter/ScReplay/<instanceId>/Expire
POST
3.6.1 Create a Replay
The creation of a Replay is based on the ScVolume REST API call and the RestTest folder and volume
created in sections 3.4.1 and 3.3.1, respectively, with the assumption that neither object has been deleted. An
additional code segment is included here to capture all Replay information from all DSM-managed SC Series
arrays and populate the Python dictionary rplyList.
The volume Replay creation is successful only if the volume is mapped to a server object within the same SC
Series array.
# create a replay object from RestTest_Vol volume object
payload = {}
# Description has a 30 char field len
payload['Description'] = 'RestTest_Vol_replay'
# ExpireTime in minutes, 0 = Never Expire
payload['ExpireTime'] = '15'
REST = '/StorageCenter/ScVolume/%s/CreateReplay' %
volList['RestTest_Vol']['instanceId']
completeURL = '%s%s' % (baseURL, REST if REST[0] != '/' else REST[1:])
json_data = connection.post(completeURL
,data=json.dumps(payload
,ensure_ascii=False).encode('utf-8')
,headers=header
,verify=verify_cert)
stdout = json.loads(json_data.text)
print stdout
rplyList = {}
rplyList[stdout['createVolume']['instanceName']] = {}
rplyList[stdout['createVolume']['instanceName']]['instanceId'] =
stdout['instanceId']