If I have Softlayer master brand account's api username and key, how can I get get all of its customers own api username and key?

扶醉桌前 提交于 2019-12-12 03:53:32

问题


So I have master brand's API username and key, so I can user the SoftLayer_Account API to get a list of accounts it owns (i.e. the customers). With the account ID of these customer accounts, I would think that I should be able to get its own users and get their API username and key, but I don't see a way. How do I get my customer account's API username and key by using SoftLayer APIs?

I've tried using SoftLayer_Account::getUsers() but it always gives this master user info and not the customer account's users. And I don't see any other APIs that I can use. Please help.

Basically what I want to do is to get a list of all billing items that are associated with all the accounts that are under this master brand account.


回答1:


Unfortunately it's not possible to retrieve the api keys through API from accounts(users) which belongs to your brand. but you can retrieve the billing items from each account using the below request:

https://$user:$apiKeyapi.softlayer.com/rest/v3/SoftLayer_Brand/$brandId/getOwnedAccounts?objectMask=mask[masterUser[username,apiAuthenticationKeys],allBillingItems]

Method: Get

Replace: $user, $apiKey and $brandId with your own information.

References:

  • SoftLayer_Brand::getOwnedAccounts


来源:https://stackoverflow.com/questions/44115375/if-i-have-softlayer-master-brand-accounts-api-username-and-key-how-can-i-get-g

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!