RESTApps are managed in the Addon-view of the SiteVision editor. SiteVision provides two types of addons. The first type is Custom Module, which is a container for WebApps. The second is Headless Custom Module, which is a container for RESTApps.
This enables centralized configuration and version management. The deployment of a RESTApp can be managed via the SiteVision UI but also using the REST API endpoints that comes with SiteVision 4.5.
To facilitate a seamless deployment process during development, take advantage of the create-sitevision-app project.
Developers can deploy a unsigned RESTApp to their development environments if developer license is available on the website, but SiteVision-signed certificates are needed to deploy to a website in production.
RESTApps are uploaded to an existing addon. The deployment of a RESTApp can be managed via the SiteVision editor but also via the
RestAppImport REST API endpoint. When uploading from the SiteVision editor, one will be prompted to select or create a target headless custom module. When uploading via REST, a headless custom module must exist before the RESTApp can be uploaded. Creating headless custom modules can easily be done via the
HeadlessCustomModule REST API endpoint.
See the Certificates and signing-section for more information on how to upload to a development/production-environment.
The restapp-boilerplate example app contains different npm scripts that will facilitate uploading RESTApps as well as creating addons.
An addon may contain multiple unique RESTApps. A RESTApps´s identifier is made up of its "id" and "version" defined in manifest.json.
The "Active" indicator decides which RESTApp that will handle incoming requests. A RESTApp is set to active either via the context menu in the editor or via the
ActivateCustomModuleExecutable REST API endpoint.
Force deploy is used when overwriting an existing RESTApp (existing id and version). To force deploy in the SiteVision editor, shift click the upload button. When uploading via SiteVision REST API, pass force=true.