Sugarcrm Call Records Rest Api
I am trying to get the call records from my SugarCRM account using the REST API and I am using Python. There I want to obtain all the attendees but all I get is the user to whom th
Solution 1:
Strangely, the object which contains the list of "Guests" is not present in the standard GET request i.e.
https://{INSTANCE}/rest/v10/Calls/{RECORD_ID}
After doing some troubleshooting, and looking at the model in the web application itself, I found that the "Guests" field in the GUI ties back to a model property called "invitees".
Running a web request specifically referencing this field provides you with an array of records linked to the Call ID. So try running a GET request to this endpoint:
https://{INSTANCE}/rest/v10/Calls/{RECORD_ID}?fields=invitees
This should provide you with JSON akin to the below:
{"id":"ec041f60-72b1-11e7-89f0-00163ef1f82f","date_modified":"2017-08-08T12:26:47+00:00","invitees":{"records":[{"id":"cf378211-2b38-4fe5-949b-a53040717f04","date_modified":"2017-08-01T16:12:48+00:00","_acl":{"fields":{}},"_module":"Users","_link":"users"},{"id":"fe1740e6-3fa4-11e7-8fef-00163ef1f82f","date_modified":"2017-05-23T10:45:52+00:00","_acl":{"fields":{}},"_module":"Contacts","_link":"contacts"},{"id":"dcc526fc-72b1-11e7-a6dd-00163ef1f82f","date_modified":"2017-07-27T09:57:21+00:00","_acl":{"fields":{}},"_module":"Leads","_link":"leads"},{"id":"89f8a6d1-7df0-0e0b-3568-58a5bb6ecf34","date_modified":"2017-04-06T10:36:16+00:00","_acl":{"fields":{}},"_module":"Leads","_link":"leads"}],"next_offset":{"contacts":-1,"leads":-1,"users":-1}},"_acl":{"fields":{}},"contact_name":"test","_module":"Calls"}
Post a Comment for "Sugarcrm Call Records Rest Api"