Skip to main content

Page

Endpoint Overview

  • Endpoint Name: Page
  • Purpose: Retrieves the definition of a page from Page Builder.
  • Method: GET
  • URL: /api/{version}/page

Authentication

  • Authentication Type: API key
  • Pass the API key in the request header: FrontendApi key=YOUR_API_KEY

Request

Headers

Header NameRequiredDescription
FrontendApi keyYesYour API Key
acceptNoapplication/json

Path Parameters

ParameterTypeDescription
versionstringThe version of the API to be used. Allowed values: v1.

Query Parameters

ParameterMandatoryDescriptionExample
pathYesRelative path of the Page Builder or Visual Site Manager page you want to render.

When the path is a folder path and it doesn't end with /, that's equal to the index page under that folder.

From version 0.6.0, it's no longer required that the path starts with ~
path=~/index or path=/index
tokenNoThe JWT token used in the preview workflow. If present and valid, the working version of the page is returned.
See Supporting the Page Builder preview (FE API) for a detailed description.

Available from v1.0.0
eyJhbGciOiJIUzI1NiIsInR5cCl6IkpXVCJ9.ey
cultureYesCulture of the website.culture=en-gb
environmentYesEnvironment where the page is executed.environment=integration

Response

Response Codes

HTTP Status CodeMeaning
200Successful request
404Not Found (resource does not exist)
500Internal Server Error

Response Body

  • structure (Object): Contains template, layouts, and modules of the requested page.

    ⚠️ A page can only have one Template.

  • key (Object): An object representing the basic information of the Template
    • id (String): The name of the Template
    • namespace (String): The namespace of the Template
  • type (String): The type of item being represented; in this case, it will always be template
  • properties (Object): An object representing a list of key-value objects filled with the name and value of the Template fields populated on either the VSM or the Page Builder
  • slots (Array): An array of defined areas that are part of the layout, filled with layouts and modules
  • items (Array): An array of nested layouts and modules
  • variables (Array): An array of objects containing the variables available for the requested page.
  • metadata (Array): An array of objects containing the metadata available for the requested page
    • category (String): The category of the metadata
    • key (String): The name of the metadata
    • value (String, Integer, Boolean): The value of the metadata

Layout Item Type

  • key (Object): An object representing the basic information of the Layout
    • id (String): The name of the Layout
    • namespace (String): The namespace of the Layout
  • type (String): The type of item being represented; in this case, always layout
  • properties (Object): An object representing a list of key-value objects filled with the name and value of the Layout fields populated on the Page Builder
  • slots (Array): An array of defined areas that are part of the layout, filled with layouts and modules
  • slot (String): The name of the slot in which the Layout is contained if it's nested inside another Layout
  • items (Array): An array of nested layouts and modules
    • See the Item Types section for details.

Module Item Type

  • key (Object): An object representing the basic information of the Module
    • id (String): The name of the Module
    • namespace (String): The namespace of the Module
  • type (String): The type of item being represented; in this case, always module
  • properties (Object): An object representing a list of key-value objects filled with the name and value of the Module fields populated on the Page Builder
  • slot (String): The name of the slot in which the Module is contained

Variable Type: KeyValue

  • key (String): The name of the variable
  • type (String): The type of variable
  • keyValue (Object): An object containing the value of the variable
    • value: The value of the variable (string, number, boolean, guid, datetime — only dates expressed as yyyy-MM-dd will be accepted)

Variable Type: Stylesheet

  • key (String): The name of the variable
  • type (String): The type of variable
  • stylesheet (Object): An object containing the stylesheet information
    • source (String): The URL of the CSS to be loaded

Variable Type: Script

  • key (String): The name of the variable
  • type (String): The type of variable
  • script (Object): An object containing the script information
    • source (String): The URL of the JavaScript file to be loaded
    • async (Boolean): The value of the async attribute rendered on the <script> tag
    • defer (Boolean): The value of the defer attribute rendered on the <script> tag

Variable Type: DataItem (deprecated)

  • key (String): The name of the variable
  • type (String): The type of variable
  • dataItem (Object): An object containing the information of the single FORGE WCM entity to retrieve
    • path (String): The WCM data path
    • entityType (String): The .NET type DTO to map the JSON response

Variable Type: DataList (deprecated)

  • key (String): The name of the variable
  • type (String): The type of variable
  • dataList (Object): An object containing the information of the FORGE WCM entities to retrieve
    • path (String): The WCM data path
    • entityType (String): The .NET type DTO to map the JSON response

Successful Response Example

This is the response we get from a page built with:

  • One Default template that contains:
    • One ThreeColumns layout with 3 nested modules and 3 defined slots: left, center, right
      • One SimpleText module that will be placed on the left slot of the ThreeColumns layout
      • One Hero module that will be placed on the center slot of the ThreeColumns layout
      • One Event Countdown module that will be placed on the right slot of the ThreeColumns layout

alt text

This is the output JSON:

"root": {
"data": {
"structure": {
"key": {
"id": "Default"
"namespace": "react_Template"
}
"type": "template"
"properties": {
}
"slots": [
"0": "header"
"1": "main"
"2": "footer"
]
"items": [
"0": {
"key": {
"id": "Columns444"
"namespace": "react_Layout"
}
"type": "layout"
"properties": {
}
"slot": "main"
"slots": [
"0": "col1"
"1": "col2"
"2": "col3"
]
"items": [
"0": {
"key": {
"id": "EventCountdown"
"namespace": "react_Module"
}
"type": "module"
"properties": {
"slug": "alpha-event"
"headerTitle": "Alpha event!"
}
"slot": "col3"
}
"1": {
"key": {
"id": "HeroDynamicThumbsPortraitSmall"
"namespace": "react_Module"
}
"type": "module"
"properties": {
"selectionSlug": "test-new-selection"
"isAnimated": true
}
"slot": "col2"
}
"2": {
"key": {
"id": "Text"
"namespace": "react_Module"
}
"type": "module"
"properties": {
"slug": "alpha-text"
}
"slot": "col1"
}
]
}
]
}
"variables": [
"0": {
"type": "keyValue"
"key": "inc_header"
"keyValue": {
"value": "~/_libraries/_header"
"valueType": "string"
}
}
"1": {
"type": "keyValue"
"key": "inc_footer"
"keyValue": {
"value": "~/_libraries/_footer"
"valueType": "string"
}
}
"2": {
"type": "keyValue"
"key": "sitename"
"keyValue": {
"value": "FORGE GO"
"valueType": "string"
}
}
"3": {
"type": "keyValue"
"key": "test_deprecation"
"keyValue": {
"value": true
"valueType": "boolean"
}
}
"4": {
"type": "keyValue"
"key": "inc_amp_header"
"keyValue": {
"value": "~/_libraries/_ampheader"
"valueType": "string"
}
}
"5": {
"type": "keyValue"
"key": "user_profile"
"keyValue": {
"value": "/account/profile/overview"
"valueType": "string"
}
}
"6": {
"type": "keyValue"
"key": "inc_hamburger"
"keyValue": {
"value": "~/react-fe/layouts/hamburger"
"valueType": "string"
}
}
]
"metadata": [
"0": {
"category": "seo"
"key": "sitename"
"value": "site-name"
"type": "string"
}
"1": {
"category": "config"
"key": "vanityurl"
"value": "https://forge.com/"
"type": "string"
}
"2": {
"category": "schemaorg"
"key": "logourl"
"value": "https://forge.com/assets/icons/forge.png"
"type": "string"
}
"3": {
"category": "seo"
"key": "disallows"
"value": "/testing"
"type": "string"
}
"4": {
"category": "ampconsent"
"key": "message"
"value": "Consent message"
"type": "string"
}
"5": {
"category": "ampconsent"
"key": "privacytitle"
"value": "Privacy Title"
"type": "string"
}
"6": {
"category": "ampconsent"
"key": "privacylink"
"value": "/privacy-policy"
"type": "string"
}
"7": {
"category": "pwa"
"key": "name"
"value": "Forge GO Sandbox"
"type": "string"
}
"8": {
"category": "pwa"
"key": "shortname"
"value": "FORGE GO"
"type": "string"
}
"9": {
"category": "pwa"
"key": "starturl"
"value": "/"
"type": "string"
}
"10": {
"category": "pwa"
"key": "scope"
"value": "/"
"type": "string"
}
"11": {
"category": "pwa"
"key": "display"
"value": "standalone"
"type": "string"
}
"12": {
"category": "pwa"
"key": "themecolor"
"value": "#212553"
"type": "string"
}
"13": {
"category": "pwa"
"key": "backgroundcolor"
"value": "#dd4a68"
"type": "string"
}
"14": {
"category": "pwa"
"key": "icon"
"value": "/assets/icons/fg.png"
"type": "string"
}
"15": {
"category": "appconfig"
"key": "entry_point"
"value": "~/_libraries/mobileapp/_entrypoint"
"type": "string"
}
"16": {
"category": "theming"
"key": "enabled"
"value": false
"type": "boolean"
}
"17": {
"category": "ampconsent"
"key": "title"
"value": "Consent title"
"type": "string"
}
"18": {
"category": "socials"
"key": "fbappid"
"value": "354888428940751"
"type": "string"
}
"19": {
"category": "socials"
"key": "twitterid"
"value": "21774863"
"type": "string"
}
"20": {
"category": "seo"
"key": "image"
"value": "https://res.cloudinary.com/SeoImage/SeoImage.jpg"
"type": "string"
}
"21": {
"category": "sitemap"
"key": "blacklist"
"value": "test|testing|account|search|mobileapp|multistories|sample_modules|venues|players|teams|sitemap|calendar/list|events|vimeovideos|~/photos"
"type": "string"
}
"22": {
"category": "socials"
"key": "fbpages"
"value": "107302428215545,102044428874343"
"type": "string"
}
"23": {
"category": "config"
"key": "logo"
"value": "https://forge.com/assets/icons/forgego/logos/forgego_horiz_negative_S.svg"
"type": "string"
}
"24": {
"category": "schemaorg"
"key": "organizationname"
"value": "FORGE GO"
"type": "string"
}
"25": {
"category": "testDuplication"
"key": "display"
"value": "standalone"
"type": "string"
}
"26": {
"category": "theming"
"key": "cta_color"
"value": "#16cc50"
"type": "string"
}
"27": {
"category": "theming"
"key": "header_text_color"
"value": "#000"
"type": "string"
}
"28": {
"category": "theming"
"key": "footer_background_color"
"value": "#ffae34"
"type": "string"
}
"29": {
"category": "theming"
"key": "footer_text_color"
"value": "#000"
"type": "string"
}
"30": {
"category": "theming"
"key": "header_text_color_hover"
"value": "#ffae34"
"type": "string"
}
"31": {
"category": "theming"
"key": "footer_text_color_hover"
"value": "#ff4c47"
"type": "string"
}
"32": {
"category": "theming"
"key": "button_background_color"
"value": "#16cc50"
"type": "string"
}
"33": {
"category": "theming"
"key": "button_text_color"
"value": "#000"
"type": "string"
}
"34": {
"category": "theming"
"key": "roofline_background_color"
"value": "#ff4c47"
"type": "string"
}
"35": {
"category": "theming"
"key": "roofline_text_color"
"value": "#000"
"type": "string"
}
"36": {
"category": "theming"
"key": "header_background_color"
"value": "#ff4c47"
"type": "string"
}
"37": {
"category": "seo"
"key": "title"
"value": "This is my meta-title "
"type": "string"
}
"38": {
"category": "theming"
"key": "headerandfootercolor"
"value": "red"
"type": "string"
}
"39": {
"category": "theming"
"key": "headerandfootertextcolor"
"value": "red"
"type": "string"
}
"40": {
"category": "testduplication"
"key": "metadata_long_name_long_name"
"value": false
"type": "boolean"
}
"41": {
"category": "testduplication"
"key": "meta_data_date"
"value": "2022-10-20T00:00:00Z"
"type": "datetime"
}
]
}
"meta": {
"version": "1.0"
}
}

Common Errors and Troubleshooting

Nothing known.