{{appName}}

Quick Start

  • Get a record from Account Object
               
$ bash run_curl.sh query/?q=SELECT+Id+FROM+Account+LIMIT+1  | jq
{
"totalSize": 1,
"done": true,
"records": [
 {
   "attributes": {
     "type": "Account",
     "url": "/services/data/v42.0/sobjects/Account/001f400000M8bifAAB"
   },
   "Id": "001f400000M8bifAAB"
 }
]
}
               
             

Get Record-ui for the given record-id

  bash run_curl.sh ui-api/record-ui/001f400000M8bifAAB  | jq 
             
Response
  • layoutUserStates — A map of layout user state IDs to user state information for each layout section
  • layouts — A map of object API names to user type 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

Supported Objects

  bash run_curl.sh ui-api/object-info | jq 
             
Response

Get Object-Info for Account

  bash run_curl.sh  ui-api/object-info/Account | jq 
             
Response

Get favorites

  bash run_curl.sh  ui-api/favorites | jq 
             
Response

Get all picklist values for a record-type

  • This feature is currently not available in Apex
 
  # record-type-id here is 012000000000000AAA
  bash run_curl.sh ui-api/object-info/Account/picklist-values/012000000000000AAA | jq 
            
Response

Resources


# what is the content of the bash script run_curl.sh?
$ cat run_curl.sh
export SID='SID_HERE'
export VER='v42.0'
curl -H "Authorization: Bearer $SID" https:/INSTANCE_NAME/services/data/$VER/$1
## you can get SID from Apex:
##   String SID = UserInfo.getSessionId();
##