Skip to content

Examples and template sources ​

Templates to copy from, and where they come from.

GET /v1/examples ​

List the templates people can start a report from.

The templates of every template source that is on (GET /v1/template-sources): the example gallery (examples.gallery) first, then an organisation's own sources in the order they were added, each in its own order. None is installed: POST /v1/examples/{source}/{id}/copy copies one into the catalog. Each has a status by its RFML version: available (the version this installation writes, or an older one the engine reads), too-new or unsupported, which a copy refuses. A source that can't be read is listed in sources as unavailable while the others still list. reportd keeps a remote gallery's index and a repository's listing for an hour, and a failure to read one for five minutes; a folder is read each time.

Parameters

NameInTypeRequiredDescription
sourcequerystringOnly this source's templates.

Responses

StatusDescriptionBody
200The templates, and the sources they came fromobject
404{error: not-found}: no source of that id is on (?source=)
429The request's class is over its rate limit (limits.rate, or the API key's own rateLimits): {error: "rate-limited", class, message, retryAfter}. The MCP tool-call and agent edit limits answer the same body without class.object
503{error: "gallery-off"} when no source is on (examples.gallery is off, and no other source is), or {error: "gallery-unavailable", message, sources} when none of them can be read (no internet access): download an example and import it instead.

200 body (application/json)

FieldTypeRequiredDescription
examplesarray of SourceTemplateyes
sourcesarray of SourceListingyes

GET /v1/examples/{id} ​

Get an example's document and JSON files.

The example gallery's template id, as GET /v1/examples/examples/{id}.

Parameters

NameInTypeRequiredDescription
idpathstringyes

Responses

StatusDescriptionBody
200A template's document and its JSON files (samples, schemas, tests) by pathobject
404The gallery has no such example
429The request's class is over its rate limit (limits.rate, or the API key's own rateLimits): {error: "rate-limited", class, message, retryAfter}. The MCP tool-call and agent edit limits answer the same body without class.object
503The gallery is off or can't be read, as for GET /v1/examples

200 body (application/json)

FieldTypeRequiredDescription
sourcestringyes
idstringyes
titlestringyes
descriptionstringyes
rfmlstringyes
statusavailable, too-new, unsupportedyes
reasonstring
documentDocumentyes
filesobjectyes

POST /v1/examples/{id}/copy ​

Copy an example into the catalog.

The example gallery's template id, as POST /v1/examples/examples/{id}/copy. The draft's edit says "from example <id>".

Parameters

NameInTypeRequiredDescription
idpathstringyes

Request body (application/json)

FieldTypeRequiredDescription
environmentstring
idstring
titlestringSets meta.title; default the template's.
folderstring

Responses

StatusDescriptionBody
201The new report's first draftobject
400The id isn't a template id
404The gallery has no such example
409The id is taken or in the trash, the licence's template limit is reached (licence-limit), or the example needs a newer RFML version (rfml-too-new)
422{error: rfml-unsupported}: the example is of an RFML version this Reportforge can't read
429The request's class is over its rate limit (limits.rate, or the API key's own rateLimits): {error: "rate-limited", class, message, retryAfter}. The MCP tool-call and agent edit limits answer the same body without class.object
503The gallery is off or can't be read, as for GET /v1/examples

201 body (application/json)

FieldTypeRequiredDescription
idstringyes
environmentstringyes
revisionintegeryes
folderstring

GET /v1/examples/{source}/{id} ​

Get a template's document and JSON files.

For its thumbnail and a closer look, whatever its status. Assets aren't included.

Parameters

NameInTypeRequiredDescription
sourcepathstringyesA template source's id; examples is the example gallery
idpathstringyes

Responses

StatusDescriptionBody
200A template's document and its JSON files (samples, schemas, tests) by pathobject
404No source of that id is on, or it has no such template
429The request's class is over its rate limit (limits.rate, or the API key's own rateLimits): {error: "rate-limited", class, message, retryAfter}. The MCP tool-call and agent edit limits answer the same body without class.object
503The source can't be read, as for GET /v1/examples

200 body (application/json)

FieldTypeRequiredDescription
sourcestringyes
idstringyes
titlestringyes
descriptionstringyes
rfmlstringyes
statusavailable, too-new, unsupportedyes
reasonstring
documentDocumentyes
filesobjectyes

POST /v1/examples/{source}/{id}/copy ​

Copy a template into the catalog.

Copies the template's bundle as the first draft of a new report in environment, with the checks POST /v1/templates makes; only the copy counts against the licence's templates, and it isn't linked to its source. Without id, the copy takes its document's id, or the first of <id>-2, <id>-3… that is free.

Its RFML version is checked as GET /v1/examples does: a template that needs a newer version is refused with 409 rfml-too-new, one this Reportforge can't read with 422 rfml-unsupported. One of an older version the engine migrates is stored as the engine migrated it. The draft's edit says where it came from: "from <source name>: <path> @ <commit>" ("from example <id>" for the example gallery), and ", RFML <from> → <to>" when it was migrated.

Parameters

NameInTypeRequiredDescription
sourcepathstringyesA template source's id; examples is the example gallery
idpathstringyes

Request body (application/json)

FieldTypeRequiredDescription
environmentstring
idstring
titlestringSets meta.title; default the template's.
folderstring

Responses

StatusDescriptionBody
201The new report's first draftobject
400The id isn't a template id
404No source of that id is on, or it has no such template
409The id is taken or in the trash, the licence's template limit is reached (licence-limit), or {error: rfml-too-new, message, rfml, needs}: the template needs a newer RFML version, and needs is the first release that writes it, when this one knows
422{error: rfml-unsupported, message, rfml}: an RFML version this Reportforge can't read
429The request's class is over its rate limit (limits.rate, or the API key's own rateLimits): {error: "rate-limited", class, message, retryAfter}. The MCP tool-call and agent edit limits answer the same body without class.object
503The source can't be read, as for GET /v1/examples

201 body (application/json)

FieldTypeRequiredDescription
idstringyes
environmentstringyes
revisionintegeryes
folderstring

GET /v1/template-sources ​

The template sources.

The example gallery (the preset, at examples.gallery's address), then the declared sources in the order they were added, each with what its last read found. Needs templates.sources, which agents never have.

Responses

StatusDescriptionBody
200The sourcesobject
403The caller lacks templates.sources
429The request's class is over its rate limit (limits.rate, or the API key's own rateLimits): {error: "rate-limited", class, message, retryAfter}. The MCP tool-call and agent edit limits answer the same body without class.object

200 body (application/json)

FieldTypeRequiredDescription
sourcesarray of TemplateSourceyes

PUT /v1/template-sources/{id} ​

Add or change a template source, or turn it on or off.

Needs templates.sources. A source other than the preset needs the template-sources licence feature (403 LicenceRequired). The preset takes only enabled. A token is a secret: reference, never a token. Audited as templates.source.add <id> or templates.source.change <id>.

Parameters

NameInTypeRequiredDescription
idpathstringyes

Request body (application/json): TemplateSourceEdit

Responses

StatusDescriptionBody
200The source, changedTemplateSource
201The source, addedTemplateSource
403The caller lacks templates.sources, or no licence grants template-sources (LicenceRequired)
422
429The request's class is over its rate limit (limits.rate, or the API key's own rateLimits): {error: "rate-limited", class, message, retryAfter}. The MCP tool-call and agent edit limits answer the same body without class.object

DELETE /v1/template-sources/{id} ​

Remove a template source.

Needs templates.sources. The preset can't be removed (409 {error: preset}); it can be turned off. Reports copied from the source are untouched. Audited as templates.source.remove <id>.

Parameters

NameInTypeRequiredDescription
idpathstringyes

Responses

StatusDescriptionBody
204Removed
403The caller lacks templates.sources
404No source has the id
409{error: preset}: the preset can't be removed
429The request's class is over its rate limit (limits.rate, or the API key's own rateLimits): {error: "rate-limited", class, message, retryAfter}. The MCP tool-call and agent edit limits answer the same body without class.object

POST /v1/template-sources/{id}/refresh ​

Read a template source again now.

Needs templates.sources. A read that fails still answers 200, with the error in the source's state; a repository read before keeps listing what it read then.

Parameters

NameInTypeRequiredDescription
idpathstringyes

Responses

StatusDescriptionBody
200The source, with what the read foundTemplateSource
403The caller lacks templates.sources, or the source needs a licence with template-sources (LicenceRequired)
404No source has the id
409{error: source-off, off}: the source is off
429The request's class is over its rate limit (limits.rate, or the API key's own rateLimits): {error: "rate-limited", class, message, retryAfter}. The MCP tool-call and agent edit limits answer the same body without class.object