来自 GetConfiguration 的响应没有 return ItemCategory 信息

Response from GetConfiguration does not return ItemCategory information

我正在使用的 api 调用是:https://api.softlayer.com/rest/v3/SoftLayer_Product_Package/257/getConfiguration 此调用中的 return 类型是 Product_Package_Order_Configuration 的数组: https://github.com/softlayer/softlayer-go/blob/master/datatypes/product.go#L1413

我看到的问题是,在响应中,ItemCategory 字段始终为 nil。我没有戴口罩,所以我认为一切都应该 returned。

有什么方法可以修改此调用以使其也具有 return ItemCategory 吗?

itemCategory 是关系型 属性,它属于另一种数据类型,因此如果要检索此数据,则需要在 getConfiguration 方法上使用对象掩码。

有关详细信息,您可以查看以下文档:

https://softlayer.github.io/reference/datatypes/SoftLayer_Product_Package_Order_Configuration/

您可以使用此休息 api 来获取项目类别:

方法:获取

https://[username]:[apiKey]@api.softlayer.com/rest/v3/SoftLayer_Product_Package/257/getConfiguration?objectMask=mask[itemCategory]

另一种获取类别的方法是通过同一服务的 "getCategories" 方法。

您可以使用以下休息api:

方法:获取

https://[username]:[apiKey]@api.softlayer.com/rest/v3/SoftLayer_Product_Package/257/getCategories

参考:

https://softlayer.github.io/reference/services/SoftLayer_Product_Package/getCategories/