Getting Disk Storage information about vSnap servers¶
You can get a list of all vSnap servers and information each vSnap server. You can get vSnap server information from the cache data that are stored in the IBM Spectrum Protect Plus environment. Or, you can request IBM Spectrum Protect Plus to collect the latest, more accurate information from a specific vSnap servers.
Method and URI¶
To get information about all vSnap servers using cached records in IBM Spectrum Protect Plus, use a GET method and a URI:
GET https://{hostname|IP}/api/storage
To get information about a specific vSnap server using cached records in IBM Spectrum Protect Plus, use a GET method and a URI:
GET https://{hostname|IP}/api/storage/{storageId}
Tip
To get a {storageId}
value based on its name, follow the instructions in Getting a {storageId}.
To request the latest information about a specific vSnap server, use a POST method and a URI:
POST https://{hostname|IP}/api/storage/{storageId}
Restriction: With this POST method request, you cannot retrieve infromation about all vSnap servers at once. Typically, the request takes longer than the GET requests that collect vSnap server information from IBM Spectrum Protect Plus.
Parameters¶
There is no parameters for the GET requests to retrieve vSnap information from IBM Spectrum Protect Plus.
For the POST request to retrieve information from a vSnap server, use the following parameter:
Parameter 1: action
Start an action to retrieve vSnap server information from the vSnap servers.
Value:
refresh
Type: System string. Required. Available in the web user interface.
Data¶
None.
Example 1: Get information about all vSnap servers¶
The following Python snippet requests a list of all vSnap servers and their information: As mentioned, the information here might be old and inaccurate.
requests.get('https://' + spp_ipv4 + '/api/storage',
headers={...}, verify=...)

Figure 31 The same action can be taken in the IBM Spectrum Protect Plus web user interface: In the navigation pane, click System Configuration > Backup Storage > Disk and click Refresh.¶
The request prompts a response that is structured as shown, with the HTTP status of 200 (OK).
{
"links": {...},
"total": 2,
"storages": [
{
"links": {...},
"resourceType": "storage",
"type": "vsnap",
"typeDisplayName": "vSnap",
"site": "1000",
"name": "localhost",
"storageId": "2000",
"user": {
"href": "https://10.0.0.100:-1/api/identity/user/2105"
},
"rbacPath": "root:0/site:0/site:1000/site.all.storage:1000/storage:2
↪000",
"hostAddress": "localhost",
"portNumber": 8900,
"sslConnection": true,
"initializeStatus": "Ready",
"initializeStatusDisplayName": "Ready",
"storageProfiles": null,
"version": "10.1.6-1530",
"capacity": {
"free": 73093602816,
"total": 107363696640,
"updateTime": 1575923708816
},
"activeDirectoryInfo": null,
"demo": false,
"maxStreams": null,
"isReady": true,
"id": "2000"
},
{
"links": {...},
"resourceType": "storage",
"type": "vsnap",
"typeDisplayName": "vSnap",
"site": "1000",
"name": "10.0.1.1",
"storageId": "2101",
"user": {
"href": "https://10.0.0.100:-1/api/identity/user/2120"
},
"rbacPath": "root:0/site:0/site:1000/site.all.storage:1000/storage:2
↪101",
"hostAddress": "10.0.1.1",
"portNumber": 8900,
"sslConnection": true,
"initializeStatus": "Not Initialized",
"initializeStatusDisplayName": "Not Initialized",
"storageProfiles": null,
"version": "10.1.6-1530",
"capacity": {
"free": 0,
"total": 0,
"updateTime": 1576117254291
},
"activeDirectoryInfo": null,
"demo": false,
"maxStreams": null,
"isReady": false,
"id": "2101"
}
]
}
Example 2: Get the latest information about a specific vSnap server¶
Assume that you added a vSnap server, vsnap-dallas1 ({storage_id}
2001) to IBM Spectrum Protect Plus. The following Python snippet requests information of the vSnap server. This POST method request retrieves the latest vSnap server information from the target vSnap server:
storage_id = "2101"
_params = {"action": "refresh"}
requests.post('https://' + spp_ipv4 + '/api/storage/' + storage_id,
headers={...}, params=_params, verify=...)

Figure 32 The same action can be taken in the IBM Spectrum Protect Plus web user interface: Click Actions > Refresh for the target vSnap server.¶
The request prompts a response that is structured as shown, with the HTTP status of 201 (Creted).
{
"links": {...},
"resourceType": "storage",
"type": "vsnap",
"typeDisplayName": "vSnap",
"site": "1000",
"name": "10.0.1.1",
"storageId": "2101",
...,
"id": "2101",
}