Newer Version Available

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

SObject Rich Text Image Retrieve

Retrieves the specified image data from a specific rich text area field in a given record.

URI
/vXX.X/sobjects/SObjectName/id/richTextImageFields/fieldName/contentReferenceId
Formats
PNG or JPEG binary image data.
HTTP Method
GET
Authentication
Authorization: Bearer token
Parameters
Parameter Description
SObjectName Indicates the name of the standard object of the record.
id The ID of the object.
fieldName The name of the rich text area field.
contentReferenceId The reference ID that uniquely identifies an image within a rich text area field.
You can obtain the reference by retrieving information for the object. The description will show the contents of the rich text area field. For example:
1{
2   "attributes" : {
3      "type" : "Lead",
4      "url" : "/services/data/v43.0/sobjects/Lead/00QRM000003ZfDb2AK"
5   },
6   "Id" : "00QRM000003ZfDb2AK",
7   ...
8   "ContactPhoto__c" : 
9   "Sarah Loehr and her two dogs.
10   <img alt=\"Sarah Loehr.\" 
11   src=\"https://c.na44.content.stmfa.stm.force.com/servlet/rtaImage?
12   eid=00QRM000003ZfDb&amp;
13   feoid=00NRM000001E73j&amp;
14   refid=0EMRM00000002Ip\"></img>"
15}

The refid parameter of the image (0EMRM00000002Ip in this example) is the contentReferenceId.

Example
For an example of retrieving the blob data from a rich text area field, see Get an Image from a Rich Text Area Field.
Error responses
See Status Codes and Error Responses.