I'm trying to get attachments of type file from custom object through salesforce Rest API(outside of salesforce) but i'm not able fetch the file.

This is the file i'm trying to get

Getting below error

    "errorCode": "NOT_FOUND",
    "message": "The requested resource does not exist"

URL's i tried:

http://myinstance/services/data/v41.0/sobjects/Document/069290000002n2kxxx/body/ http://myinstance/services/data/v41.0/sobjects/Attachment/069290000002n2kxxx/body/ http://myinstance/services/data/v41.0/sobjects/SalesforceFiles/069290000002n2kxxx/body/

1 Answer 1


The Id which you have shared is CONTENTDOCUMENT

So your request will be


ContentDocument API


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .