簡體   English   中英

驗證Endurance Storage中的訂單時出現內部服務器錯誤

[英]Internal Server Error while Verifying Order in Endurance Storage

我正在使用Mozilla Poster中的以下REST調用來驗證訂單

https:// [用戶名]:[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 Internal Server Error。

請同樣幫助我。 提前致謝

您的模板中存在一些錯誤:

  1. 缺少“ SoftLayer_Container_Product_Order_Network_Storage_Enterprise”值的起始引號(“)。
  2. 產品價格:“ 45354”是指:“ 2000 GB存儲空間”
  3. id:“ 6028”是指“ itemId”。 您應該使用SoftLayer_Product_Package :: getItemPrices指定“價格標識符”(“ id”屬性),而不是“ itemId”

試試這個模板:

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

一些重要的參考資料:

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM