Managing JavaScript templates
Information to help you manage JavaScript templates.
Before you begin
- Get an access token. See Managing themes.
Procedure
Add
<script type="text/javascript" src="/template/v1.0/static/js/<filename>?themeId=@THEME_ID@"></script>
to the .html file to apply the registered JavaScript on a specific template page.Note: The new
.js file can be managed
like other templates. It is located under the common/static/js file.Register a .js file
curl -X POST 'https://<tenant>/template/v1.0/branding/registration/js' --header 'Authorization: Bearer <access_token>' -F 'file=@"<JavaScript_file>"'
This command registers a .js file.
Get all .js files
curl -X GET 'https://<tenant>/template/v1.0/branding/registration/js' -H 'Authorization: Bearer <access_token>'
This command lists all the .js files that are registered.
Delete a .js file
curl -X DELETE 'https://<tenant>/template/v1.0/branding/registration/js/<file_name>' --header 'Authorization: Bearer <access_token>'
This command deletes an existing .js file.