Access Salesforce APIs

With Data SDK, you can access any Connect REST API resource from your multi-framework app. Many Salesforce features provide their own Connect API resources, such as Data 360 Connect REST API, CRM Analytics REST API, and Salesforce Industries REST API. We recommend that you check the reference documentation for the feature you’re accessing.

Here are common endpoints you can use with Data SDK.

EndpointPurpose
/services/apexrest/*Custom Apex REST resources for accessing your Apex classes and methods
/services/data/v{version}/ui-api/recordsUI API records resources for reading and writing record data
/services/data/v{version}/ui-api/search-infoUI API search resources for retrieving search suggestions and scope information
/services/data/v{version}/ui-api/layoutUI API layout resources for retrieving metadata-driven page and record layouts
/services/data/v{version}/ui-api/session/csrfUI API CSRF token resource for protecting requests against cross-site request forgery
/services/data/v{version}/connect/*Connect REST API resources for accessing Salesforce feature data such as files, feeds, and communities
/services/data/v{version}/connect/file/upload/configFile upload config resource for retrieving the settings needed to upload files
/services/data/v{version}/connect/proxy/ui-telemetryUI telemetry proxy for sending client-side performance and usage metrics
/services/data/v{version}/chatter/*Chatter Connect API resources for accessing Chatter feeds, groups, and users
/services/data/v{version}/chatter/users/meCurrent Chatter user resource for retrieving the profile of the running user
/services/data/v{version}/chatter/users/{userId}Chatter user by ID resource for retrieving the profile of a specific user
/sfsites/c/_nc_external/system/security/session/SessionTimeServletUser session timeouts resource for checking the remaining time before the session expires
/secur/logout.jspLogout for ending the current user session

We recommend that you use optional chaining fetch?.() instead of a non-null assertion fetch!.(). Optional chaining is useful when you want to use fetch in a shared or cross-surface utility. If you’re not sure where your code is run, use optional chaining and handle the response appropriately.

The read-data examples in the Multi-framework recipes repo demonstrate how to call Chatter Connect API, Apex REST, and UI API REST.

Tip

See Also