Newer Version Available
Get a Batch of Records
- Resource
-
1GET /ui-api/records/batch/{recordIds} - recordIds—A comma-delimited list of custom object and supported object records.
- Available Version
- 41.0
- Example for GET
-
This example gets the Account.Name field and Account.Contacts child
records for two
accounts.
1GET /ui-api/records/batch/001R0000003I6CeIAK,001R0000003I6CgIAK? 2 fields=Account.Name&childRelationships=Account.Contacts - Request Parameters
-
Parameter Name Type Description Required or Optional Available Version childRelationships String[] A collection of child relationship names. The records with those child relationship names are included in the response. Specify names in the format ObjectApiName.ChildRelationshipName. 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.
Optional 41.0 fields String[] Specifies 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.
Child relationship records don’t have layouts. To get additional fields for these records, specify them in the fields parameter.
To return a field whose type is base64, specify the field in the optionalFields parameter.
Either fields or layoutTypes is required. If you specify childRelationships, you can specify both. Otherwise, the API throws an error. 41.0 layoutTypes String[] 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.
Either fields or layoutTypes is required. If you specify childRelationships, you can specify both. Otherwise, the API throws an error. 41.0 modes String[] 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/{apiName} 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/{recordId} resource.
- View—(Default) Use this mode if you intend to build UI that displays a record.
Optional if layoutTypes is specified. If layoutTypes is not specified, this parameter is ignored. 41.0 optionalFields String[] 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.
To return a field whose type is base64, specify the field in the optionalFields parameter.
Optional 41.0 pageSize Integer The maximum number of child relationship records to return on a page. The default value is 5. Optional 41.0 - Response Body
- Batch Results