Community
Showing results for 
Search instead for 
Do you mean 
Reply

api/Activities returning null for Contacts array

Accepted Solution Solved
Copper Contributor
Posts: 123
Country: Canada
Accepted Solution

api/Activities returning null for Contacts array

Hey I'm not sure if this part is not implemented yet but I am curious just to know that I am not misusing the API.

I'm doing a call to "api/Activities" with a $filter to get specific activities.

I need to get the contacts associated to these activities but when I look at the Activity object returned it has "contacts": null

 

In the sample it looks like "contacts" should be an array of objects with id and displayName.

I know for sure that these activities have contacts associated with them so why would that be returning null?

We have way too many contacts in our database to loop through each contact and search for the specific activities we need to display.

Any thoughts?
-Eric


Accepted Solutions
Solution
Accepted by topic author e_hoog
‎04-01-2016 11:56 AM
Employee
Posts: 236
Country: USA

Re: api/Activities returning null for Contacts array

Looks like that's the case:  currently activities and opportunities we're not returning the embedded contacts unless you GET the resource by ID.  We'll fix that...

View solution in original post


All Replies
Employee
Posts: 236
Country: USA

Re: api/Activities returning null for Contacts array

They should be - possible however that we're only returning those embedded contact when you GET a single activity by ID rather than a lot via a filter (performance).  We'll check...

Solution
Accepted by topic author e_hoog
‎04-01-2016 11:56 AM
Employee
Posts: 236
Country: USA

Re: api/Activities returning null for Contacts array

Looks like that's the case:  currently activities and opportunities we're not returning the embedded contacts unless you GET the resource by ID.  We'll fix that...

Copper Contributor
Posts: 123
Country: Canada

Re: api/Activities returning null for Contacts array

Ok great! I had a feeling that would be the case but I just wanted to make sure.

I'll try another way in the meantime.  Thanks for your quick response.

I love what you guys are doing with this great work!

-Eric