White Papers

Configuration details
11 Dell Storage Manager REST API Cookbook | 3089-WP-SAN
# define the REST API call
REST = '/ApiConnection/Logout'
# build the complete REST API URL
completeURL = '%s%s' % (baseURL, REST if REST[0] != '/' else REST[1:])
# execute REST API call via the HTTP POST method
print connection.post(completeURL
,data=json.dumps(payload
,ensure_ascii=False).encode('utf-8')
,headers=header
,verify=verify_cert)
STDOUT
<Response [204]>
2.3 Understanding instanceId
Every object that the REST API calls can interact with has a key attribute named instanceId. The value of the
instanceId key may be associated with a REST API open connection, SC Series array, server object, volume
object, storage profile, and more.
These instanceId values are often injected into subsequent REST API calls to interact with, create, modify, or
remove further object types. The values are denoted in RED where required in the following code samples.
Understanding this key attribute and how to extract this value from the raw JSON-based output sent by the
DSM Data Collector is required.
2.3.1 <instanceId> API connection
# capture API connection instanceId
# declare and define the payload variable
payload = {}
# define the REST API call
REST = '/ApiConnection/ApiConnection'
# build the complete REST API URL
completeURL = '%s%s' % (baseURL, REST if REST[0] != '/' else REST[1:])