Search code examples
ibm-cloud-infrastructure

Softlayer API: Understanding Product_Package_Server


What exactly is the Product Package Server? Would all the Product_Package's be represented in the Product Package Server?

I want to map a location name to every possible Product_PackageID. Currently I am getting all the valid datacenter names from SoftLayer_Product_Package_Server then filtering it through this REST request:

https://$USERNAME:[email protected]/rest/v3.1/SoftLayer_Product_Package/getAllObjects?objectMask=mask[locations]&objectFilter={"locations":{"longName":{"operation":"Amsterdam 1"}}}

I want to know if I can get all my data (Location Name/ID, and Product Package ID) from just the Product Package Server REST request:

https://$USERNAME:[email protected]/rest/v3.1/SoftLayer_Product_Package_Server/getAllObjects

Thanks.


Solution

  • The SoftLayer_Product_Package_Server is a service dedicated to provide information about Servers (Bare Metal Servers), in which you can find information about package, item/price and available datacenters for each server.

    And SoftLayer_Product_Package provides all information about Servers, Virtual Servers, Load Balancers, CDN and other available services. All the information displayed in SoftLayer_Product_Package_Server exists in SoftLayer_Product_Package.

    Regarding to:

    I want to know if I can get all my data (Location NamIe/ID, and Product Package ID) from just the Product Package Server REST request:

    You can try this request:

    https://$user:[email protected]/rest/v3.1/SoftLayer_Product_Package_Server/getAllObjects?objectMask=mask[package[regions[location]]]
    
    Method: Get