Class: HTTPAPILayer

FormView~ HTTPAPILayer

HTTP API layer for interacting with server-side APIs.


new HTTPAPILayer()

Members


REQ_PARAMETER_DATA_REF :string

Constant representing the request parameter key for data reference.

Type:
  • string

Methods


<async, static> getForm(formContainerPath)

Retrieves the form model for the specified form container path using the open api

Parameters:
Name Type Description
formContainerPath string

The path of the form container.

See:
Returns:
  • A Promise that resolves to the form model or null if there was an error.
Type
Promise:.<(Object:|null:)>

<async, static> getFormDefinition(formContainerPath, pageLang)

Retrieves the form definition for the specified form container path using the json exporter API

Parameters:
Name Type Description
formContainerPath string

The path of the form container.

pageLang string

Language of the containing sites page

Returns:
  • A Promise that resolves to the form definition.
Type
Promise:.<Object:>

<async, static> getPrefillData(formId, params)

Retrieves the prefill data for the specified form and parameters.

Parameters:
Name Type Description
formId string

The ID of the form.

params Object

The parameters for prefilling the form.

See:
Returns:
  • A Promise that resolves to the prefill data.
Type
Promise:.<Object:>

<async, static> getJson(url)

Retrieves JSON data from the specified URL.

Parameters:
Name Type Description
url string

The URL to fetch JSON data from.

Returns:
  • A Promise that resolves to the fetched JSON data or null if there was an error.
Type
Promise:.<(Object:|null:)>

<async, static> getCustomFunctionConfig(formId)

Retrieves the custom function configuration for the specified form ID.

Parameters:
Name Type Description
formId string

The ID of the form.

Returns:
  • A Promise that resolves to the custom function configuration.
Type
Promise:.<Object:>