HTML Compositions
Introduction
When you want to deploy your custom HTML composition, you have two options:
Use the REST API for HTML compositions
Use the CompositionEditor
REST API for HTML Compositions
The HTML composition REST API is deprecated from Starcounter 2.3.1. Compositions can still be accessed through the class HTMLComposition
The REST API allows importing compositions for sets of blended HTML partials. The CompositionEditor has to run for this API to work.
Composition
GET
http://localhost:8080/sc/partial/composition?key={?}&ver={?}
Returns the HTML of a specific composition
Query Parameters
key
string
The key of the composition.
ver
string
The version of the composition.
Composition
POST
http://localhost:8080/sc/partial/composition?key={?}&ver={?}
Creates a new composition at the specified key if there's no composition there. The body consists of the composition HTML
Query Parameters
key
string
The key of the composition.
ver
string
The version of the composition.
Composition
DELETE
http://localhost:8080/sc/partial/composition?key={?}&ver={?}
Deletes the composition with the specific key and version
Query Parameters
key
string
The key of the composition. If the key is "all", all composition are deleted.
ver
string
The version of the composition.
Last updated