1

I am trying to create a script for subnets assignment using Softlayer API.

In the Softlayer documentation i saw some templates are needed for the request:

SoftLayer_Network_Service_Vpn_Overrides::createObjects

templateObjects SoftLayer_Network_Service_Vpn_Overrides An array of SoftLayer_Network_Service_Vpn_Overrides objects that you wish to create.

SoftLayer_Network_Service_Vpn_Overrides::deleteObjects

templateObjects SoftLayer_Network_Service_Vpn_Overrides An array of skeleton SoftLayer_Network_Service_Vpn_Overrides objects that you wish to delete. Each object in the array must have at least their id properties defined.

Can somebody with more experience give me structure of those templates.

Thank you.

  • Welcome to Stack Overflow! To give you a great answer, it might help us if you have a glance at [ask] if you haven't already. It might be also useful if you could provide a [mcve]. – Mat Aug 28 '17 at 12:50

1 Answers1

0

for createObjects this is the JSON for a REST request:

{
    "parameters": [
        [{
                "subnetId": 111,
                "userId": 22222
            },
            {
                "subnetId": 33333,
                "userId": 4444
            }
        ]
    ]
}

For deleteObjects this is the JSON for a REST request:

{
    "parameters": [
        [{
                "id": 111,
            },
            {
                "id": 33333,
            }
        ]
    ]
}

see https://sldn.softlayer.com/blog/bpotter/more-softlayer-rest-api-examples for more information about rest examples