JSS Services & APIs
The services and APIs described in this section, unless otherwise stated, are available for all our framework-specific rendering SDKs.
Our SDKs' most frequently used services follow a service-client-fetcher pattern of implementation and support REST request/response, GraphQL queries, or both. The services using this pattern are:
- Layout Service - available for all frameworks, with REST and GraphQL endpoints.
- Dictionary Service - available for all frameworks, with REST and GraphQL endpoints.
- Sitemap Service - available for Next.js only, GraphQL only.
Depending on your local development setup, chosen development workflow and framework, you might also need to become familiar with:
Before diving into the specifics of each service, you should be aware of the following terminology for JSS services:
A factory creates an instance of a service. In the Next.js sample application, there are examples of factories for services with support for both GraphQL and REST.
- Accepts a configuration object.
- Contains a fetch method.
- Has a client performing the fetching of data.
- Defines data models.
- Validates (developer input) logic.
- Implements a default Fetcher.
A client uses a JSS service to interact with a Sitecore Headless Service or third-party service.
A fetcher describes the data-fetching function of services.
As of JSS 18.0.0, the recommended method for customizing/extending a front-end JSS service is to:
- extend the service itself, followed by
- using your new service in a service factory.