1

Is it possible for customers to make IBM ’could-object-storage' orders via API? It will be great if related guidance or samples can be provided. Ordering IBM Cloud Object Storage is described in knowlegelayer, but it seems that there is not any info about doing it via API.

nyker
  • 57
  • 4

1 Answers1

1

Yes, it is possible. You can read more information here Managing-SoftLayer-Object-Storage-Through-REST-APIs

Currently, SoftLayer Control portal uses package 206 to order could-object-storage S3 and SWIFT types. To know the item prices you can perform following REST call.

https://[userName]:[apiKey]@api.softlayer.com/rest/v3.1/SoftLayer_Product_Package/206/getItemPrices

Use the service SoftLayer_Product_Order::verifyOrder to verify the order and use SoftLayer_Product_Order::placeOrder when you ready to order.

Order a S3 object storage type

You need to send a SoftLayer_Container_Product_Order_Network_Storage_Object object as following:

https://[userName]:[apiKey]@api.softlayer.com/rest/v3.1/SoftLayer_Product_Order/verifyOrder

Method: POST

Body:    
{
    "parameters" : [
            {
                "complexType": "SoftLayer_Container_Product_Order_Network_Storage_Object",
                "quantity": 1,
                "packageId": 206,
                "prices": [ { "id": 1111111 }]
            }
        ]
} 

Note: Change [userName], [apiKey], and 111111 with your own data. Replace verifyOrder by placeOrder when you ready to order.

Order a SWIFT object storage

On this case you need to send a SoftLayer_Container_Product_Order_Network_Storage_Hub object. Following is an example:

https://[userName]:[apiKey]@api.softlayer.com/rest/v3.1/SoftLayer_Product_Order/verifyOrder

Method: POST

Body:
{
    "parameters" : [
            {
                "complexType": "SoftLayer_Container_Product_Order_Network_Storage_Hub",
                "quantity": 1,
                "packageId": 206,
                "prices": [ { "id": 222222 }]
            }
        ]
}

Note: Change [userName], [apiKey], and 222222 with your own data. Replace verifyOrder by placeOrder when you ready to order.

I hope this help you.

Albert Camacho
  • 1,129
  • 1
  • 7
  • 13