Getting repository server information¶
Get a list of repository servers registered in IBM Spectrum Protect Plus and each of them.

Figure 47 The same action can be taken in the IBM Spectrum Protect Plus web user interface: In the Repository Server pane, click Refresh.¶
Method and URI¶
To get information about all repository servers, use a GET method and a URI:
GET https://{hostname|IPv4}/api/cloud
To get information about a specific repository server, use a GET method and a URI:
GET https://{hostname|IPv4}/api/cloud/{cloudProviderInfoId}
Tip
To get a {cloudProviderInfoId}
value based on its name, follow the instructions in Getting a {cloudProviderInfoId}.
Parameters¶
None.
Data¶
None.
Example 1: Get information about all repository servers¶
The following Python snippet requests a list of all repository servers and their information:
requests.get('https://' + spp_ipv4 + '/api/cloud',
headers={...}, data=_data, verify=...)
The request prompts a response that is structured as shown, with the HTTP status of 200 (OK).
{
"links": {...},
"total": 2,
"clouds": [
{
"links": {...},
"id": "1",
"name": "BlueMachines - Spectrum Protect - Singapore 1",
"type": "s3",
"comment": null,
"accesskey": {
"href": "https://10.0.0.100/api/identity/key/1001"
},
"properties": {
"type": "s3",
"certificate": {
"href": "https://10.0.0.100/api/security/certificate/1001"
},
"hostname": "SP-SINGAPORE1",
"port": 9000,
"bucket": "spp-singapore1-1575895669224"
},
"provider": "sp",
"wormProtected": false,
"defaultRetention": 0,
"offloadEnabled": true,
"archiveEnabled": true,
"ec2ServiceEnabled": null,
"deepArchiveEnabled": false,
"rbacPath": "root:0/cloud:0/cloudType:s3/cloud:1",
"cloudCapacity": null,
"name": "BlueMachines - Spectrum Protect - Singapore 1",
"id": "1",
"type": "s3"
},
{
...
"id": "2,
"name": "BlueMachines - Spectrum Protect - Dallas 1",
...
}
]
}
Example 2: Get information about a specific repository server¶
Assume that you want to get information about the specific repository server. You get the cloudProviderInfoId of it: 2. A Python snippet that is similar to the following example can be used to request the information about this repository server:
cloud_provider_info_id = "2"
requests.get('https://' + spp_ipv4 + '/api/cloud'
+ cloud_provider_info_id,
headers={...}, data=_data, verify=...)
The request prompts a response that is structured as shown, with the HTTP status of 200 (OK).
{
...
"id": "2,
"name": "BlueMachines - Spectrum Protect - Dallas 1",
...
}