Newer Version Available
User Interface API Quick Start
The best way to learn an API is to use it. Let's go!
Sign up for a Salesforce Developer Edition (also known as a DE org).
This quick start makes a request to the top dog of User Interface APIs, the Record UI resource, /ui-api/record-ui/{recordIds}. This resource returns all the information you need to display a record in an app: layout metadata, object metadata, and record data.
- Go to the Workbench API utility.
- Log in to your DE org.
-
The Record UI resource requires a record ID. To grab one:
- Click .
- Select an object, such as Account, select the Id field, and click Query.
- Copy one of the IDs in the list of query results. Either keep it in your clipboard, or copy it to a notepad to grab later.
- Select .
-
Make a GET request to /ui-api/record-ui/{recordIds}.
Substitute the record ID from your SOQL query.
Here's a sample request:
The response includes three nested response bodies. Each response body is a map because you
can pass a list of record IDs to the request (for example, /ui-api/record-ui/001R0000003GeJ1IAK,001R0000003GKR0IAO). In our example, we
passed only one record ID.
- layouts—A map of object API names to layout information for each object
- objectInfos—A map of object API names to metadata for each object
- records—A map of record IDs to data for each record