0
votes

I wanted to get all the devices tagged with a given string using a REST API. I have tried curl -X GET -u "$user_name:$api_key" https://api.softlayer.com/rest/v3/SoftLayer_Tag/iisha7/getReferences but it didn't work. It is giving this error:

{"error":"Internal Error","code":"SoftLayer_Exception_Public"}

Does this solve my purpose? or should I use another API? If it does, what is the mistake I am doing? Please suggest.

1

1 Answers

0
votes

Try using this request:

https://api.softlayer.com/rest/v3/SoftLayer_Account/getTags?objectFilter={"tags":{"name":{"operation":"tag2"}}}&objectMask=mask[references]

Note: replace "tag2" with the name of the tag you are lokking for

Regards