Context

Context represents the information about the project locales and the deployment environment.

Get locales and environment information

Response Representation: ProjectContext. It returns information about the project locales setup and the environment in which the requested host acts in.'

GET
https://PROJECT_NAME-COMPANY_NAME.frontastic.TLD/frontastic/context

Returns information about the project locales setup and the environment in which the requested host acts in.

Path parameters:
PROJECT_NAME
String

Project Name

COMPANY_NAME
String

Company Name

TLD
String

The top-level domain for the environment, which includes .live, .io, and .rocks. For more information, see Hosts.

Request headers:
Accept
String

application/json

Commercetools-Frontend-Extension-Version
String
Response:
200ProjectContextasapplication/json
Request Example:cURL
curl --get https://PROJECT_NAME-COMPANY_NAME.frontastic.TLD/frontastic/context -i \
--header 'Accept: ${ACCEPT}'\
--header 'Commercetools-Frontend-Extension-Version: ${COMMERCETOOLS_FRONTEND_EXTENSION_VERSION}'
200 Response Example: ProjectContextjson
{
"locales": ["de_CH", "fr_CH", "it_CH", "de_LI", "en_GB"],
"defaultLocale": "de_CH",
"environment": "development"
}