Newer Version Available

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

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.

  1. Go to the Workbench API utility.
  2. Log in to your DE org.
  3. The Record UI resource requires a record ID. To grab one:
    1. Click queries | SOQL Query.
    2. Select an object, such as Account, select the Id field, and click Query.
    3. 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.
  4. Select utilities | Rest Explorer.
  5. 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