1

I am new to softlayer. We need to have all the performance storages for a user so that by selecting any of these we can get corresponding Virtual Machine Id for authorizing with storage. Please help me as I am struggling in same for last 4-5 days. Thanks in advance.

Ravi Dutt
  • 135
  • 2
  • 4
  • 16

1 Answers1

1

Please, try the following Rest request:

https://[username]:[apikey]@api.softlayer.com/rest/v3/SoftLayer_Account/getNetworkStorage?objectMask=mask[id,username,nasType,storageType, allowedVirtualGuests,billingItem[orderItem[id,order[id,userRecord.username]],description,location[id,longName]]]&objectFilter={   "networkStorage": {     "nasType": {       "operation": "ISCSI"     },     "billingItem": {       "description": {         "operation": "Block Storage (Performance)"       },       "orderItem": {         "order": {           "userRecord": {             "username": {               "operation": "myUsername"             }           }         }       }     }   } }

Method: GET

Where: This request will help you to get ”Network Storage” items filtered by type (Block Storage (Performance)) and ”username”. Also to get valid available virtual guests to authorize, ”allowedVirtualGuests”property was added in the object mask.

Some references:

SoftLayer_Account::getNetworkStorage

API for Performance and Endurance storage(Block storage)

Update 1:

The above request allows you to apply several filters according what you want. You only need to add/remove the filters according to your needs. If you need associated storage volumes only by filtering “user”, some filters should be removed to the previous request, for example:

https://[username]:[apikey]@api.softlayer.com/rest/v3/SoftLayer_Account/getNetworkStorage?objectMask=mask[id,username,nasType,storageType, billingItem[orderItem[id,order[id,userRecord.username]],description,location[id,longName]]]&objectFilter={   "networkStorage": {     "billingItem": {       "orderItem": {         "order": {           "userRecord": {             "username": {               "operation": "myUsername"             }           }         }       }     }   } }

Method: GET

Notice that all associated storage volumes are a set of: File Storage, Block storage, Object Storage, Evault Backup. If you want to a specific Storage type, you can add an additional filter.

Additionally, if you want only list “Block Storage” items filtered by user, you can use other method too:

https://[username]:[apikey]@api.softlayer.com/rest/v3/SoftLayer_Account/getIscsiNetworkStorage?objectFilter={   "iscsiNetworkStorage": {     "billingItem": {       "orderItem": {         "order": {           "userRecord": {             "username": {               "operation": "myUserName"             }           }         }       }     }   } }       

Method: GET

List “Filke Storage” items filtered by user:

https://[username]:[apikey]@api.softlayer.com/rest/v3/SoftLayer_Account/getNasNetworkStorage?objectFilter={   "nasNetworkStorage": {     "billingItem": {       "orderItem": {         "order": {           "userRecord": {             "username": {               "operation": "myUserName"             }           }         }       }     }   } }

Method: GET

References:

SoftLayer_Account::getIscsiNetworkStorage
SoftLayer_Account::getNasNetworkStorage

Community
  • 1
  • 1
mcruz
  • 1,534
  • 2
  • 11
  • 14
  • I added some requests can help you. But, the first request I sent you previously should the basis to get the all `storage volumes` filtered per `user`. – mcruz Mar 08 '16 at 17:53