0
votes

After placing order for a storage in softlayer, I need to get that storage id for a particular order id.The api call i am using, is giving me a list of storage ID. But, if user orders for a storage, only one storage id the user should get right. So, the api is not properly filtering and not getting a particularly storage id for a particular order id . The rest api, i am using is given below and please tell me what should be the proper filtering , "https://[username]:[apikey]@api.softlayer.com/rest/v3/SoftLayer_Account/getIscsiNetworkStorage.json?objectFilter={"networkStorage": {"billingItem": {"nasType": { "operation": "ISCSI"}, "orderItem": {"order": {"id":{"operation":"[orderID]"}}}}}} "

This api is provided by softlayer team

Regards, Debartha

1
the rest api is working fine, but sometimes rest api is giving no response, so storage id coming undefined for that. Its happening irregularly not continuously. For example, storage size 100 & IOPS size 100 for performance storage ordering, the response is null, but not for everytime, FOr endurance also sometimes its coming null response. - Dave
Please, help me out here. - Dave
For your testing , i am providing the order id, 9653341 - Dave
this rest api i used for performance storage order, storage size i chose 100 and iops size is 1500 - Dave
but the response was nothing - Dave

1 Answers

0
votes

use this request:

    GET https://api.softlayer.com/rest/v3/SoftLayer_Account/getIscsiNetworkStorage?objectMask=mask[billingItem[orderItem[order]]]&objectFilter={"iscsiNetworkStorage": {"billingItem": { "orderItem": {"order": {"id":{"operation":5208963}}}}}}

note: replace 5208963, with your orderID

Basically all the devices must have a billingItem and that billingItem should have orderItem.order.id property, so you can use this filter to get any device using the orderID property, you just to need to make sure that the "iscsiNetworkStorage" value, in the filter, has the same name as the method you are calling (in this case getIscsiNetworkStorage method ), but without the pre-fix "get" and it must start with lower case e.g.

getIscsiNetworkStorage -> iscsiNetworkStorage

Regards