如何使用 Softlayer REST API 订购子网?

How to order a subnet using Softlayer REST API?

我知道如何使用 Python 和 Java 客户端,但我需要使用 REST 客户端,因为合适的特定语言客户端 (Java) 缺少功能(过滤,api url 根设置用于测试)。

如何使用 REST 实现? 我尝试使用这个 json 文件作为负载:

{
"packageId": 0,
"prices": [{"id":13981}],
"quantity": 1,
"complexType": "SoftLayer_Container_Product_Order_Network_Subnet",
"endPointVlanId": 1366867}

然后请求失败,没有太多关于错误的提示:

curl -X POST -d @data.json https://user:key@api.softlayer.com/rest/v3.1/SoftLayer_Product_Order/placeOrder 

{"error":"An internal system error has occurred.","code":"SoftLayer_Exception_InternalError"}

请参阅 https://sldn.softlayer.com/es/blog/bpotter/more-softlayer-rest-api-examples 使用 rest 负载应该在一个名为 "parameters" 的属性中,所以 ti 应该是

{
    "parameters": [

        {
            "packageId": 0,
            "prices": [{
                "id": 13981
            }],
            "quantity": 1,
            "complexType": "SoftLayer_Container_Product_Order_Network_Subnet",
            "endPointVlanId": 1366867
        }
    ]
}