Max
Max

Reputation: 67

How to access the API using a BAP/Agent account?

For instance, if you want to use the "SoftLayer_Brand" API, and make a call to "SoftLayer_Brand::getAllOwnedAccounts", I would assume that you could do that as long as you have a BAP/Agent account?

But I can't find any place that lists the API key needed to make the API calls, like the one you find once logged into one of the accounts in the normal Customer Portal.

Basically what I'm trying to achive, is to be able to list (for example) all hardware our customers have in their SoftLayer accounts, or pull out invoices across all accounts, but just can't find where the API key is listed for my BAP/Agent account.

Or am I thinking about this the wrong way?

Upvotes: 0

Views: 259

Answers (1)

and make a call to "SoftLayer_Brand::getAllOwnedAccounts", I would assume that you could do that as long as you have a BAP/Agent account?

Yep that is rigth you need to have a BAP/Agent account

But I can't find any place that lists the API key needed to make the API calls

to list the API keys you need to impersonate to that account and call the http://sldn.softlayer.com/reference/services/softlayer_user_customer/getapiauthenticationkeys. the impersonation only can be done using SOAP request see this for an example Impersonating another user in SoftLayer

Once you have the API key for the user you can list all the hardware mashcines or invoices for the account

Upvotes: 1

Related Questions