fetching-webapp-rest-api

Installation
SKILL.md

Salesforce REST API via Data SDK Fetch

Use sdk.fetch from the Data SDK when GraphQL is not sufficient. The SDK applies authentication, CSRF handling, and base URL resolution. Always use optional chaining (sdk.fetch?.()) and handle the case where fetch is not available.

Invoke this skill when you need to call Chatter, Connect REST, Apex REST, UI API REST, or Einstein LLM endpoints.

API Version

Use the project's API version. It is typically injected as __SF_API_VERSION__; fallback to "65.0":

declare const __SF_API_VERSION__: string;
const API_VERSION = typeof __SF_API_VERSION__ !== "undefined" ? __SF_API_VERSION__ : "65.0";

Base Path

URLs are relative to the Salesforce API base. The SDK prepends the correct base path. Use paths starting with /services/....

Installs
1
GitHub Stars
613
First Seen
Mar 23, 2026
fetching-webapp-rest-api — forcedotcom/afv-library