-
-
Save underscorephil/9956790 to your computer and use it in GitHub Desktop.
I had moderate success with this call:
curl -X POST --data @tags.json "https://api.softlayer.com/rest/v3/SoftLayer_Virtual_Guest/3919126/setTags"
and this tags.json (note the correction to the array definition):
{
"parameters":[
"tag1",
"tag2",
"tag3"
]
}
The result was that the first tag appeared in the portal, but not tag2/tag3
In order for the additional tags to work, the initial value needs to be comma separated with no double quote breaks between them. I was able to get this example to work:
{
"parameters":["tag1,tag2,tag3"]
}
It is important to note that the tags are replaced and not appended to so it would be a good idea to get the existing tags before you update them.
I cannot get multiple tags to work, only one.
I've tried every variant shown on this page, but I never see more than one tag in the instance data.
Any help valued!!
I attempted to run this command with the tags.json file and found that it didn't work as expected. Are you sure the parameters to the curl command are set properly? Based on the values passed in as arguments it would appear that -D would be better as a -d but then I get a separate error on the call. Can you please clarify if the setTags call should be GET or POST and which arguments are expected?