0
votes

Is there a way to get Softlayer image publisher's information instead of account id by imageid? I noticed the API: "https://[username]:[apikey]@api.softlayer.com/rest/v3/SoftLayer_Virtual_Guest/guestId/createArchiveTransaction" to capture image from an instance doesn't require publisher's information as post parameter. Does this mean Softlayer doesn't record publisher's information?

1

1 Answers

0
votes

A SoftLayer_Virtual_Guest_Block_Device_Template_Group datatype has a local property related to the publisher (userRecordId in this case).

You can use the following rest API call to retrieve the userRecordId:

Method: GET

https://[username]:[apikey]@api.softlayer.com/rest/v3/SoftLayer_Virtual_Guest_Block_Device_Template_Group/[imageId]/getObject

You will get a response like this:

    {
    "accountId": 12345,
    "createDate": "2018-11-05T10:04:11-04:00",
    "id": 123456,
    "name": "TEST",
    "note": "Only for testing",
    "parentId": null,
    "publicFlag": 0,
    "statusId": 1,
    "transactionId": null,
    "userRecordId": 1234567,
    "globalIdentifier": "globalId"
    }

Then, using the userRecordId retrieved, you can use the following rest API call to retrieve the User information:

Method: GET

https://[username]:[apikey]@api.softlayer.com/rest/v3/SoftLayer_User_Customer/[userRecordId]/getObject