restfilteribm-cloud-infrastructure

Softlayer API: Unable to apply objectFilter on Datacenters API


I am trying to filter the API: https://api.softlayer.com/rest/v3.1/SoftLayer_Location/getDatacenters?objectFilter={"datacenters":{"name":{"operation":"ams01"}}}

I am trying to filter the record for a DC: ams01.

Even after applying the above filter, all the records are getting returned.


Solution

  • Try with this

    https://api.softlayer.com/rest/v3.1/SoftLayer_Location/getDatacenters?objectFilter={"name":{"operation" : "ams01" }}
    

    sometimes not need input the type when filtering primary datatypes.

    Let me know if you have any problems/doubts.