Softlayer REST API for tagging machines

陌路散爱 提交于 2019-12-12 04:39:59

问题


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:


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


来源:https://stackoverflow.com/questions/45583529/softlayer-rest-api-for-tagging-machines

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!