ObjectFilter in SoftLayer doesn't work

前端 未结 2 1215
感动是毒
感动是毒 2021-01-23 15:46

I find ObjectFilter doesn\'t work in SoftLayer.

I even tried the example provided in the SoftLayer webpage here:

https://sldn.softlayer.com/article/object-filter

相关标签:
2条回答
  • 2021-01-23 16:27

    Maybe you can try adding virtualGuestsin the filter, something like this:

    objectFilter={ "virtualGuests": { "datacenter": { "longName": { "operation": "Dallas 6" } } } }
    

    or please see the first examples of https://sldn.softlayer.com/article/object-filters, like this:

    object_filter = {
        'virtualGuests': {
            'datacenter': {
                'name': {'operation': 'dal05'}
            }
        }
    }
    
    0 讨论(0)
  • 2021-01-23 16:46

    try this request:

    GET https://api.softlayer.com/rest/v3/SoftLayer_Account/getVirtualGuests?objectMask=mask[id,hostname,datacenter]&objectFilter={"virtualGuests":{"datacenter":{"name":{"operation":"dal05"}}}}
    

    The issue with your request is that you are missing the "virtualGuests" property, keep in mind that the objectFilter is filtering over the data in the database, so you need to tell it over what table work and over what record of the table work. e.g. using the "SoftLayer_Account" that implies that all the work will be over the "SoftLayer_Account" table now you need to tell id over what property/record of that table work in this case you need to work over the "virtualGuests" and so on. Please keep in mind that and you review the documentation about the valid properties/records e.g. these are the valid properties/record for Softlayer_Account:

    http://sldn.softlayer.com/reference/datatypes/SoftLayer_Account

    Regards

    0 讨论(0)
提交回复
热议问题