按照https://gist.github.com/bmpotter/27913e92e9ff7b6b0c54中的示例,我们尝试使用SoftLayer API来订购裸机 .
我们的“verifyOrder”请求,即(https:// $ SLUSERNAME:$ SLAPIKEY@api.softlayer.com/rest/v3/SoftLayer_Product_Order/verifyOrder.json)使用以下json
{“complexType”:“SoftLayer_Container_Product_Order_Hardware_Server”,“quantity”:1,“hardware”:[{“hostname”:“userBM3”,“domain”:“cloud.com”,“primaryBackendNetworkComponent”:{“networkVlan”:{“ id“:1050255,”primarySubnetId“:1223965}}}],”location“:”dal09“,”useHourlyPricing“:false,”packageId“:251,”price“:[{”id“:50659},{” id“:49447},{”id“:31154},{”id“:40148},{”id“:35963},{”id“:25014},{”id“:34807},{”id“ :27023},{“id”:32627},{“id”:32500},{“id”:33483},{“id”:35310},{“id”:156765},{“id”:156765 },{“id”:49841},{“id”:49841},{“id”:49841},{“id”:49841},{“id”:49841},{“id”:49841}, {“id”:49841},{“id”:49841},{“id”:49841},{“id”:49841},{“id”:50223},{“id”:141945}],“ storageGroups“:[{”arrayTypeId“:2,”hardDrives“:[0,1]},{”arrayTypeId“:2,”hardDrives“:[2,3]},{”arrayTypeId“:9,”hardDrives“ :[4]},{“arrayTypeId”:9,“hardDrives”:[5]},{“arrayTypeId”:9,“hardDrives”:[6]},{“arrayTypeId”:9,“hardDrives”:[ 7]},{“arrayTypeId”:9,“hardDrives”:[8]},{“arrayTypeId”:9,“hardDrives”:[9]},{“array TypeId“:9,”hardDrives“:[10]},{”arrayTypeId“:9,”hardDrives“:[11]}]
}
导致以下回复
{“error”:“发生内部系统错误 . ”,“code”:“SoftLayer_Exception_InternalError”}
我们验证了所有价格ID都是有效的,并且无法确定导致内部错误的原因 .
1 回答
尝试以下REST请求:
快速查看,价格与Dallas09位置之间存在冲突,请参阅此文章获取更多信息,请:Location-based Pricing and You
156765 价格(描述:2.00 TB SATA)这不是 Dallas 9 的有效价格
如果您想在达拉斯9中订购相同的商品,请更改 49821 而不是 156765
References: