我正在考虑使用https://api.softlayer.com/rest/v3/SoftLayer_Billing_Item_Cancellation_Request/getAllCancellationRequests
我在每个请求中都看到,fullQualifiedDomainName位于attachmentHardware或attachedVirtualGuests中。 如何为这种类型的检索编写objectFilter代码?
答案 0 :(得分:0)
很遗憾,您现在可以使用 fullyQualifiedDomainName 进行过滤,您可以使用主机名和域属性。
尝试使用以下REST请求检索所需的数据:
对于附件硬件
选项1:
https://api.softlayer.com/rest/v3/SoftLayer_Billing_Item_Cancellation_Request/getAllCancellationRequests?objectMask=mask[items[billingItem],ticket[attachedHardwareCount,attachedHardware]]&objectFilter={"ticket":{"attachedHardware":{"domain":{"operation":"domain.com"},"hostname":{"operation":"exampleName"}}}}
选项2:
https://api.softlayer.com/rest/v3/SoftLayer_Billing_Item_Cancellation_Request/getAllCancellationRequests?objectMask=mask[items[billingItem],ticket[attachedHardwareCount,attachedHardware]]&objectFilter={"items":{"billingItem":{"domainName":{"operation":"domain.com"},"hostName":{"operation":"exampleName"}}},"ticket":{"attachedHardware":{"hostname":{"operation":"exampleName"}}}}
对于AttachVirtualGuests
选项1:
https://api.softlayer.com/rest/v3/SoftLayer_Billing_Item_Cancellation_Request/getAllCancellationRequests?objectMask=mask[items[billingItem],ticket[attachedVirtualGuestsCount,attachedVirtualGuests]]&objectFilter={"ticket":{"attachedVirtualGuests":{"domain":{"operation":"domain.com"},"hostname":{"operation":"exampleName"}}}}
选项2:
https://api.softlayer.com/rest/v3/SoftLayer_Billing_Item_Cancellation_Request/getAllCancellationRequests?objectMask=mask[items[billingItem],ticket[attachedVirtualGuestsCount,attachedVirtualGuests]]&objectFilter={"items":{"billingItem":{"domainName":{"operation":"domain.com"},"hostName":{"operation":"exampleName"}}},"ticket":{"attachedVirtualGuests":{"hostname":{"operation":"exampleName"}}}}
我希望这对你有所帮助。