我如何使用 Account_Partner_Business api
How do I use the Account_Partner_Business api
我正在尝试使用这个 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 调用的正确参数是什么?如何找到它?
谢谢。
首先,你需要用到这个方法:
休息请求:https://$user:$apiKey@api.softlayer.com/rest/v3/SoftLayer_Account/getBusinessPartner
用您自己的凭据替换:$user 和 $apiKey
它将return一个响应,id 属性应该被用来调用SoftLayer_Account_Partner_Business::getObject
休息要求:
http://sldn.softlayer.com/reference/services/SoftLayer_Account_Partner_Business/12345/getObject
注:12345是上面回复的id
我正在尝试使用这个 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 调用的正确参数是什么?如何找到它?
谢谢。
首先,你需要用到这个方法:
休息请求:https://$user:$apiKey@api.softlayer.com/rest/v3/SoftLayer_Account/getBusinessPartner
用您自己的凭据替换:$user 和 $apiKey
它将return一个响应,id 属性应该被用来调用SoftLayer_Account_Partner_Business::getObject
休息要求:
http://sldn.softlayer.com/reference/services/SoftLayer_Account_Partner_Business/12345/getObject
注:12345是上面回复的id