Softlayer API 用于过滤冗余电源

Softlayer API for filtering Redundant Power Supply

对于包 id 271,如果我 select 这个包,那么它只给我一个冗余电源选项:

1) 冗余电源 [$7.25]

如果我 select 包 ID 为 1051 那么它会为我提供两个冗余电源选项

1)None-无需电源 2)冗余电源[$7.25]

我希望 API 筛选何时显示 2 个选项以及何时仅显示一个冗余电源选项的包。

检查是否需要通过包configuration供电,不需要时门户页面显示两个选项。

下面的调用可以帮助您取回那些需要电源的包裹

https://api.softlayer.com/rest/v3/SoftLayer_Product_Package/getAllObjects?objectFilter={"configuration":{"itemCategoryId":{"operation":35},"isRequired":{"operation":1}}}&objectMask=mask[id,configuration]

并且此调用列出了所有不需要它的包:

https://api.softlayer.com/rest/v3/SoftLayer_Product_Package/getAllObjects?objectFilter={"configuration":{"itemCategoryId":{"operation":35},"isRequired":{"operation":0}}}&objectMask=mask[id,configuration]