Registering IBM Cloud Object Storage
The Cloud Object Storage (COS) registration APIs allows you to register an existing COS bucket in PowerVC which helps you to upload or download image OVAs.
Options for Cloud Object Storage Registration APIs
Method | URI | Description |
---|---|---|
POST |
|
Registers or adds a Cloud Object Storage. |
PUT |
|
Updates or edits a Cloud Object Storage. |
DELETE |
|
Unregisters or removes a managed Cloud Object Storage. |
GET |
|
Shows the details of a managed COS. |
GET |
|
Lists all COS that are managed. |
GET |
|
Shows the details of all images OVA on a COS. |
GET |
|
Uploads an image backup to a selected COS bucket. |
GET |
|
Downloads an image backup from a COS bucket to the specified backup node. Image backups can be downloaded to the same or a different PowerVC management node. |
Register a Cloud Object Storage
This operation adds a Cloud Object Storage in PowerVC. This API takes configuration attributes for the COS in the request body as input and registers the COS in PowerVC.
- Normal Response Code: OK (201)
Name | Style | Type | Description |
---|---|---|---|
|
body |
string |
Display name of the COS. |
|
body |
string |
Optional. Type of the COS. Default option is |
|
body |
string |
Includes details such as COS endpoint for the bucket, API key value in IBM Cloud service credentials, authentication endpoint (optional), and resource instance ID in IBM Cloud service credentials. |
|
body |
string |
Name of the IBM Cloud bucket. |
{
"cos": {
"name": "Cos-1",
"type": "ibm_cos",
"credentials": {
"cos_endpoint": "https://s3.us.cloud-object-storage.appdomain.cloud",
"cos_api_key_id": "e0n5P34667NK6IJUy##########O0-ryAkcwgMgejQkI",
"cos_auth_endpoint": "https://iam.cloud.ibm.com/identity/token",
"cos_resource_crn": "crn:v1:bluemix:public:cloud-object-storage:global:a/edc47c5026c14e0b96078bf4f#####:5036b379-####-423e-####-177bc57c7da4::"
},
"bucket_name": "bucket-1"
}
}
Name | Style | Type | Description |
---|---|---|---|
|
body |
string |
Display name of the COS. |
|
body |
string |
Unique ID of the COS. |
{
"cos": {
"id": 1
}
}
Edit a COS
This operation updates the registration information for a COS that is managed by PowerVC. This API takes the name of the COS for which you want to change the attributes in the URI and the attributes that you want to change in the body as input. The response body contains the attributes that are updated by the request.
- Normal Response Code: OK (200)
Request parameters
Name | Style | Type | Description |
---|---|---|---|
|
body |
string |
Optional. Display name of the COS. |
|
body |
string |
Includes details such as COS endpoint for the bucket, API key value in IBM Cloud service credentials, authentication endpoint (optional), and resource instance ID in IBM Cloud service credentials. |
{
"cos": {
"name": "Cos-1",
"credentials": {
"cos_endpoint": "https://s3.us.cloud-object-storage.appdomain.cloud",
"cos_api_key_id": "e0n5P34667NK6IJUy##########O0-ryAkcwgMgejQkI",
"cos_auth_endpoint": "https://iam.cloud.ibm.com/identity/token",
"cos_resource_crn": "crn:v1:bluemix:public:cloud-object-storage:global:a/edc47c5026c14e0b96078bf4f6#####:5036b379-####-423e-####-177bc57c7da4::"
},
}
}
Name | Style | Type | Description |
---|---|---|---|
|
body |
string |
Unique ID of the COS. |
|
body |
string |
Display name of the COS. |
|
body |
string |
Type of the COS. Default option is |
|
body |
string |
Name of the IBM Cloud bucket. |
{
"cos" : {
"id" : 1,
"name": "Cos-1",
"type" : "ibm_cos",
"bucket_name": "bucket-1",
}
}
Remove or delete a COS
This operation deletes or deregisters a COS so that it is no longer managed by PowerVC. This API takes the COS name in the URI as input and takes no request body. The API does not return any response body.
- Normal Response Code: No Content (204)
View details of a COS
This operation shows detailed information about a COS buckets that is managed by PowerVC. This API takes the COS name in the URI as input and contains no request body. The API returns the IP address and credential information of the fabric in the response body.
- Normal Response Code: OK (200)
Name | Style | Type | Description |
---|---|---|---|
|
body |
string |
Unique ID of the COS. |
|
body |
string |
Display name of the COS. |
|
body |
string |
Type of the COS. Default option is |
|
body |
string |
Name of the IBM Cloud bucket. |
{
"cos" : {
"id" : 1,
"name": "Cos-1",
"type" : "ibm_cos",
"bucket_name": "bucket-1",
}
}
List all COS
This operation lists the basic information about all of the COS that are managed by PowerVC. This API takes no input in the request body and returns the name and display name of each COS that is managed by PowerVC in the response body.
- Normal Response Code: OK (200)
Name | Style | Type | Description |
---|---|---|---|
|
body |
string |
Unique ID of the COS. |
|
body |
string |
Display name of the COS. |
|
body |
string |
Type of the COS. Default option is |
|
body |
string |
Name of the IBM Cloud bucket. |
{ "cos" : [
{
"id" : 1,
"name": "cos1",
"type" : "ibm_cos",
"bucket_name": "bucket1"
},
{
"id" : 2,
"name": "cos2",
"type" : "ibm_cos",
"bucket_name": "bucket2"
}
]
}
COS list images
This operation shows detailed information about all images on a COS. This API takes no input in the request body and returns the image OVA name and size in the response body.
- Normal Response Code: OK (200)
Name | Style | Type | Description |
---|---|---|---|
|
body |
string |
Display name of an image OVA. |
|
body |
string |
Size of an image OVA in GiB. |
{
"list_images": [
{
"ova_name": "6GB_95.ova",
"ova_size_gb": 6
},
{
"ova_name": "Demo-Export-Image-Upload_105.ova",
"ova_size_gb": 2
},
{
"ova_name": "Image_113.ova",
"ova_size_gb": 5
} ]
}
COS upload image
This operation uploads an image to the specified COS bucket. This API takes COS bucket name in the request body and returns the image backup ID and the task URI in the response body.
- Normal Response Code: OK (201)
Request parameters
Name | Style | Type | Description |
---|---|---|---|
|
body |
string |
Optional. Display name of the COS bucket where the image backup is being uploaded. |
{
"upload": {
"cos_bucket": “bucket-1”
}
}
Name | Style | Type | Description |
---|---|---|---|
|
body |
string |
Unique ID generated for the image backup after it is uploaded to COS bucket. |
|
body |
string |
Task URI is returned that can be used to monitor the progress of image backup upload operations. |
{
"upload": {
"image_backup_id": 14,
"task_uri": "https://9.x.x.x:9000/v3/40a58846608e4e908c43b547d4dfb58c/image-backups/get_progress?action=upload&task_id=6f09caf1-0468-4101-9c4d-34d0b0690s89&backup_id=23"
}
}
COS download image
This operation downloads an image from a COS bucket. The image OVA is downloaded from COS to the backup node and an image is created on PowerVC. Images can be downloaded to the same or a different PowerVC management node. This API takes COS bucket name in the request body and returns the image backup ID and the task URI in the response body.
- Normal Response Code: OK (201)
Request parameters
Name | Style | Type | Description |
---|---|---|---|
|
body |
string |
Image backup ID, OVA display name, or display name of the COS bucket where the image backup is being uploaded. |
|
body |
string |
Optional. Backup node hostname. |
|
body |
string |
Display name of image backup. |
|
body |
string |
Optional. Description to be added, if any. |
{
"upload": {
"cos_bucket": “bucket-1”
}
}
Name | Style | Type | Description |
---|---|---|---|
|
body |
string |
Optional. Backup node hostname. |
|
body |
string |
Name of the image OVA that is being downloaded. |
|
body |
string |
Name of the COS bucket. |
|
body |
string |
Display name of the COS bucket. |
|
body |
string |
Optional. Description to be added, if any. |
{
"download": {
"backup_host": "host1" ,
"ova_name": "Image_113.ova",
"cos_bucket": "new-bucket-suman",
"display_name": "Image_113_PVC",
"display_description": "Downloading Image OVA from IBM COS to a different PowerVC"
}
}
Name | Style | Type | Description |
---|---|---|---|
|
body |
string |
Unique ID of the image backup being downloaded. |
|
body |
string |
Task URI is returned that can be used to monitor the progress of image backup download operations. |
{
"download": {
"image_backup_id": 14,
"task_uri": "https://9.x.x.x:9000/v3/40a58846608e4e908c43b547d4dfb58c/image-backups/get_progress?action=download&task_id=6f09caf1-0468-4101-9c4d-34d0b0690s89&backup_id=23"
}
}