0

I am using this request to get the credentials to the iSCSI disk 000001 for the virtual guest 000002:

GET /rest/v3.1/SoftLayer_Network_Storage_Iscsi/000001/getObject.json?objectMask=filteredMask[allowedVirtualGuests[allowedHost[credential]]]&objectFilter={"allowedVirtualGuests":{"id":000002}}

However, the result is the same as if I wouldn't apply the objectFilter part at all, resulting in the credentials for all virtual guests being returned, instead of the single one that I need.

What am I missing?

Ludvig A. Norin
  • 5,115
  • 7
  • 30
  • 34

1 Answers1

1

Try the following REST call:

GET /rest/v3.1/SoftLayer_Network_Storage_Iscsi/000001/getAllowedVirtualGuests?objectMask=mask[allowedHost[credential]]&objectFilter={"allowedVirtualGuests":{"id":{"operation":000002}}}

You can use object-filters when the method returns a list of objects, getObject returns only one which is the SoftLayer_Network_Storage_Iscsi itself, on the other hand the method getAllowedVirtualGuests returns a list of virtual guests.

I recommend to review the following links to know more about this:

http://sldn.softlayer.com/reference/services/softlayer_network_storage_iscsi/getallowedvirtualguests

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

How to use object filter with softlayer rest api?

Albert Camacho
  • 1,129
  • 1
  • 7
  • 13