Skip to main content

FORM API Reference

Module Information

Service Files:

  • Private: service/private/form.js
  • Public: service/form.js

Available Services: 4 Documented Services: 4


form.submit

Submit a form response as an anonymous user. Reads the form schema from the node configuration file, inserts the submission into the form-specific database table (named form_NODE_ID), sends an email notification to configured backoffice recipients (owner or admin hub members), and sends an acknowledgement email to the submitter. Automatically enriches data with submission timestamp, user-agent, and geolocation if configured in the form schema.

PropertyValue
ScopeHub (requires hub context)
PermissionAnonymous (0)
LoggingEnabled

Endpoint:

https://hostname/-/svc/form.submit

Parameters

ParameterTypeRequiredDefaultDescription
dataobjectNo--

Returns

FieldTypeDescription
typeany-
descriptionany-
propertiesany-

Possible Errors

Error CodeHTTP StatusDescription
INTERNAL_ERROR-Failed to read form configuration file or insert submission into database
INTERNAL_ERROR-Failed to send backoffice notification or acknowledgement email

form.browse

Retrieve paginated form submissions from the form-specific database table (named form_NODE_ID). Results are ordered by creation time descending, with a fixed page size of 20 records. Requires write permission on the hub.

PropertyValue
ScopeHub (requires hub context)
PermissionWrite (4)

Endpoint:

https://hostname/-/svc/form.browse

Parameters

ParameterTypeRequiredDefaultDescription
pageintegerNo1-

Returns

FieldTypeDescription
typeany-
descriptionany-
propertiesany-

Possible Errors

Error CodeHTTP StatusDescription
INTERNAL_ERROR-Failed to query form submissions table

form.update

Update a single configuration field in the form node JSON file. Reads the current configuration, sets conf[name]=value if both name and value are provided, then writes the updated configuration back to the file. Requires owner permission on the hub.

PropertyValue
ScopeHub (requires hub context)
PermissionOwner (7)

Endpoint:

https://hostname/-/svc/form.update

Parameters

ParameterTypeRequiredDefaultDescription
namestringNo--
valueanyNo--

Returns

FieldTypeDescription
typeany-
descriptionany-
propertiesany-

Possible Errors

Error CodeHTTP StatusDescription
INTERNAL_ERROR-Failed to read or write the form configuration file

form.info

Retrieve the form configuration from the node JSON file. Returns the complete configuration object including schema, recipients, and key settings. Requires admin permission on the hub.

PropertyValue
ScopeHub (requires hub context)
PermissionAdmin (6)

Endpoint:

https://hostname/-/svc/form.info

Parameters

No parameters

Returns

FieldTypeDescription
typeany-
descriptionany-
propertiesany-

Possible Errors

Error CodeHTTP StatusDescription
INTERNAL_ERROR-Failed to read the form configuration file from the node MFS path

  • ACL System - Permission model
  • Service Routing - URL patterns
  • Error Handling - Error codes