Skip to main content

Front End API

Common behaviors across all endpoints.

Response wrapper​

All the domain endpoints, so the endpoints that fulfill the domain purpose of this API (returning the structure of a page), have their responses wrapped in generic object data:

  • data : It contains the actual contract returned by the queried endpoint
  • meta : An object containing all the metadata related to the Frontend API
    • version : the current version of the endpoint that has just been queried

Please notice the content inside the data object may change depending on the queried endpoint.

Sample response​

{
"data": {...},
"meta": {
"version": "1.0"
}
}

Error Response​

All the errors returned from this endpoint implement the Problem Details standard. In some cases, the field detail is added to more information on the occurred error.

HTTP 400​

Returned if at least one parameter does not respect validation rules.

  • path: must start with ~
  • culture: must be one of the configured cultures in FORGE (e.g., en-us). The validation is case-insensitive.
    To retrieve the complete list of configured cultures, you can query the /api/cultures FORGE Management API endpoint.
  • environment: must be the name of one of the configured environments in FORGE. The validation is case-insensitive.
    To retrieve the complete list of configured environments, you can query the /api/sitecontexts/contexts FORGE Management API endpoint.

HTTP 401​

Returned if no authorization header is provided.
For more info, please read the Authentication section above.


HTTP 404​

Returned when:

  • A page, given the parameters, is not found.
  • When a page has an alias, but it is requested using the original URL.

Sample Response:

{
"title": "The specified resource was not found.",
"status": 404,
"detail": "Page with path '~/{path}' was not found"
}

HTTP 500​

Returned if a generic error occurs during the handling of the request.
It may contain a detail field depending on the error.

Sample Response:

{
"title": "An error occurred while processing your request.",
"status": 500
}