APIs & Integrations

MKrizaj
Member

Get all associated files for a user

Hi all, 

 

Lately, I noticed that the following endpoint doesn't return all attachments for a specific user. In Hubpost UI I can see 5 files attached to user, but when looping through results, while HasMore attribute is true, I only get one file. Has something changed recently or if I am missing something? It was all working fine before.

 

https://api.hubapi.com/engagements/v1/engagements/associated/{$object_type}/{$object_id}/paged

Thanks,
Matic

0 Upvotes
5 Replies 5
MKrizaj
Member

Get all associated files for a user

@Jaycee_Lewis Have you had time to look into this issue described above?

 

Thanks,
Matic

0 Upvotes
Jaycee_Lewis
Community Manager
Community Manager

Get all associated files for a user

Hey, @MKrizaj To clarify, is this the endpoint you are using? Get Associated Engagements. If not, can you link me to the page the endpoint is listed on, please? I want to make sure I'm looking at the same resource you are. 

 

Thank you! — Jaycee

linkedin

Jaycee Lewis

Developer Community Manager

Community | HubSpot

0 Upvotes
MKrizaj
Member

Get all associated files for a user

Hey @Jaycee_Lewis 

 

Yes, correct. I am using Get Associated Engagements endpoint. For object_type I am using contact and user_id as a parameter.

 

Thanks,
Matic 

0 Upvotes
Jaycee_Lewis
Community Manager
Community Manager

Get all associated files for a user

Hey, @MKrizaj 👋 Thanks for reaching out. Can you grab a screenshot of a record with multiple files and add your request and response bode here, please? This helps the community understand root issues as well as test and try to reproduce the issue.

 

Best,

Jaycee

linkedin

Jaycee Lewis

Developer Community Manager

Community | HubSpot

0 Upvotes
MKrizaj
Member

Get all associated files for a user

Hi @Jaycee_Lewis 

 

Below you can find a screenshot of user attachments with multiple files. This is the URL of our request. 

URL: https://api.hubapi.com/engagements/v1/engagements/associated/contact/$user_id/paged

 

The problem is that the attachments array is empty for engagement which should show one of those files. 

You can find the response body here: https://pastebin.com/XbdHpwBr

The only file that is returned is sample.pdf which I uploaded manually for testing. 

attachements.png

 

I hope this makes it clear now.

 

Thanks,
Matic

0 Upvotes