Take a look the category for the price:
Price: 46296 Description: "300 GB Storage Space" Category:
"storage_snapshot_space"
It means that this storage item is only available for Snapshot, in this case you need to use a item with "Storage Space" (categoryCode: performance_storage_space) as category, you can try the following REST request to get available Storage Space:
https:/$user:$apiKey@api.softlayer.com/rest/v3/SoftLayer_Product_Package/240/getItemPrices?objectFilter={"itemPrices":{"categories":{"categoryCode":{"operation":"performance_storage_space"}},"locationGroupId":{"operation":"is null"}}}&objectMask=mask[categories]
Method: Get
Replace: $user and $apiKey with your own information.
Here some good forums references related to this:
Updated
If you would like to order a File Storage - Endurance, you need to use this container:
SoftLayer_Container_Product_Order_Network_Storage_Enterprise
Regarding to use: endurance_storage_space for getting the Storage Space for Endurance, that category doesn't exists, that's the reason why are you getting an empty response, you need to use: performance_storage_space which is valid for Endurance and Performance.
Another thing to keep in mind, for File Storage - Endurance, it's not necessary to set "osFormatType"
So, with the priceId: 45124, you template should looks like this (Try this please):
https://$user:$apiKey@api.softlayer.com/rest/v3/SoftLayer_Product_Order/verifyOrder
Method: Post
{
"parameters":
[
{
"packageId": 240,
"location": 449494,
"complexType": "SoftLayer_Container_Product_Order_Network_Storage_Enterprise",
"prices":
[
{
"id": 45114
},
{
"id": 45124
},
{
"id": 45064
},
{
"id": 45074
}
],
"quantity": 1
}
]
}
Updated 2
How to retrieve Storage through orderId
The SoftLayer_Product_Order::placeOrder method returns an orderId, the Id that you mentioned (You saw in Portal) is the storageId.
Unfortunately, it's not possible that SoftLayer_Product_Order::placeOrder method returns the storageId, due to the storage should be already provisioned in order to have a storageId assigned, but you can get the storageId, username, mountAddress through orderId using the following call:
https://$user:$apiKey@api.softlayer.com/rest/v3/SoftLayer_Account/getNetworkStorage?objectFilter={"networkStorage":{"billingItem":{"orderItem":{"order":{"id":{"operation":6049481}}}}}}&objectMask=mask[fileNetworkMountAddress,allowedHardware,allowedIpAddresses,allowedSubnets,allowedVirtualGuests]
Method: Get
Replace: $user and $apiKey with your own information. Also you need to replace: 6049481 with your orderId returned for placeOrder method
Regarding to call allow storage API, I'm not sure about this, but in the request that I provided before, I added an mask to retrieve allowedVirtualGuests, hardware, ipAddresses and subnets
Or maybe you are referring to:
How to allow access from Virtual Guests through Storage
https://$user:$apiKey@api.softlayer.com/rest/v3/SoftLayer_Network_Storage/7064355/allowAccessFromVirtualGUest
Method: Post
{
"parameters":[
{
"id":29245009
}
]
}
Replace: $user and $apiKey with your own information.
Also replace: 7064355 with the storageId and 29245009 with the vsiId
Also, you can allow access for:
Hardware:
Ip Address:
Subnets:
I hope it helps, let me know if you need further assistance or any doubt
Updated 3
How to send ObjectFilter using cURL
To send an objectFilter using curl, it's necessary to encoded it, due to the special characters that it handles, as I see, there are some customers who have success using curl like this way (skipping the special characters), see the forum below:
A workaround that works fine for me and I can recommend, would be to encode the objectFilter and objectMask like this:
curl -k "https://$user:$apiKey@api.softlayer.com/rest/v3/SoftLayer_Account/getNetworkStorage?objectMask=fileNetworkMountAddress%3BallowedHardware%3BallowedIpAddresses%3BallowedSubnets%3BallowedVirtualGuests&objectFilter=%7B%22networkStorage%22%3A%7B%22billingItem%22%3A%7B%22orderItem%22%3A%7B%22order%22%3A%7B%22id%22%3A%7B%22operation%22%3A4353509%7D%7D%7D%7D%7D%7D"
You need to replace in the request: $user and $apiKey with your username and apiKey. Also you need to replace the 4353509 value with the orderId that you get in placeOrder's receipt