2017-01-10 1 views
0

私は、SLA REST APIクエリを実行して、locationGroupId値の価格エントリだけを照会することによって、一般的な価格エントリの240(耐久性iSCSI)パッケージで使用可能なアイテムのリストを取得しました未定義。ここで私が走ったクエリは次のとおりです。パッケージ項目のundef locationGroupIdエントリを理解する

カール-u:https://api.softlayer.com/rest/v3/SoftLayer_Product_Package/240/getItems.json?objectFilter=%7B%22items%22:%7B%22prices%22:%7B%22locationGroupId%22:%7B%22operation%22:%22is%20null%22%7D%7D%7D%7D

私は結果で少し混乱しています。ここでの抜粋です。このアイテムの

...

{ 
     "upgradeItemId" : null, 
     "description" : "4000 GB Storage Space", 
     "capacity" : "4000", 
     "keyName" : "4000_GB_PERFORMANCE_STORAGE_SPACE", 
     "itemCategory" : { 
     "quantityLimit" : 0, 
     "name" : "Storage Space", 
     "id" : 382, 
     "categoryCode" : "performance_storage_space" 
     }, 
     "softwareDescriptionId" : null, 
     "id" : 5146, 
     "itemTaxCategoryId" : 166, 
     "prices" : [ 
     { 
      "recurringFee" : "58", 
      "setupFee" : "0", 
      "quantity" : null, 
      "packageReferences" : [ 
       { 
        "packageId" : 240, 
        "id" : 386831, 
        "itemPriceId" : 46625 
       } 
      ], 
      "onSaleFlag" : null, 
      "oneTimeFee" : "0", 
      "itemId" : 5146, 
      "sort" : 10, 
      "currentPriceFlag" : null, 
      "laborFee" : "0", 
      "id" : 46625, 
      "locationGroupId" : null 
     }, 
     { 
      "recurringFee" : "145", 
      "setupFee" : "0", 
      "quantity" : null, 
      "packageReferences" : [ 
       { 
        "packageId" : 240, 
        "id" : 385796, 
        "itemPriceId" : 46096 
       } 
      ], 
      "onSaleFlag" : null, 
      "oneTimeFee" : "0", 
      "itemId" : 5146, 
      "sort" : 10, 
      "currentPriceFlag" : null, 
      "laborFee" : "0", 
      "id" : 46096, 
      "locationGroupId" : null 
     }, 
     { 
      "recurringFee" : "290", 
      "setupFee" : "0", 
      "quantity" : null, 
      "packageReferences" : [ 
       { 
        "packageId" : 240, 
        "id" : 385806, 
        "itemPriceId" : 46106 
       } 
      ], 
      "onSaleFlag" : null, 
      "oneTimeFee" : "0", 
      "itemId" : 5146, 
      "sort" : 10, 
      "currentPriceFlag" : null, 
      "laborFee" : "0", 
      "id" : 46106, 
      "locationGroupId" : null 
     }, 
     { 
      "recurringFee" : "290", 
      "setupFee" : "0", 
      "quantity" : null, 
      "packageReferences" : [ 
       { 
        "packageId" : 240, 
        "id" : 383598, 
        "itemPriceId" : 45364 
       } 
      ], 
      "onSaleFlag" : null, 
      "oneTimeFee" : "0", 
      "itemId" : 5146, 
      "sort" : 10, 
      "currentPriceFlag" : null, 
      "laborFee" : "0", 
      "id" : 45364, 
      "locationGroupId" : null 
     }, 
     { 
      "recurringFee" : "362.5", 
      "setupFee" : "0", 
      "quantity" : null, 
      "packageReferences" : [ 
       { 
        "packageId" : 240, 
        "id" : 386841, 
        "itemPriceId" : 46635 
       } 
      ], 
      "onSaleFlag" : null, 
      "oneTimeFee" : "0", 
      "itemId" : 5146, 
      "sort" : 10, 
      "currentPriceFlag" : null, 
      "laborFee" : "0", 
      "id" : 46635, 
      "locationGroupId" : null 
     }, 
     { 
      "recurringFee" : "435", 
      "setupFee" : "0", 
      "quantity" : null, 
      "packageReferences" : [ 
       { 
        "packageId" : 240, 
        "id" : 385816, 
        "itemPriceId" : 46116 
       } 
      ], 
      "onSaleFlag" : null, 
      "oneTimeFee" : "0", 
      "itemId" : 5146, 
      "sort" : 10, 
      "currentPriceFlag" : null, 
      "laborFee" : "0", 
      "id" : 46116, 
      "locationGroupId" : null 
     }, 
     { 
      "recurringFee" : "580", 
      "setupFee" : "0", 
      "quantity" : null, 
      "packageReferences" : [ 
       { 
        "packageId" : 240, 
        "id" : 383608, 
        "itemPriceId" : 45374 
       } 
      ], 
      "onSaleFlag" : null, 
      "oneTimeFee" : "0", 
      "itemId" : 5146, 
      "sort" : 10, 
      "currentPriceFlag" : null, 
      "laborFee" : "0", 
      "id" : 45374, 
      "locationGroupId" : null 
     }, 
     { 
      "recurringFee" : "580", 
      "setupFee" : "0", 
      "quantity" : null, 
      "packageReferences" : [ 
       { 
        "packageId" : 240, 
        "id" : 1302339, 
        "itemPriceId" : 183991 
       } 
      ], 
      "onSaleFlag" : null, 
      "oneTimeFee" : "0", 
      "itemId" : 5146, 
      "sort" : 10, 
      "currentPriceFlag" : null, 
      "laborFee" : "0", 
      "id" : 183991, 
      "locationGroupId" : null 
     }, 
     { 
      "recurringFee" : "725", 
      "setupFee" : "0", 
      "quantity" : null, 
      "packageReferences" : [ 
       { 
        "packageId" : 240, 
        "id" : 386851, 
        "itemPriceId" : 46645 
       } 
      ], 
      "onSaleFlag" : null, 
      "oneTimeFee" : "0", 
      "itemId" : 5146, 
      "sort" : 10, 
      "currentPriceFlag" : null, 
      "laborFee" : "0", 
      "id" : 46645, 
      "locationGroupId" : null 
     }, 
     { 
      "recurringFee" : "1015", 
      "setupFee" : "0", 
      "quantity" : null, 
      "packageReferences" : [ 
       { 
        "packageId" : 240, 
        "id" : 383618, 
        "itemPriceId" : 45384 
       } 
      ], 
      "onSaleFlag" : null, 
      "oneTimeFee" : "0", 
      "itemId" : 5146, 
      "sort" : 10, 
      "currentPriceFlag" : null, 
      "laborFee" : "0", 
      "id" : 45384, 
      "locationGroupId" : null 
     }, 
     { 
      "recurringFee" : "1450", 
      "setupFee" : "0", 
      "quantity" : null, 
      "packageReferences" : [ 
       { 
        "packageId" : 240, 
        "id" : 1300099, 
        "itemPriceId" : 181751 
       } 
      ], 
      "onSaleFlag" : null, 
      "oneTimeFee" : "0", 
      "itemId" : 5146, 
      "sort" : 10, 
      "currentPriceFlag" : null, 
      "laborFee" : "0", 
      "id" : 181751, 
      "locationGroupId" : null 
     }, 
     { 
      "recurringFee" : "1682", 
      "setupFee" : "0", 
      "quantity" : null, 
      "packageReferences" : [ 
       { 
        "packageId" : 240, 
        "id" : 1295927, 
        "itemPriceId" : 178645 
       } 
      ], 
      "onSaleFlag" : null, 
      "oneTimeFee" : "0", 
      "itemId" : 5146, 
      "sort" : 10, 
      "currentPriceFlag" : null, 
      "laborFee" : "0", 
      "id" : 178645, 
      "locationGroupId" : null 
     } 
     ], 
     "units" : "GB" 
    }, 
... 

、「4000_GB_PERFORMANCE_STORAGE_SPACE」は、未定義のlocationGroupIdを持つ複数の価格IDがあります。私が見ることができる唯一の違いは、recurringFee値です。私は、これらの価格オブジェクトのどれを選択するのか理解していません。私は一番安いものを選ぶべきだと思うが、それ以外の違いはあると思うが、それは何か分からない。どんな助けもありがとう。

答えて

0

これらの価格は、例えば、彼らがすることができ、異なるカテゴリを持っている:

  • パフォーマンスのストレージレプリケーション
  • ストレージのスナップショットスペース
  • 収納スペース
  • ストレージレプリケーション

ますあなたが注文した通りに価格を使用する必要があります配置したいと思い、また、あなたは、これらの価格のためのキャパシティ(capacityRestrictionMaximumcapacityRestrictionMinimum性質を)検討する必要があり

この種の情報を取得するには、以下の残りの要求のようなマスクを追加する必要があります。

https://api.softlayer.com/rest/v3/SoftLayer_Product_Package/240/getItems.json?objectFilter={"items":{"prices":{"locationGroupId":{"operation":"is null"}}}}&objectMask=mask[prices[categories]] 

Method: Get 

エンコード:

https://api.softlayer.com/rest/v3/SoftLayer_Product_Package/240/getItems.json?objectFilter=%7B%22items%22%3A%7B%22prices%22%3A%7B%22locationGroupId%22%3A%7B%22operation%22%3A%22is+null%22%7D%7D%7D%7D&objectMask=mask%5Bprices%5Bcategories%5D%5D 

Method: Get 

参考文献:

+0

うーん、。カテゴリの種類を示す価格JSONスタンザには何も表示されません。カテゴリは、4000_GB_PERFORMANCE_STORAGE_SPACE keyNameおよびitemCategoryスタンザの上位オブジェクトにあるようです。 –

+0

あなたが見ているカテゴリはアイテムからのものです、あなたは価格のためにこれらを取得する必要があります、私が提供した要求をお試しください –

関連する問題