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 and the apps they support. See the differences between internal and external apps.

In the endpoint, v{version} represents the API version you work with, such as v66.0.

Endpoint Purpose Internal (B2E) Apps External (B2B and B2C) Apps
/services/apexrest/* Custom Apex REST resources for accessing your Apex classes and methods ✓ ✓
/services/data/v{version}/graphql GraphQL API endpoint for querying and mutating record data with a single request ✓ ✓
/services/data/v{version}/ui-api/records UI API records resources for reading and writing record data ✓ ✓
/services/data/v{version}/ui-api/search-info UI API search resources for retrieving search suggestions and scope information ✓ ✓
/services/data/v{version}/ui-api/layout UI API layout resources for retrieving metadata-driven page and record layouts ✓ ✓
/services/data/v{version}/ui-api/session/csrf UI API CSRF token resource for protecting requests against cross-site request forgery ✓ ✓
/services/data/v{version}/ui-api/* UI API resources for reading and writing record data, metadata-driven layouts, and related UI data ✓ ✓
/services/data/v{version}/chatter/* Chatter Connect API resources for accessing Chatter feeds, groups, and users ✓ ✓
/services/data/v{version}/chatter/users/me Current 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/SessionTimeServlet User session timeouts resource for checking the remaining time before the session expires ✓ ✓
/secur/logout.jsp Logout for ending the current user session ✓ ✓
/services/data/v{version}/connect/file/upload/config File upload config resource for retrieving the settings needed to upload files ✓ ✓
/services/data/v{version}/connect/proxy/ui-telemetry UI telemetry proxy for sending client-side performance and usage metrics ✓ ✓
/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/cms/delivery/channels/{channelId}/contents CMS channel content delivery resource for retrieving published managed content from a channel ✓
/services/data/v{version}/connect/cms/channels/{channelId}/searchable-content-types CMS searchable content types resource for retrieving the content types available for search in a channel ✓

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.

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

See Also