Newer Version Available

This content describes an older version of this product. View Latest

Retrieve Blob Data

Use the sObject Blob Retrieve resource to retrieve blob data for a given record. To retrieve blob data, a record with blob data must already exist in Salesforce.

Only certain standard objects have blob fields, such as Attachment, ContentDocument, ContentNote, Document, Folder, and Note. To see which standard objects contain blob data, see Working with Blob Data.

Note

The following example retrieves the blob data for the Document record that was created in Insert or Update Blob Data.

Example for retrieving blob data from a Document record

1curl https://MyDomainName.my.salesforce.com/services/data/v54.0/sobjects/Document/015D0000000N3ZZIA0/body -H "Authorization: Bearer token"
Example request body
none required
Example response body
Document body content is returned in binary form. The response content type won’t be JSON or XML since the returned data is binary. You can save the returned binary data to a file to store and access it.