When defining a template, a regex pattern is assigned to the template. When creating a new storage unit, if the name of the storage unit matches the pattern of the template, it will be created with the template configuration settings. Templates will be sorted by a user-defined priority. In case multiple patterns match the storage unit name, the template with the highest priority will be applied (0 is the highest priority). Priorities can be reassigned, by saving again the template with a different priority number.
Adds or updates a configuration template. The template name is the identifier for update operations.
The add template PUT/POST request requires the template name in the URL and a body with the fields:
- pattern: a regex for matching storage unit names.
- priority: a number with the template priority in the template list. 0 is the highest priority. Calling template/list will return all templates sorted by priority.
- settings: the content processing modules configuration as described in Configure Storage Unit.
- contentProcessing: flag to enable/disable content processing triggers. If enabled, modules configured in settings will execute for the configured scopes.
- encryptContent: flag to enable/disable content encryption.
- compressContent: flag to enable/disable content compression.
- reprocessingQueue: flag to enabled/disable background reprocessing.
If the template was created successfully, a 200 response code with an OK message is returned.
Returns the template configuration.
The get template GET request requires the template name in the URL.
If the template exists, a 200 response code with the template configuration is returned.
If the template doesn't exist, a 400 response is returned.
Silently deletes a template by name.
The delete template DELETE/POST request requires the template name in the URL.
A 200 response code with an OK message is returned when the operation completes.
Gets the list of available templates sorted by priority. For each template, the name, pattern and priority are returned.
No parameters are required for the list GET request.
A 200 response code with the list of available templates is returned sorted by priority (0 is highest). An empty list is returned if there are no templates.