0

I have the following JSON that I'm using to order storage. I believe the json to be valid but I receive the following error

"error":"Internal Error","code":"SoftLayer_Exception_Public"}

Here is the json I am using:

{
"parameters" : [
{
    "location" : 1441195,
    "packageId" : 759,
    "osFormatType" : {
    "id" : 12,
    "keyName" : "LINUX"
},
"complexType" : "SoftLayer_Container_Product_Order_Network_Storage_AsAService",
"volumeSize" : "100",
"iops" : 100,
"useHourlyPricing" : true,
"quantity" : 1,
"prices" : [
{
    "item" : {
        "description" : "Storage as a serivce"
    },
    "id" : "189439"
    },

{
"item" : {
    "description" : ": FILE_STORAGE"
    },
    "id" : "189459"
},
{
"item" : {
    "description" : ": 100 GB Storage Space"
    },
    "id" : "190899"
},
{
"item" : {
    "description" : ": 100_6000_IOPS"
    },
    "id" : "189939"
} ]
} ]
}

The rest call I'm making is the following (whereby I save the json to the test.json file) :

curl -X POST --data "@test.json" -u user:apikey https://api.softlayer.com/rest/v3/SoftLayer_Product_Order/verifyOrder.json

2 Answers2

0

You can see the content as follows.

python - How can we order "Storage As A Service (StaaS)"? - Stack Overflow : How can we order "Storage As A Service (StaaS)"?

kyouhei
  • 54
  • 1
  • 1
  • 6
  • After reviewing the above it is still not apparent with what is wrong with the JSON above in which I'm ordering performance storage (not endurance with IOPS per GB pricing). Do you see a problem with the JSON above when passing it via a REST api? Usually if there is an error in the JSON a proper error code is returned - but in this case as I mentioned the following is returned: "error":"Internal Error","code":"SoftLayer_Exception_Public"} – Andrew Hilden Feb 20 '18 at 21:30
0

This is my order container with no errors. I guess your performance storage price id should be changed to "100 - 499 GBs performance_storage_space".

{
            "complexType":"SoftLayer_Container_Product_Order_Network_Storage_AsAService",
    "volumeSize": 20, # 20, 40, 80, 100, 250, 500, 1000, ..., 12000
    "quantity": 1,
    "iops": 1000,
            "osFormatType":{  
                "keyName":"LINUX",
                "id":12,
        "complexType": "SoftLayer_Network_Storage_Iscsi_OS_Type"
            },
            'location': 449604, # Tokyo
            'packageId': 759,  # Storage As A Service (StaaS)
            'prices': [
                    {'id':189433},  # Storage As A Service
                    {'id':189453},  # File storage
                    {'id':189483},  # 20 - 39 GBs performance_storage_space
                    {'id':189543}  # 100 - 1000 IOPS performance_storage_iops
            ],      
    }
kyouhei
  • 54
  • 1
  • 1
  • 6