JSS services and APIs

Version: 19.x

This topic describes the services and APIs available in Sitecore Headless Services (formerly known as JSS Server Components) and the Sitecore JavaScript Rendering SDK (JSS).

The services and APIs in this topic, unless otherwise stated, are available for all our framework-specific rendering SDKs.

The services and APIs most frequently used by JSS applications follow a service-client-fetcher pattern of implementation and support REST request/response, GraphQL queries, or both. The services and APIs using this pattern are:

Depending on your local development setup, chosen development workflow, and framework, you might also need to become familiar with:

Terminology

We use the following terminology for JSS services:

Factory

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.

Service

A service is a JavaScript abstraction (class) that facilitates retrieving Sitecore data. A service:

  • Accepts a configuration object.

  • Contains a fetch method.

  • Has a default client performing the fetching of data.

  • Defines data models.

  • Validates (developer input) logic.

  • Implements a default Fetcher.

Customize a service

From JSS 18.0.0, the recommended method for customizing/extending a front-end JSS service is to:

  1. Extend the service itself.

  2. Use your new service in a service factory.

Do you have some feedback for us?

If you have suggestions for improving this article,