IBM Cloud Object Storage - 可以使用 API 下订单吗?

IBM Cloud Object Storage - can the order be made using API?

客户是否可以通过 API 下达 IBM“可对象存储”订单?如果能提供相关指导或示例就更好了。 knowlegelayer 中描述了订购 IBM Cloud Object Storage,但似乎没有关于通过 API 进行订购的任何信息。

是的,这是可能的。您可以在此处阅读更多信息 Managing-SoftLayer-Object-Storage-Through-REST-APIs

目前,SoftLayer Control 门户使用包 206 来订购 could-object-storage S3 和 SWIFT 类型。要了解您可以在 REST 调用之后执行的项目价格。

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

准备订购时使用服务 SoftLayer_Product_Order::verifyOrder to verify the order and use SoftLayer_Product_Order::placeOrder

订购 S3 对象存储类型

您需要发送一个 SoftLayer_Container_Product_Order_Network_Storage_Object 对象如下:

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 }]
            }
        ]
} 

注意:更改[用户名][apiKey]111111 用你自己的数据。当您准备好订购时,将 verifyOrder 替换为 placeOrder

订购一个SWIFT对象存储

在这种情况下,您需要发送一个 SoftLayer_Container_Product_Order_Network_Storage_Hub 对象。下面是一个例子:

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 }]
            }
        ]
}

注意:更改[用户名][apiKey]222222 用你自己的数据。当您准备好订购时,将 verifyOrder 替换为 placeOrder

希望对你有所帮助。