You need to sign in to do that
Don't have an account?

fetch files through rest API
Hi All,
I am new to Salesforce and looking at the documentation. My basic use case is that i have Salesforce out of the box with no customization. I basically have some files uploaded as attachments and i basicaly want my platform (outside of saleforce) to retreive the files.
Is there an API for the same which we can just implement to fetch the files? (FYI i am using lightning platform)
I am new to Salesforce and looking at the documentation. My basic use case is that i have Salesforce out of the box with no customization. I basically have some files uploaded as attachments and i basicaly want my platform (outside of saleforce) to retreive the files.
Is there an API for the same which we can just implement to fetch the files? (FYI i am using lightning platform)
ContentDocumentId field in ContentDocumentLink stores the file references associated with the parent entity. ContentDocument stores the file relationships & references, while ContentVersion object stores the versions and the file-content references
Anudeep
All Answers
You might find the Working with Salesforce Files
(https://developer.salesforce.com/docs/atlas.en-us.chatterapi.meta/chatterapi/features_files.htm) documentation is useful to get the REST resource that lists the related files.
A direct SOQL query is also possible against it (https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_objects_note.htm)
and Attachment
(https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_objects_attachment.htm)
For your reference, you can try the suggestion as mentioned below,
https://salesforce.stackexchange.com/questions/72261/how-do-i-fetch-all-the-folders-in-salesforce-using-rest-api
I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.
Thanks.
ContentDocumentId field in ContentDocumentLink stores the file references associated with the parent entity. ContentDocument stores the file relationships & references, while ContentVersion object stores the versions and the file-content references
Anudeep
https://crmcog.com/how-to-call-salesforce-rest-apis/