I want to attach and detach portable storage from Virtual server using Rest API. I didn't find any API references related to attach and detach from portable storage.
Asked
Active
Viewed 157 times
1 Answers
1
Try to use the following examples:
Attach Portable storage
Method POST
https://username:apiKey@api.softlayer.com/rest/v3.1/SoftLayer_Virtual_Guest/[#Virtual_GuestID]/attachDiskImage
Body
{
"parameters":[
[#Image_Id]
]}
Detach Portable storage
Method POST
https://username:apiKey@api.softlayer.com/rest/v3.1/SoftLayer_Virtual_Guest/[#Virtual_GuestID]/detachDiskImage
Body
{
"parameters":[
[#Image_Id]
]}
Note: Keep in mind that you have to change the [#Virtual_GuestId] and [#Image_Id] according to the selected datacenter.

Daniel Cabero
- 316
- 1
- 4
-
Thank you for your reply. I tried the API reference provided by you. The API provided is related to Block volumes, but I require the API related to portable storage attach and detach. Please provide the same. I even tried editing the API provided by you and used it for Portable storage ID. I am getting the below-mentioned error. {"error":"Please provide a valid SoftLayer_Network_Storage object to allow access.","code":"SoftLayer_Exception_MissingParameter"}" Body : { "parameters":[{ "id": 99584837 }]} – john cruise Jun 20 '19 at 12:22
-
right, these examples are to attach and dettach block storage, I need to upgrade my response – Daniel Cabero Jun 20 '19 at 14:00