Layout Services and APIs
To fetch and use Sitecore layout information in your JSS application, you use the JSS Layout API.
Sitecore endpoints for layout data
There are several options for fetching dictionaries from Sitecore:
- Call the REST Layout Service endpoint provided by Headless Services.
- Query the Sitecore Edge Preview GraphQL endpoint provided by Headless Services.
- Query the GraphQL endpoint provided by Sitecore Experience Edge for XM.
- Query the original Sitecore GraphQL Endpoint. This endpoint is currently used by React, Angular and Vue sample applications versions 18.0.0 and earlier.
REST Layout Service
The Sitecore REST layout Service endpoint is a REST endpoint providing app-specific layout data.
Sitecore Edge Preview GraphQL
Sitecore Experience Edge for XM
Sitecore Experience Edge for XM comes with a read-only GraphQL schema that is designed to accommodate common front-end use cases for headless Sitecore development. Read about the Experience Edge schema.
Sitecore GraphQL Endpoint
The Sitecore GraphQL Endpoint, the first-ever introduced by JSS Server Components, is currently used only by React, Angular and Vue sample applications provided by JSS versions 18.0.0 and earlier.
JSS Layout API
When using JSS, you can get layout data from any of the endpoints mentioned earlier, without worrying about data fetching implementation details. The JSS Layout API abstracts data fetching implementation details into services, clients and data fetchers for both REST and GraphQL endpoints. See some usage examples.