REST API

The REST API includes new and changed resources, new types, and changes to older API versions.

New Resources

List View Resource
/vXX.X/sobjects/{sobjectType}/listviews/{listViewID}
Returns basic information about the specified list view.
List View Describe Resource
/vXX.X/sobjects/{sobjectType}/listviews/{listViewID}/describe
Returns detailed information about a list view, including the ID, the columns, and the SOQL query.
List View Results Resource
/vXX.X/sobjects/{sobjectType}/listviews/{listViewID}/results
Executes the SOQL query for the list view and returns the resulting data and presentation information.
List Views Resource
/vXX.X/sobjects/{sobjectType}/listviews
Returns the list of list views for the specified sObject, including basic information about each list view. You can also call this resource for a specific listview entity ID to return information for only a specific list view.
Recent List Views Resource
/vXX.X/sobjects/{sobjectType}/listviews/recent
Returns the list of recently used list views for the given sObject type.
Suggestions Resource
Returns a list of suggested records whose names match the user’s search string. The suggestions resource provides a shortcut for users to navigate directly to likely relevant records, before performing a search.
List Invocable Actions
Returns Standard or Custom; the two primary action categories. Standard actions may be used statically while custom actions must be defined in advance. Use the GET method for each specific action for additional information about the input parameters for and the output parameters from invoking the action.
List Invocable Actions Standard
Returns the list of actions that can be statically invoked. The available actions are:
  • ChatterPost—Post text to the feed for a specific record, user, or Chatter group. The text can include @mentions and topics.
  • EmailSimple—Send an email where you specify the subject, body, and recipients.
  • SubmitApproval—Submit a Salesforce record for approval.
List Invocable Actions Custom
Returns the list of all custom actions. The available actions are:
  • EmailAlert—Your organization’s workflow email alerts.
  • Flow—The active trigger-ready flows in your organization.
  • QuickAction—Available quick actions in your organization.

Changed Resources

Approval Process Requests
New process requests are available for the following resource: /vXX.X/process/approvals/. These requests enable you to do the following:
  • Specify a submitter requesting an approval record.
  • Specify a developer name or ID of a process definition.
  • Determine whether or not to evaluate entry criteria for the process.
See “Process Approvals” in the Force.com REST API Developer's Guide.
SObject Rows
The GET method of the resource now supports external objects. For external object–specific usage details, see “SObject Rows” in the Force.com REST API Developer's Guide.

New Headers

Call Options Header
The Call Options header is a request header applied when working with a specific client. Use this header to specify a default namespace, enabling you to resolve field names in managed packages without having to specify the namespace everywhere. The following example sets the default namespace to battle:
Sforce-Call-Options: client=SampleCaseSensitiveToken/100, defaultNamespace=battle
Then queries such as the following will succeed:
/vXX.X/query/?q=SELECT+Id+botID__c+FROM+Account
In this case the actual field queried is the battle__botId__c field.
Package Version Header
The Package Version header is a request header applied when working with managed packages. Use this header to specify the version of each package referenced by your API client. A package version is a number that identifies the set of components and behavior contained in a package. Publishers can use package versions to evolve the components in their managed packages gracefully by releasing subsequent package versions without breaking existing customer integrations using the package. This header can also be used to specify a package version when making calls to an Apex REST web service. The following example specifies a package version of 1.0 for the clientPackage package: x-sfdc-packageversion-clientPackage: 1.0
Query Options Header
The Query Options header is a request header applied when using the Query REST API resource. Use this header to specify the query results batch size. The following example sets the query results batch size to 1000: Sforce-Query-Options: batchSize=1000

Other Changes

Compound Geolocation Field Support Added to Older API Versions
You can SELECT compound geolocation fields in REST requests in API versions 26.0 and later. Previously, support for compound geolocation fields was available in API versions 30.0 and later.