When you change data in the Frosmo back end using the Graniitti API, the changes are not automatically reflected in the Frosmo custom script of the corresponding site. For example, if use a
POST /sites/<site_id>/messages request to create a new modification whose content is preloaded, the API only stores the modification data to the Frosmo back end. The API does not automatically deploy an updated custom script with the preloaded content to the CDN, meaning the modification will not affect or appear on the site.
To update ("export") the custom script for a site, send a POST request to
curl -X POST \ --header 'Authorization: Bearer <access_token>' \ 'https://<graniitti_api_domain>/v0/sites/<site_id>/js/export'
The request causes the latest custom script file to be built and deployed to the CDN, making all changes since the last update available to the site.
For more information about the custom script, see Technical overview.