Search code examples
apiibm-cloud-infrastructureobject-storage

(Softlayer api)How to get endpoints from object storage in softlayer?


How can I get connection information of clusters in softlayer? I need public and private authentication urls for all clusters.

It seems that softlayer doesn't support the /v1/endpoints api of open stack api.

And I can see the getObjectStorageConnectionInformation api in Network Storage.. But don't know how to use it.


Solution

  • Try to use the following method: SoftLayer_Network_Storage::getObjectStorageConnectionInformation, it will display the information of clusters and their endpoints (public and private)

    To use this method, you need to provide an Object Storage's identifier, you can retrieve these identifiers (Object Storage identifiers), with the following REST request:

    https://$username:$apiKey@api.softlayer.com/rest/v3/SoftLayer_Account/getHubNetworkStorage
    
    Method: Get
    

    Note: Replace $username and $apiKey with your own information.

    You will retrieve a result like this:

    {
    "accountId": 123456
    "capacityGb": 5000
    "createDate": "2015-01-20T16:21:02-04:00"
    "guestId": null
    "hardwareId": null
    "hostId": null
    "id": 41111111
    "nasType": "HUB"
    "password": ""
    "serviceProviderId": 1
    "storageTypeId": "15"
    "upgradableFlag": true
    "username": "SLOS123456-10"
    ...
    

    Then, you can get object storage connection with the following Rest request (Use the "id" value from the previous request)

    https://$username:$apiKey@api.softlayer.com/rest/v3/SoftLayer_Network_Storage/41111111/getObjectStorageConnectionInformation
    
    Method: Get
    

    Note: Replace $username, $apiKey and 41111111 value with your own information

    Some important references:

    I'm using Advanced REST client for Chrome