SugarCRM:如何通过 REST API 获取帐户的所有联系人

问题描述:

我正在尝试使用 v2 REST API 从 SugarCRM 获取特定帐户(我知道帐户 ID)的所有联系人.

I am trying to get all contacts for a particular account (i know the account id) from SugarCRM using the v2 REST API.

我正在发送带有以下参数的 GET 请求:

I am sending a GET request with the following parameters:

input_type => 'JSON'

response_type => 'JSON'

method => 'get_entry_list'

rest_data => '{session:"some-valid-session-id", module_name:"Contacts", query:"contacts.account_id=some-valid-id"}'

我希望获得与此帐户相关的所有联系人,但我收到错误... MySQL 错误 1054:'where 子句'中的未知列'contacts.account_id'"

I expect to get all contacts that are related to this accoutn, but instead I get an error "... MySQL error 1054: Unknown column 'contacts.account_id' in 'where clause'"

但是,当我尝试在不提供任何查询 (query='') 的情况下获取所有联系人时,我会获取所有联系人及其所有属性,并且可以看到存在 account_id 属性.

However, when I try to get all contacts without providing any query (query='') I get all the contacts with all their properties and I can see that there is an account_id property.

有人可以帮忙吗?

尝试 query:"accounts.id=some-valid-id".

过去使用 SOAP API 对我有用.

It has worked for me in the past with the SOAP API.