I'm trying to retrieve the private default gateway and subnet mask through the SoftLayer API. I can see this information at control.softlayer.com but I'd like to retrieve it through the API. I have tried all the network related methods in the SoftLayer_Virtual_Guest service but haven't been able to find this information. What method should I be using?
0
votes
1 Answers
0
votes
You can try the following Rest request:
https://$user:[email protected]/rest/v3/SoftLayer_Virtual_Guest/$vsiId/getBackendNetworkComponents?objectMask=mask[primarySubnet[gateway,netmask]]
Method: Get
Replace: $user, $apiKey and $vsiId with your own information
Note: Just in case, if you wish to get the same information for public network, you should use getFrontendNetworkComponents instead of getBackendNetworkComponents in the request
References: