Adding an object storage server or a repository server¶
You can add an object storage server (Amazon S3, Azure Blog Object Storage, IBM Cloud Object Storage, or S3 compatible storage) or a repository server (IBM Spectrum Protect).
Method and URI¶
To add an object storage server, use a POST method with a URI:
POST https://{hostname|IPv4}/ngp/cloud
Parameters¶
None.
Data¶
Data 1: type
Value:
s3
Type: System string. Required.
Data 2: provider
The type of cloud storage provider. For available key-value pairs, follow the instructions in Getting bucket information.
Provider |
Value |
---|---|
Amazon S3 |
|
IBM Cloud Object Storage |
|
Microsoft Azure Blob Storage |
|
S3 compatible object storage |
|
IBM Spectrum Protect |
|
Example value:
cos
Type: System string. Required. Available in the web user interface.
Data 3: accesskey
The URL of the access key. The URL has the following format:
https://{hostname|IPv4}/api/identity/key/{identityKeyId}
Tip
To get an {identityKeyId}
value based on the name of the identity key, follow the instructions in Getting an {identityKeyId}.
Example value: https://10.0.0.100/api/identity/key/1010
Type: String. Required. Available in the web user interface.
Data 4: properties
Example value:
{
"type": "s3",
"certificate": "10.0.0.100/api/security/certificate/1287",
"endpoint": "https://ibmcos.bluemachines.com.invalid",
"bucket": "bluemachines-sales",
"archiveBucket": "bluemachines-archive"
}
Type: JSON object. Required. Available in the web user interface.
Data 4.1: properties
> type
Value:
s3
Type: System string. Required.
Data 4.2: properties
> certificate
The URL of the certificate for IBM Cloud Object Storage and S3 compatible object storage: {certificateHref}
.
Tip
To get a {certificateId}
value based on the certificate name, follow the instructions in Getting a {certificateHref}.
Type: String. Available in the web user interface.
Data 4.3: properties
> region
The region for Amazon S3. For available key-value pairs, follow the instructions in Getting bucket information.
Example value:
us-east-1
Type: String. Available in the web user interface.
Data 4.4: properties
> enableDeepArchive
Enable or disable the Amazon S3 Glacier Deep Archive storage class for Amazon S3.
Example value: false
Type: Boolean. Available in the web user interface.
Data 4.5: properties
> endpoint
The URL of the endpoint of the object storage server.
Type: String. Required. Available in the web user interface.
Data 4.6: properties
> bucket
The name of the standard object storage bucket.
Type: String. Required. Available in the web user interface.
Tip
To get the bucket name, follow the instructions in Getting bucket information.
Data 4.7: properties
> archiveBucket
The name of the archive storage object bucket.
Type: String. Available in the web user interface.
Data 4.8: properties
> hostname
The hostname of IBM Spectrum Protect.
Example value: sp-dallas1
Type: String. Required. Available in the web user interface.
Data 4.9: properties
> port
The port number to connect to IBM Spectrum Protect.
Example value: 9000
Type: Integer. Required. Available in the web user interface.
Data 5: name
The name of the object storage server or the repository server.
Example value: BlueMachines - IBM COS - Singapore
Type: String. Required. Available in the web user interface.
Example 1: Add an IBM Cloud Object Storage server¶
Assume that you want to add the following IBM Cloud Object Storage server:
Provider: IBM Cloud Object Storage
Name: BlueMachines - IBM COS - Dallas
Access key: BlueMachines IBM COS Dallas Key (
{identityKeyId}
1010)Certificate (optional): BlueMachines - Cert IBM Cloud Object Storage (
{certificateId}
1287)Standard object storage bucket: bluemachines-sales
Archive object storage bucket: bluemachines-archive
A Python snippet that is similar to the following example can be used to send a request to IBM Spectrum Protect Plus to add the object storage server:
_data = f'''{{
"type": "s3",
"provider": "cos",
"accesskey": "https://10.0.0.100/api/identity/key/1010",
"properties": {{
"type": "s3",
"certificate": "10.0.0.100/api/security/certificate/1287",
"endpoint": "https://ibmcos.bluemachines.com.invalid",
"bucket": "bluemachines-sales",
"archiveBucket": "bluemachines-archive"
}},
"name": "BlueMachines - IBM COS - Dallas"
}}'''
requests.post('https://' + spp_ipv4 + '/ngp/cloud',
headers={...}, data=_data, verify=...)

Figure 43 The same action can be taken in the IBM Spectrum Protect Plus web user interface: After getting the buckets, specify the standard object storage bucket and the archive object storage bucket. Optionally, you can specify the certificate for IBM Cloud Object Storage or S3 compatible object storage.¶
After you run the Python snippet, ensure that you get a response with the HTTP status of 201 (Created) and verify that the object storage server was added. The response body is similar to the JSON object for the object storage server, as shown in Getting information about object storage accounts and repository servers.
Example 2: Add IBM Spectrum Protect¶
Assume that you want to add the following IBM Spectrum Protect system:
Name: BlueMachines Spectrum Protect - Dallas 1
Hostname: sp-dallas1
Port: 9000
Access key: BlueMachines SP Dallas1 Key (
{identityKeyHref}
https://10.0.0.100/api/identity/key/1050)Certificate (optional): BlueMachines - Cert IBM Spectrum Protect (
{certificateHref}
https://10.0.0.100/api/security/certificate/1287)
A Python snippet that is similar to the following example can be used to send a request to IBM Spectrum Protect Plus to add the IBM Spectrum Protect server:
access_key_href = "https://10.0.0.100/api/identity/key/1050"
certificate_key_href = "https://10.0.0.100/api/security/certificate/1287"
_data = f'''{{
"type": "s3",
"provider": "sp",
"accesskey": {access_key_href},
"properties": {{
"type": "s3",
"certificate": {certificate_key_href}
"hostname": sp-dallas1
"port": 9000
}},
"name": "BlueMachines - IBM COS - Dallas"
}}'''
requests.post('https://' + spp_ipv4 + '/ngp/cloud',
headers={...}, data=_data, verify=...)

Figure 44 The same action can be taken in the IBM Spectrum Protect Plus web user interface: In the navigaton pane, click System Configuration > Backup Storage > Repository Server, and click Add Repository Server. Enter the configuration values and click Register.¶
After you run the Python snippet, ensure that you get a response with the HTTP status of 201 (Created) and the IBM Spectrum Protect was added. The response body is similar to the JSON object for the IBM Spectrum Protect, as shown in Getting information about object storage accounts and repository servers.