template
El dominio template tiene 15 acciones. En la superficie meta se alcanzan todas a través de arcane_template; en la individual, cada una es una herramienta propia; en la dinámica se ejecutan con arcane_execute_action y el ID canónico.
Resumen
Sección titulada «Resumen»| Acción | Título | Tipo |
|---|---|---|
template.content | Get template content | lectura |
template.create | Create a template | escritura |
template.default_get | Get default templates | lectura |
template.default_save | Save default templates | destructiva |
template.delete | Delete a template | destructiva |
template.download | Download a template | escritura |
template.get | Get a template | lectura |
template.list | List templates (paginated) | lectura |
template.list_all | List all templates | lectura |
template.registry_create | Create a template registry | escritura |
template.registry_delete | Delete a template registry | destructiva |
template.registry_fetch | Fetch remote registry | lectura |
template.registry_list | List template registries | lectura |
template.registry_update | Update a template registry | escritura |
template.update | Update a template | escritura |
Acciones
Sección titulada «Acciones»template.content
Sección titulada «template.content»Get template content
Get the compose content for a template with parsed data
- Tipo: lectura
- Parámetros obligatorios:
id - Meta-herramienta:
arcane_templatecon"action": "content" - Herramienta individual:
arcane_template_content - Ruta de Arcane:
GET /api/templates/{id}/content - ID de operación:
getTemplateContent - Uso: id from template.list or template.list_all, local or remote. For a remote template Arcane fetches the compose (and env) file from its registry URLs now. Returns template, content (compose YAML), envContent, services (service names), envVariables (key/value from the env file) and isFolderTemplate (true when the template lives in a folder of the templates directory, whose name and description template.update keeps): the compose and env text to pass to project.create.
- Acciones relacionadas:
template.list,template.get,project.create
template.create
Sección titulada «template.create»Create a template
Create a new compose template
- Tipo: escritura
- Parámetros obligatorios:
content,description,envContent,name - Meta-herramienta:
arcane_templatecon"action": "create" - Herramienta individual:
arcane_template_create - Ruta de Arcane:
POST /api/templates - ID de operación:
createTemplate - Uso: Saves a custom compose template in Arcane’s database (not as a folder in the templates directory). name and content (compose YAML) are needed and description and envContent must be sent too, as "" when unused. Returns the template with its new id, used by template.get, template.update and template.delete.
- Acciones relacionadas:
template.get,template.list,template.update,template.default_get
template.default_get
Sección titulada «template.default_get»Get default templates
Get the default compose and env templates
- Tipo: lectura
- Parámetros obligatorios: ninguno
- Meta-herramienta:
arcane_templatecon"action": "default_get" - Herramienta individual:
arcane_template_default_get - Ruta de Arcane:
GET /api/templates/default - ID de operación:
getDefaultTemplates - Uso: Returns the starting files Arcane’s UI pre-fills for a new project (composeTemplate, envTemplate) and a new Swarm stack (swarmStackTemplate, swarmStackEnvTemplate), read from the .compose.template, .env.template and .swarm-stack*.template files in the templates directory. Read it before template.default_save, which replaces the compose and env pair.
- Acciones relacionadas:
template.default_save,template.list
template.default_save
Sección titulada «template.default_save»Save default templates
Save the default compose and env templates
- Tipo: destructiva — exige
confirm: true - Parámetros obligatorios:
composeContent,envContent - Meta-herramienta:
arcane_templatecon"action": "default_save" - Herramienta individual:
arcane_template_default_save - Ruta de Arcane:
POST /api/templates/default - ID de operación:
saveDefaultTemplates - Uso: Overwrites the default new-project files .compose.template and .env.template in the templates directory with composeContent and envContent. Both are written as given, so send envContent too ("" empties it). The Swarm stack defaults are not changed by this action. Fetch the current values with template.default_get first to edit rather than replace.
- Acciones relacionadas:
template.default_get
template.delete
Sección titulada «template.delete»Delete a template
Delete a compose template
- Tipo: destructiva — exige
confirm: true - Parámetros obligatorios:
id - Meta-herramienta:
arcane_templatecon"action": "delete" - Herramienta individual:
arcane_template_delete - Ruta de Arcane:
DELETE /api/templates/{id} - ID de operación:
deleteTemplate - Uso: id of a local template from template.list. Remote registry templates cannot be deleted (404), so remove their registry with template.registry_delete instead. For a downloaded or folder-imported template (description ‘Imported from <path>’) it also deletes its folder in the templates directory, which is how such templates are removed for good. A template.create template that only shares its name with a folder leaves that folder alone. Projects created from the template are not affected.
- Acciones relacionadas:
template.list,template.get,template.registry_delete
template.download
Sección titulada «template.download»Download a template
Download a remote template to local storage
- Tipo: escritura
- Parámetros obligatorios:
id - Meta-herramienta:
arcane_templatecon"action": "download" - Herramienta individual:
arcane_template_download - Ruta de Arcane:
POST /api/templates/{id}/download - ID de operación:
downloadTemplate - Uso: Copies a remote template (id remote:<registry>:<template>, from template.list_all) into a local custom template, writing its compose and env files to a folder in the templates directory. Downloading it again updates the same local copy. Returns the local template with a new id and its content. It fails if the template’s compose_url cannot be fetched and needs templates:create (it writes a template), not just read access.
- Acciones relacionadas:
template.list_all,template.get,template.content
template.get
Sección titulada «template.get»Get a template
Get a compose template by ID
- Tipo: lectura
- Parámetros obligatorios:
id - Meta-herramienta:
arcane_templatecon"action": "get" - Herramienta individual:
arcane_template_get - Ruta de Arcane:
GET /api/templates/{id} - ID de operación:
getTemplate - Uso: id from template.list or template.list_all. A local template returns its stored content and envContent. A remote one (id remote:…) returns only name, description, registry and metadata (remoteUrl, envUrl, tags) with empty content, so use template.content for the compose text. 404 if the id is unknown.
- Acciones relacionadas:
template.list,template.content,template.update,template.delete
template.list
Sección titulada «template.list»List templates (paginated)
Get a paginated list of compose templates
- Tipo: lectura
- Parámetros obligatorios: ninguno
- Meta-herramienta:
arcane_templatecon"action": "list" - Herramienta individual:
arcane_template_list - Ruta de Arcane:
GET /api/templates - ID de operación:
listTemplatesPaginated - Uso: A page of local and remote templates (id, name, description, isCustom, isRemote, registryId, metadata) plus pagination. Content fields are left empty, so read them with template.get or template.content. search matches name, description and metadata tags. type=false keeps only local templates, type=true only remote registry templates (id remote:<registryId>:<slug>). Sort by name, description or isRemote. Paginate with start and limit (default 20).
- Acciones relacionadas:
template.list_all,template.get,template.content,template.registry_list
template.list_all
Sección titulada «template.list_all»List all templates
Get all compose templates without pagination
- Tipo: lectura
- Parámetros obligatorios: ninguno
- Meta-herramienta:
arcane_templatecon"action": "list_all" - Herramienta individual:
arcane_template_list_all - Ruta de Arcane:
GET /api/templates/all - ID de operación:
getAllTemplates - Uso: Every template in one unpaginated array: local ones (custom, downloaded, and folders found in the templates directory) and the remote templates of all enabled registries (isRemote true, id remote:<registryId>:<slug>), without content. A registry that cannot be fetched is skipped silently, and its error shows as lastFetchError in template.registry_list. Use template.list to search or page.
- Acciones relacionadas:
template.list,template.content,template.download,template.registry_list
template.registry_create
Sección titulada «template.registry_create»Create a template registry
Create a new template registry
- Tipo: escritura
- Parámetros obligatorios:
description,enabled,name,url - Meta-herramienta:
arcane_templatecon"action": "registry_create" - Herramienta individual:
arcane_template_registry_create - Ruta de Arcane:
POST /api/templates/registries - ID de operación:
createTemplateRegistry - Uso: Adds a registry: url of a JSON manifest {name, description, templates:[{id, name, compose_url, env_url, …}]}. name, description and enabled must be sent, and an empty name or description is filled from the manifest (the create then fails if the manifest cannot be fetched). Arcane only fetches public addresses, so a URL resolving to a private or loopback address never yields templates. Its templates then appear in template.list_all as remote templates. Check the URL first with template.registry_fetch.
- Acciones relacionadas:
template.registry_fetch,template.registry_list,template.list_all
template.registry_delete
Sección titulada «template.registry_delete»Delete a template registry
- Tipo: destructiva — exige
confirm: true - Parámetros obligatorios:
id - Meta-herramienta:
arcane_templatecon"action": "registry_delete" - Herramienta individual:
arcane_template_registry_delete - Ruta de Arcane:
DELETE /api/templates/registries/{id} - ID de operación:
deleteTemplateRegistry - Uso: id from template.registry_list. Removes the registry so its remote templates disappear from template.list_all, and local copies made with template.download are kept. Use template.registry_update with enabled=false to hide it temporarily instead.
- Acciones relacionadas:
template.registry_list,template.registry_update
template.registry_fetch
Sección titulada «template.registry_fetch»Fetch remote registry
Fetch templates from a remote registry URL
- Tipo: lectura
- Parámetros obligatorios:
url - Meta-herramienta:
arcane_templatecon"action": "registry_fetch" - Herramienta individual:
arcane_template_registry_fetch - Ruta de Arcane:
GET /api/templates/fetch - ID de operación:
fetchTemplateRegistry - Uso: Fetches and returns a registry manifest (name, description, version, author, templates with compose_url, env_url, tags) without saving anything, to check a URL before template.registry_create. The URL must resolve to a public address, and any fetch or JSON failure comes back as a bare 502 without the reason.
- Acciones relacionadas:
template.registry_create,template.registry_list
template.registry_list
Sección titulada «template.registry_list»List template registries
Get all template registries
- Tipo: lectura
- Parámetros obligatorios: ninguno
- Meta-herramienta:
arcane_templatecon"action": "registry_list" - Herramienta individual:
arcane_template_registry_list - Ruta de Arcane:
GET /api/templates/registries - ID de operación:
getTemplateRegistries - Uso: Lists the configured template registries (id, name, url, description, enabled). lastFetchError is set when the last attempt to load that registry’s templates failed (for example a private-address URL or invalid JSON). The id is what template.registry_update and template.registry_delete take and what remote template ids embed (remote:<registryId>:<slug>).
- Acciones relacionadas:
template.registry_create,template.registry_update,template.registry_delete,template.list_all
template.registry_update
Sección titulada «template.registry_update»Update a template registry
Update an existing template registry
- Tipo: escritura
- Parámetros obligatorios:
id,description,enabled,name,url - Meta-herramienta:
arcane_templatecon"action": "registry_update" - Herramienta individual:
arcane_template_registry_update - Ruta de Arcane:
PUT /api/templates/registries/{id} - ID de operación:
updateTemplateRegistry - Uso: id from template.registry_list. Replaces name, url, description and enabled together (send all four, enabled=false hides the registry’s templates without deleting it). A blank name or description is refilled from the manifest. Clears the cached remote templates, so template.list_all reloads every registry.
- Acciones relacionadas:
template.registry_list,template.registry_fetch,template.list_all
template.update
Sección titulada «template.update»Update a template
Update an existing compose template
- Tipo: escritura
- Parámetros obligatorios:
id,content,description,envContent,name - Meta-herramienta:
arcane_templatecon"action": "update" - Herramienta individual:
arcane_template_update - Ruta de Arcane:
PUT /api/templates/{id} - ID de operación:
updateTemplate - Uso: id of a local template from template.list (remote ones, id remote:…, return 404). Replaces name, description, content and envContent as a whole: send all four, and envContent "" removes the env file content. For a template backed by a templates-directory folder (downloaded or folder-imported: description ‘Imported from <path>’, isFolderTemplate true in template.content) content and envContent are written to the folder’s files, so the edit lasts, while name and description must be sent unchanged (a changed one fails with 400). A template.create template only changes its database record. Returns the updated template.
- Acciones relacionadas:
template.get,template.list,template.content,template.create