Templates are the file trees that Universe copies into an instance’s working directory before starting it. They live underDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/universeclouddev/Universe/llms.txt
Use this file to discover all available pages before exploring further.
./templates/<group>/<name>/ on each node. The Template API lets you inspect what templates exist, read and modify their files over HTTP, export or import them as zip archives, pull the latest version from a remote storage backend (e.g., S3), and trigger a cluster-wide sync via Hazelcast.
All template endpoints require a Bearer token with ALL permission.
Template group and name together form the unique identity of a template (e.g., group
server, name base → path ./templates/server/base/). Both are always required in path parameters.Endpoints
GET /api/templates
Lists all templates available on this node, organized by group. Authentication: ALL permission required.The template group name (e.g.,
server, global, lobby).The template name within the group (e.g.,
base, default).Absolute filesystem path to the template directory on this node.
| Status | Meaning |
|---|---|
200 | List returned (may be empty). |
401 | Unauthorized. |
GET /api/templates//
Returns metadata for a specific template, including whether the template directory exists on this node. Authentication: ALL permission required. Path ParametersTemplate group (e.g.,
server).Template name within the group (e.g.,
base).| Status | Meaning |
|---|---|
200 | Template found. |
404 | Template directory does not exist on this node. |
401 | Unauthorized. |
GET /api/templates///files
Lists all files within the template directory as an array of relative paths. Authentication: ALL permission required. Path ParametersTemplate group.
Template name.
The template group.
The template name.
Array of relative file paths within the template directory (e.g.,
["server.properties", "plugins/Universe/config.yml"]).| Status | Meaning |
|---|---|
200 | File list returned. |
401 | Unauthorized. |
GET /api/templates///files/
Returns the raw text content of a single file within the template. Responds withtext/plain.
Authentication: ALL permission required.
Path Parameters
Template group.
Template name.
Relative path to the file within the template directory (e.g.,
server.properties, plugins/Universe/config.yml). Supports nested paths — Ktor captures all remaining path segments.text/plain.
| Status | Meaning |
|---|---|
200 | File content returned as plain text. |
404 | File does not exist. |
401 | Unauthorized. |
PATCH /api/templates///files/
Overwrites the content of an existing file in a local template (storage keylocal). The request body must be text/plain.
Authentication: ALL permission required.
Path Parameters
Template group.
Template name.
Relative path of the file to update.
| Status | Meaning |
|---|---|
200 | File written successfully. |
500 | Write failed (check node permissions). |
401 | Unauthorized. |
POST /api/templates///files/
Creates a new file in the template. Fails with409 if the file already exists. Accepts any content type — use application/octet-stream for binary files such as JARs, images, or compressed archives.
Authentication: ALL permission required.
Path Parameters
Template group.
Template name.
Relative path for the new file. Intermediate directories are created automatically.
- Text file
- Binary / JAR file
| Status | Meaning |
|---|---|
201 | File created. |
409 | File already exists. Use PATCH to update it. |
401 | Unauthorized. |
DELETE /api/templates///files/
Deletes a file from the template directory. Authentication: ALL permission required. Path ParametersTemplate group.
Template name.
Relative path of the file to delete.
| Status | Meaning |
|---|---|
200 | File deleted. |
500 | Delete failed. |
401 | Unauthorized. |
POST /api/templates///export
Exports the entire template directory as a.zip archive. The response is application/zip with a Content-Disposition: attachment header so browsers download it directly.
Authentication: ALL permission required.
Path Parameters
Template group.
Template name.
Content-Disposition header will be attachment; filename="server-base.zip".
| Status | Meaning |
|---|---|
200 | Zip archive streamed. |
404 | Template not found. |
401 | Unauthorized. |
POST /api/templates///import
Imports a template from a zip archive, overwriting any existing files in the template directory. The request body must beapplication/zip.
Authentication: ALL permission required.
Path Parameters
Template group to import into.
Template name to import into.
| Status | Meaning |
|---|---|
200 | Import succeeded. |
500 | Import failed (check zip format). |
401 | Unauthorized. |
POST /api/templates///sync
Downloads the latest version of a specific template from a registered remote storage provider and writes it to the local template directory. Authentication: ALL permission required. Path ParametersTemplate group.
Template name.
Key of the registered storage provider to pull from (e.g.,
s3, ftp). Must match a provider registered via the TemplateStorageRegistry.| Status | Meaning |
|---|---|
200 | Sync succeeded. |
400 | Storage provider key not found. |
500 | Sync failed. |
401 | Unauthorized. |
POST /api/templates/sync
Dispatches a cluster-wide template sync task via Hazelcast. Thepattern field supports glob-style matching to sync all matching templates across nodes.
Authentication: ALL permission required.
Request Body
Template sync pattern. Examples:
default/* (all templates in the default group), server/base (a specific template), * (all templates).| Status | Meaning |
|---|---|
200 | Sync task dispatched. |
401 | Unauthorized. |