我正在使用Mozilla海报中的以下REST调用验证订单
https://[username]:[apiKey]@api.softlayer.com/rest/v3/SoftLayer_Product_Order/verifyOrder
此调用的jSON有效负载为: -
{
"parameters": [
{
"location": 138124,
"packageId": 240,
"osFormatType": {
"id": 12,
"keyName": "LINUX"
},
"complexType":
SoftLayer_Container_Product_Order_Network_Storage_Enterprise",
"prices": [
{
"id": 45064 # Endurance Storage
},
{
"id": 45104 # Bloack Storage
},
{
"id": 45074 # 0.25 IOPS/GB
},
{
"id": 45354 # 100 GB Storage space
},
{
"id": 6028 # 5 GB Snapshot space
}
],
"quantity": 1
}
]
}
用于拍摄空间的调用是: -
https://api.softlayer.com/rest/v3.1/SoftLayer_Product_Package/240/getItemPrices?objectFilter={%22itemPrices%22: {%22categories%22: {%22categoryCode%22: {%22operation%22: %22storage_snapshot_space%22}}}}
但我仍面临着问题。我得到的错误是500内部服务器错误。
请同样帮助我。在此先感谢
答案 0 :(得分:0)
您的模板中存在一些错误:
试试这个模板:
{
"parameters":[
{
"location":138124,
"packageId":240,
"osFormatType":{
"id":12,
"keyName":"LINUX"
},
"complexType":"SoftLayer_Container_Product_Order_Network_Storage_Enterprise",
"prices":[
{
"id":45064 # Endurance Storage
},
{
"id":45104 # Block Storage
},
{
"id":45074 # 0.25 IOPS/GB
},
{
"id":45214 # 100 GB Storage space
},
{
"id":46126 # 5 GB Snapshot space
}
],
"quantity":1
}
]
}
一些重要的参考资料: