getLayout
get
/ccstore/v1/pages/layout/{path: .*}
Get Layout. Returns the layout(regions) of a specific page. If the layout ids are added to layoutsRendered parameter and included in the request and if it matches the current page's layout id, then only the region ids for the requested layout are returned, because regions are stored in the simple-cache.js on the client.
Request
Supported Media Types
- application/json
Path Parameters
Query Parameters
-
disableMinify(optional): string
Boolean flag to return minified or non minified Javascript links in layout information (for example disableMinify=true). Can only be used in Preview, ignored in Storefront.
-
layoutsRendered(optional): string
Contains the list of layout ids rendered on the client. If any id in it matches the requested page's layout id, then only region ids are returned.
-
pageParam(optional): string
Page param (for example pageParam=cat90016).
-
usePageId(optional): string
Use specific repository id for page, rather than the default.
-
usePreviewData(optional): string
Boolean flag to determine whether to use preview data.
Response
Supported Media Types
- application/json
200 Response
Following model is returned when operation succeeds.
Root Schema : getLayout_response
Type:
Show Source
object
-
description(optional):
string
The page description.
-
isPreview(optional):
boolean
Whether the server is in preview mode.
-
keywords(optional):
string
The keywords for the page.
-
layout(optional):
string
The layout id.
-
regions(optional):
array regions
The region data for all the regions of a page.
-
route(optional):
string
The page route.
-
title(optional):
string
The page title.
Example Response (application/json)
{
"layout":"homePageLayout",
"regions":[
{
"id":"headerRegionHomePage"
},
{
"id":"megaMenuRegionHomePage"
},
{
"id":"footerRegionHomePage"
},
{
"id":"globalWidgetsRegion0"
}
],
"route":"/home",
"isPreview":true,
"keywords":"",
"viewports":"",
"metaTags":[
],
"description":"",
"title":"Commerce Cloud Site"
}
Default Response
The error response
Root Schema : errorModel
Type:
Show Source
object
-
devMessage(optional):
string
An optional non-localized message containing technical information for developers
-
errorCode(optional):
string
The numerical code identifying the error
-
errors(optional):
array errors
An optional list of errors if multiple errors were encountered
-
message(optional):
string
The localized message describing the error
-
moreInfo(optional):
string
An optional non-localized message with more information
-
o:errorPath(optional):
string
An optional machine readable description of where the error occurred
-
status(optional):
string
The HTTP status code
-
type(optional):
string
The URI to the HTTP state code definition
Nested Schema : errors
Type:
array
An optional list of errors if multiple errors were encountered
Show Source
Nested Schema : items
Type:
Show Source
object
-
devMessage(optional):
string
An optional non-localized message containing technical information for developers
-
errorCode(optional):
string
The numerical code identifying the error
-
message(optional):
string
The localized message describing the error
-
moreInfo(optional):
string
An optional non-localized message with more information
-
o:errorPath(optional):
string
An optional machine readable description of where the error occurred
-
status(optional):
string
The HTTP status code