Skip to content

Instantly share code, notes, and snippets.

@underscorephil
Created April 3, 2014 15:39
Show Gist options
  • Save underscorephil/9956790 to your computer and use it in GitHub Desktop.
Save underscorephil/9956790 to your computer and use it in GitHub Desktop.
{
"parameters":[
"tag1, tag2, tag3",
]
}
@rbraddes
Copy link

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

@rhodgin
Copy link

rhodgin commented Jul 21, 2014

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.

@underscorephil
Copy link
Author

@rhodgin @rbraddes: Apologies just now seeing these comments. I am looking into this. There seems to be a bug causing the API to return true even when the call fails when using setTags.

@dukedougal
Copy link

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!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment