我如何使用Account_Partner_Business api

时间:2017-10-11 21:17:45

标签: ibm-cloud-infrastructure

我正在尝试使用此API:http://sldn.softlayer.com/reference/services/SoftLayer_Account_Partner_Business/getObject

任何调用都会导致

SoftLayer.exceptions.SoftLayerAPIError: SoftLayerAPIError(SoftLayer_Exception): Object does not exist to execute method on. (SoftLayer_Account_Partner_Business::getObject)

我假设

表示我需要一个输入参数,尽管API文档在这方面并不明确。

如果我传入了使用此API验证的帐户ID:http://sldn.softlayer.com/reference/services/softlayer_account/getObject

我得到了这个结果:

SoftLayer.exceptions.SoftLayerAPIError: SoftLayerAPIError(SoftLayer_Exception_ObjectNotFound): Unable to find object with id of '1314767'.

Account_Partner_Business / getObject调用的正确参数是什么?如何找到它?

感谢。

1 个答案:

答案 0 :(得分:1)

首先,您需要使用此方法:

休息请求:Array ( [0] => google-analytics-for-wordpress/googleanalytics.php [1] => nggtags-for-wp-media-library/nggtags-for-wp-media-library-loader.php [2] => wordpress-seo/wp-seo.php )

使用您自己的凭据替换 $ user $ apiKey

它将返回一个响应,应该使用id属性来调用SoftLayer_Account_Partner_Business::getObject

休息请求:

https://$user:$apiKey@api.softlayer.com/rest/v3/SoftLayer_Account/getBusinessPartner

注意: 12345 是上述回复中的ID