Search code examples
ibm-cloud-infrastructure

How to know id of the ordered block storage device


Hi i have ordered block storage device on softlayer, using place order method. I want to know name and id of ordered device. How can to know it . place order method doesnt return id or name in response. I need id to call some othrr methods on softlayer


Solution

  • After placing an order a SoftLayer_Container_Product_Order_Receipt object is created which doesn’t contain the Block Storage ID, instead it contains an orderId which can be used to check if the order has been approved. This can be used to verify the order status:

    http://$username:$apiKey@api.softlayer.com/rest/v3/SoftLayer_Billing_Order/$orderId/getObject.json
    
    Method: GET
    

    Once the status of the order is “APPROVED” then there’s an id available for the Block Storage.

    You could use this objectFilter using the orderId to retrieve the Block Storage.

    http://$username:$apiKey@api.softlayer.com/rest/v3/SoftLayer_Account/getIscsiNetworkStorage.json?objectMask=mask[billingItem[orderItem[order]]]&objectFilter={"iscsiNetworkStorage":{"billingItem":{"orderItem":{"order":{"id":{"operation":$orderId}}}}}}
    
    Method: GET
    

    The next links provide further information: http://sldn.softlayer.com/reference/services/SoftLayer_Product_Order/placeOrder http://sldn.softlayer.com/reference/datatypes/SoftLayer_Container_Product_Order_Receipt