Skip to main content
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)
5 answers
  1. Jun 8, 2020, 2:58 PM
    You can use the REST API

     to retrieve the attachments. Use workbench or postman and do a GET to the following URL

    https://your_instance/services/data/v43.0/query?q=select id, LinkedEntityId,ContentDocumentId from ContentDocumentLink where LinkedEntityId = '003xxxxxxxxxx'

    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
0/9000