0

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

The Id which you have shared is CONTENTDOCUMENT

So your request will be

/services/data/v39.0/sobjects/ContentDocument/069290000002n2kxxx

ContentDocument API

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.