Get a Record

GET {{_endpoint}}/services/data/v{{version}}/ui-api/records/:RECORD_ID

Get a record’s data.

Request Params

KeyDatatypeRequiredDescription
childRelationshipsnullA collection of child relationship names. The records with those child relationship names are included in the response. Specify names in the format ObjectApiName.ChildRelationshipName or ObjectApiName.ChildRelationshipName.FieldApiName. For example, to specify the Contacts relationship on an Account, use Account.Contacts. You can get child relationships one level deep.
To get a relationship name, look in the Object Info response body.
fieldsnullSpecifies the fields to return. If this property is specified, the response is a union of fields and optionalFields.
If the context user doesn’t have access to a field, an error is returned.

If you’re not sure whether the context user has access to a field and you don’t want the request to fail if they don’t, use the optionalFields parameter.

Specify names in the format ObjectApiName.FieldName. You can get any field that has a named relationship to this record. There is no limit to the number of fields you can specify. | | layoutTypes | null | | Specifies the fields to return. If this property is specified, the response is a union of layoutTypes, modes, and optionalFields. A collection containing any of these values: Compact—Use this value to get a layout that contains a record’s key fields. Full—(Default) Use this value to get a full layout. | | modes | null | | The access mode for the record. This value determines which fields to get from a layout. Layouts have different fields for create, edit, and view modes. For example, formula fields are rendered in view mode, but not in create mode because they’re calculated at run time, like formulas in a spreadsheet. A collection containing any of these values: Create—Use this mode if you intend to build UI that lets a user create a record. This mode is used by the /ui-api/record-defaults/create/<SOBJECT_API_NAME> resource. Edit—Use this mode if you intend to build UI that lets a user edit a record. This mode is used by the /ui-api/record-defaults/clone/<RECORD_ID> resource. View—(Default) Use this mode if you intend to build UI that displays a record. | | optionalFields | null | | A collection of optional field names. If a field is accessible to the context user, it’s included in the response. If a field isn’t accessible to the context user, it isn’t included in the response, but it doesn’t cause an error. Specify names in the format ObjectApiName.FieldName. You can get any field that has a named relationship to this record. There is no limit to the number of fields you can specify. | | pageSize | null | | The maximum number of child records to return on a page. The default value is 5. | | updateMru | null | | To add to the most recently used (MRU) list view, set to true. The default value is false. |

RESPONSES

status: OK

{&quot;apiName&quot;:&quot;Account&quot;,&quot;childRelationships&quot;:{},&quot;eTag&quot;:&quot;8897eb60da3dea171b0d755821bf2c36&quot;,&quot;fields&quot;:{&quot;Name&quot;:{&quot;displayValue&quot;:null,&quot;value&quot;:&quot;Burlington Textiles Corp of America&quot;},&quot;Rating&quot;:{&quot;displayValue&quot;:&quot;Warm&quot;,&quot;value&quot;:&quot;Warm&quot;}},&quot;id&quot;:&quot;001B000000UnQ2wIAF&quot;,&quot;lastModifiedById&quot;:&quot;005B0000003TOI6IAO&quot;,&quot;lastModifiedDate&quot;:&quot;2017-08-18T14:46:22.000Z&quot;,&quot;recordTypeId&quot;:&quot;012000000000000AAA&quot;,&quot;recordTypeInfo&quot;:null,&quot;systemModstamp&quot;:&quot;2017-08-18T14:46:22.000Z&quot;,&quot;weakEtag&quot;:1503067582000}