How to get attachments from all sources

Hi everyone, in our app, we allow users to download all attachments from tasks in a project.

But, we would like to offer to download all attachments in a project, including attachments in discussions / messages, and maybe some other sources if available.

I did not find any api endpoint to get attachments for project, or messages.

Is it possible to get them somewhere?

Thank you!