Softlayer REST API for tagging machines

2019-09-16 06:56发布

Can someone please give me a Softlayer REST API for tagging machines that are already provisioned. I need to both for virtual machines and bare metal machines.

Thanks, Kishore

1条回答
霸刀☆藐视天下
2楼-- · 2019-09-16 07:34

Virtual Machine

https://$user:$apiKey@api.softlayer.com/rest/v3/SoftLayer_Tag/setTags
Method: Post

{  
   "parameters":[  
      "tag1,tag2",
      "GUEST",
      29756959
   ]
}

replace 29756959 with the ID of your virtual machine

Bare metal

https://$user:$apiKey@api.softlayer.com/rest/v3/SoftLayer_Tag/setTags

Method: Post

{  
   "parameters":[  
      "tag1,tag2",
      "HARDWARE",
      29756959
   ]
}

replace 29756959 with the ID of your bare metal
查看更多
登录 后发表回答