Skip to main content

Processors

Endpoints for discovering processor drivers and managing the processors attached to a Template. Processors supply dynamic data to a Template during rendering, drawing from sources such as the current User, Datasets, native SQL or Elasticsearch queries, Power Scripts, and AI Assistants.

Every route on this page requires the templates license feature. The collection and lookup routes resolve the Template through the read_access scope (template.lookup(params.id)), so a Template the caller cannot see returns 404. {id} may be the Template uuid or its natural id (ownerId:slug). Mutating routes additionally require a Template-level permission, called out per endpoint below.

Processor phases

A processor runs in one of three phases during rendering, recorded in its phase field:

  • data - fetch data before the Template executes (the default and most common phase)
  • pre - pre-process the context before Template execution
  • post - post-process the output after Template execution

A processor's type is the id of its processor driver (see the discovery endpoints below). Common types include current-user, dataset, dataset-search, sql-query, power-script, adhoc, and assistant-prompt.


GET /api/processor-drivers

Discover the processor drivers available to the caller.

Authentication: Required

Response:

A HAL collection embedding inf:processor-driver, not raw Joi schemas. The list is filtered by each driver's isEligible(req): adhoc, current-user, dataset, dataset-search, power-script, and sql-query are always eligible, while assistant-prompt appears only when AI is enabled on the tenant. Each driver carries display metadata (name, description, icon, image) and the client component names used to create and edit a processor of that type.

Discover processor driversGET /api/processor-drivers
GET /api/processor-drivers returns a HAL collection embedding inf:processor-driver, filtered by each driver’s isEligible(req). Always-eligible: adhoc, current-user, dataset, dataset-search, power-script, sql-query. assistant-prompt appears only when AI is enabled on the tenant. Requires the `templates` license feature.
Response · 200
{
"_links": {
"self": {
"href": "https://informer.example.com/api/processor-drivers"
}
},
"start": 0,
"count": 6,
"total": 6,
"_embedded": {
"inf:processor-driver": [
{
"_links": {
"self": {
"href": "https://informer.example.com/api/processor-drivers/adhoc"
}
},
"id": "adhoc",
"name": "Ad hoc Query",
"description": "Add an Ad hoc Query to the Template, binding input parameters",
"image": "/images/icons/query.svg",
"createComponent": "adhocProcessorForm",
"settingsComponent": "adhocProcessorForm",
"editComponent": "adhocProcessorTab",
"openOnCreate": true,
"icon": "flaticon-query"
},
{
"_links": {
"self": {
"href": "https://informer.example.com/api/processor-drivers/current-user"
}
},
"id": "current-user",
"name": "Current User",
"description": "Adds the current User and Session running the Template to the context.",
"image": "/images/icons/user.svg",
"createComponent": "currentUserProcessorComponent",
"openOnCreate": false,
"icon": "fas fa-user",
"editComponent": "current-userTemplateProcessor",
"settingsComponent": "current-userTemplateProcessor"
},
{
"_links": {
"self": {
"href": "https://informer.example.com/api/processor-drivers/dataset"
}
},
"id": "dataset",
"name": "Dataset",
"description": "Add a Dataset reference as a context variable, optionally including records",
"image": "/images/icons/dataset.svg",
"createComponent": "datasetTemplateProcessorForm",
"editComponent": "datasetTemplateProcessorTab",
"openOnCreate": true,
"icon": "far fa-file-search",
"settingsComponent": "datasetTemplateProcessor"
},
"… 3 more items (6 total) — omitted from docs"
]
}
}
Captured from the API examples test suite; ids and timestamps are normalized.

GET /api/processor-templates

Discover pre-configured processor recipes ("processor templates").

Authentication: Required

Response:

A HAL doc built from the template-processor-builder driver manager's discover output. Each items entry pairs display metadata with a processor stub (carrying the type) that seeds a new processor. The collection is empty when no processor-template builders are registered for the tenant.

Discover processor templatesGET /api/processor-templates
GET /api/processor-templates is a HAL doc built from the template-processor-builder driver manager’s discover output (pre-configured processor recipes). Empty when no processor-template builders are registered for the tenant.
Response · 200
{
"_links": {
"self": {
"href": "https://informer.example.com/api/processor-templates"
}
},
"items": [
{
"detective": "00000000-0000-4000-8000-000000000001",
"id": "00000000-0000-4000-8000-000000000001:0",
"value": {
"id": "adhoc",
"name": "Ad hoc Query",
"description": "Add an Ad hoc Query to the Template, binding input parameters",
"image": "/images/icons/query.svg",
"createComponent": "adhocProcessorForm",
"settingsComponent": "adhocProcessorForm",
"editComponent": "adhocProcessorTab",
"openOnCreate": true,
"icon": "flaticon-query",
"group": "__top",
"processor": {
"type": "adhoc"
}
}
},
{
"detective": "00000000-0000-4000-8000-000000000002",
"id": "00000000-0000-4000-8000-000000000002:0",
"value": {
"id": "current-user",
"name": "Current User",
"description": "Adds the current User and Session running the Template to the context.",
"image": "/images/icons/user.svg",
"createComponent": "currentUserProcessorComponent",
"openOnCreate": false,
"icon": "fas fa-user",
"editComponent": "current-userTemplateProcessor",
"settingsComponent": "current-userTemplateProcessor",
"group": "__top",
"processor": {
"type": "current-user"
}
}
},
{
"detective": "00000000-0000-4000-8000-000000000003",
"id": "00000000-0000-4000-8000-000000000003:0",
"value": {
"id": "dataset",
"name": "Dataset",
"description": "Add a Dataset reference as a context variable, optionally including records",
"image": "/images/icons/dataset.svg",
"createComponent": "datasetTemplateProcessorForm",
"editComponent": "datasetTemplateProcessorTab",
"openOnCreate": true,
"icon": "far fa-file-search",
"settingsComponent": "datasetTemplateProcessor",
"group": "__top",
"processor": {
"type": "dataset"
}
}
},
"… 4 more items (7 total) — omitted from docs"
],
"start": 0,
"count": 7,
"total": 7
}
Captured from the API examples test suite; ids and timestamps are normalized.

GET /api/templates/{id}/processors

List a Template's processors, ordered by index.

Authentication: Required

Pre-blocks: template.lookup(params.id)

Response:

A HAL collection embedding the Template's processors as inf:template-processor. Each row carries its type, name, index, phase, and data, plus the nullable source ids (datasetId, queryId, datasourceId, assistantId) and their eager-loaded relations (dataset, query, datasource, assistant), which are null when unset.

List a template’s processorsGET /api/templates/00000000-0000-4000-8000-000000000001/processors
GET /api/templates/{id}/processors returns a HAL collection of the template’s processors embedded as inf:template-processor, ordered by `index`. `{id}` may be the template uuid or its natural id (ownerId:slug). Requires the `templates` feature; the template is resolved through read_access (404 if not visible).
Response · 200
{
"_links": {
"self": {
"href": "https://informer.example.com/api/templates/00000000-0000-4000-8000-000000000001/processors"
}
},
"start": 0,
"count": 3,
"total": 3,
"_embedded": {
"inf:template-processor": [
{
"_links": {
"self": {
"href": "https://informer.example.com/api/templates/00000000-0000-4000-8000-000000000001/processors/00000000-0000-4000-8000-000000000002"
}
},
"label": "currentUser",
"tenant": "acme",
"id": "00000000-0000-4000-8000-000000000002",
"type": "current-user",
"name": "currentUser",
"templateId": "00000000-0000-4000-8000-000000000001",
"datasetId": null,
"queryId": null,
"datasourceId": null,
"assistantId": null,
"index": 0,
"phase": "data",
"data": {},
"createdAt": "2026-01-15T16:20:00.000Z",
"updatedAt": "2026-01-15T16:20:00.000Z",
"assistant": null,
"dataset": null,
"query": null,
"datasource": null
},
{
"_links": {
"self": {
"href": "https://informer.example.com/api/templates/00000000-0000-4000-8000-000000000001/processors/00000000-0000-4000-8000-000000000003"
}
},
"label": "totals",
"tenant": "acme",
"id": "00000000-0000-4000-8000-000000000003",
"type": "power-script",
"name": "totals",
"templateId": "00000000-0000-4000-8000-000000000001",
"datasetId": null,
"queryId": null,
"datasourceId": null,
"assistantId": null,
"index": 1,
"phase": "data",
"data": {
"script": "return { total: 0 };"
},
"createdAt": "2026-01-15T16:20:00.000Z",
"updatedAt": "2026-01-15T16:20:00.000Z",
"assistant": null,
"dataset": null,
"query": null,
"datasource": null
},
{
"_links": {
"self": {
"href": "https://informer.example.com/api/templates/00000000-0000-4000-8000-000000000001/processors/00000000-0000-4000-8000-000000000004"
}
},
"label": "scratch",
"tenant": "acme",
"id": "00000000-0000-4000-8000-000000000004",
"type": "current-user",
"name": "scratch",
"templateId": "00000000-0000-4000-8000-000000000001",
"datasetId": null,
"queryId": null,
"datasourceId": null,
"assistantId": null,
"index": 2,
"phase": "data",
"data": {},
"createdAt": "2026-01-15T16:20:00.000Z",
"updatedAt": "2026-01-15T16:20:00.000Z",
"assistant": null,
"dataset": null,
"query": null,
"datasource": null
}
]
}
}
Captured from the API examples test suite; ids and timestamps are normalized.

POST /api/templates/{id}/processors

Add a processor to a Template.

Authentication: Required

Pre-blocks: template.lookup(params.id), permission.template.write(pre.template)

Request Body:

FieldTypeRequiredDescription
typestringYesProcessor driver id (see GET /api/processor-drivers)
namestringNoVariable name for the Template context
datasetIdstringNoDataset id (for a dataset processor)
datasourceIdstringNoDatasource id (for a datasource-backed processor)
assistantIdstringNoAssistant id (for an assistant-prompt processor)
reportIdstringNoReport id
queryIdstringNoQuery id
dataobjectNoProcessor-specific configuration

The index is server-assigned to the current processor count, so a new processor is appended to the end. phase is not accepted on create; set it later with a PUT.

Example Request:

{
"type": "power-script",
"name": "subtotal",
"data": {
"script": "return { subtotal: 0 };"
}
}

Response:

Responds 201 Created with the new processor and a Location header. The fresh row reports phase: null until it is set via PUT.

Add a processor to a templatePOST /api/templates/00000000-0000-4000-8000-000000000001/processors
POST /api/templates/{id}/processors. Payload is { type (required), name?, datasetId?, datasourceId?, assistantId?, reportId?, queryId?, data? }. `index` is server-assigned to the current processor count; `phase` is NOT accepted here (set it via PUT). Requires permission.template.write. Responds 201 with a Location header.
Request body
{
"type": "power-script",
"name": "subtotal",
"data": {
"script": "return { subtotal: 0 };"
}
}
Response · 201
{
"_links": {
"self": {
"href": "https://informer.example.com/api/templates/00000000-0000-4000-8000-000000000001/processors/00000000-0000-4000-8000-000000000002"
}
},
"label": "subtotal",
"tenant": "acme",
"id": "00000000-0000-4000-8000-000000000002",
"type": "power-script",
"name": "subtotal",
"data": {
"script": "return { subtotal: 0 };"
},
"templateId": "00000000-0000-4000-8000-000000000001",
"index": 3,
"updatedAt": "2026-01-15T16:20:00.000Z",
"createdAt": "2026-01-15T16:20:00.000Z",
"datasetId": null,
"queryId": null,
"datasourceId": null,
"phase": null,
"assistantId": null
}
Captured from the API examples test suite; ids and timestamps are normalized.

GET /api/templates/{id}/processors/{processor}

Retrieve a single processor.

Authentication: Required

Pre-blocks: template.lookup(params.id)

Response:

The processor row. inf:datasource, inf:dataset, and inf:query are embedded only when the matching id is set on the processor; there is no inf:assistant embed.

Get a processorGET /api/templates/00000000-0000-4000-8000-000000000001/processors/00000000-0000-4000-8000-000000000002
GET /api/templates/{id}/processors/{processor} returns one processor. inf:datasource / inf:dataset / inf:query are embedded only when the matching id is set on the processor.
Response · 200
{
"_links": {
"self": {
"href": "https://informer.example.com/api/templates/00000000-0000-4000-8000-000000000001/processors/00000000-0000-4000-8000-000000000002"
}
},
"label": "subtotal",
"tenant": "acme",
"id": "00000000-0000-4000-8000-000000000002",
"type": "power-script",
"name": "subtotal",
"templateId": "00000000-0000-4000-8000-000000000001",
"datasetId": null,
"queryId": null,
"datasourceId": null,
"assistantId": null,
"index": 3,
"phase": null,
"data": {
"script": "return { subtotal: 0 };"
},
"createdAt": "2026-01-15T16:20:00.000Z",
"updatedAt": "2026-01-15T16:20:00.000Z",
"assistant": null,
"dataset": null,
"query": null,
"datasource": null
}
Captured from the API examples test suite; ids and timestamps are normalized.

PUT /api/templates/{id}/processors/{processor}

Update a processor's configuration.

Authentication: Required

Pre-blocks: template.lookup(params.id), permission.template.write(pre.template)

Request Body:

The payload is stripUnknown, so unrecognized fields are dropped. Every field is nullable.

FieldTypeDescription
namestring | nullVariable name for the Template context
dataobject | nullProcessor-specific configuration
typestring | nullProcessor driver id
datasetIdstring | nullDataset id
queryIdstring | nullQuery id
datasourceIdstring | nullDatasource id
assistantIdstring | nullAssistant id
indexnumber | nullExecution order
phasestring | nullExecution phase: data, pre, or post

reportId is not a PUT field (it is accepted only on create).

Example Request:

{
"name": "subtotal",
"phase": "pre",
"data": {
"script": "return { subtotal: 100 };"
}
}

Response:

Responds 200 with the updated processor.

Update a processorPUT /api/templates/00000000-0000-4000-8000-000000000001/processors/00000000-0000-4000-8000-000000000002
PUT /api/templates/{id}/processors/{processor}. Payload is { name?, data?, type?, datasetId?, queryId?, datasourceId?, assistantId?, index?, phase? } (all nullable) with stripUnknown. `reportId` is NOT a PUT field. Requires permission.template.write. Returns the updated processor.
Request body
{
"name": "subtotal",
"phase": "pre",
"data": {
"script": "return { subtotal: 100 };"
}
}
Response · 200
{
"_links": {
"self": {
"href": "https://informer.example.com/api/templates/00000000-0000-4000-8000-000000000001/processors/00000000-0000-4000-8000-000000000002"
}
},
"label": "subtotal",
"tenant": "acme",
"id": "00000000-0000-4000-8000-000000000002",
"type": "power-script",
"name": "subtotal",
"templateId": "00000000-0000-4000-8000-000000000001",
"datasetId": null,
"queryId": null,
"datasourceId": null,
"assistantId": null,
"index": 3,
"phase": "pre",
"data": {
"script": "return { subtotal: 100 };"
},
"createdAt": "2026-01-15T16:20:00.000Z",
"updatedAt": "2026-01-15T16:20:00.000Z",
"assistant": null,
"dataset": null,
"query": null,
"datasource": null
}
Captured from the API examples test suite; ids and timestamps are normalized.

POST /api/templates/{id}/_processor-order

Reorder a Template's processors by updating their index values.

Authentication: Required

Pre-blocks: template.lookup(params.id), permission.template.write(pre.template)

Request Body:

An object with a processors array, not a bare array of ids. Each entry updates one processor's index.

FieldTypeRequiredDescription
processorsarrayYesProcessors to reorder
processors[].idstringYesProcessor id
processors[].indexnumberNoNew execution order
processors[].namestringNoProcessor name

Each row's index is updated inside a deferred transaction.

Example Request:

{
"processors": [
{ "id": "00000000-0000-4000-8000-000000000002", "index": 0 },
{ "id": "00000000-0000-4000-8000-000000000003", "index": 1 }
]
}

Response:

Responds 200 with an empty body.

Reorder a template’s processorsPOST /api/templates/00000000-0000-4000-8000-000000000001/_processor-order
POST /api/templates/{id}/_processor-order. Payload is { processors: [{ id (required), name?, index }] } — an OBJECT with a `processors` array, NOT a bare array of ids. Each row’s `index` is updated inside a deferred transaction. Requires permission.template.write. Resolves with an empty body (200).
Request body
{
"processors": [
{
"id": "00000000-0000-4000-8000-000000000002",
"index": 0
},
{
"id": "00000000-0000-4000-8000-000000000003",
"index": 1
}
]
}
Response · 200 · no body
Captured from the API examples test suite; ids and timestamps are normalized.

DELETE /api/templates/{id}/processors/{processor}

Remove a processor from a Template.

Authentication: Required

Pre-blocks: template.lookup(params.id), permission.template.edit(pre.template)

Response:

Responds 200 with an empty body. Deletion cascades any embedded Dataset the processor created.

Delete a processorDELETE /api/templates/00000000-0000-4000-8000-000000000001/processors/00000000-0000-4000-8000-000000000002
DELETE /api/templates/{id}/processors/{processor} removes the processor (db.remove inside a transaction) and cascades any embedded dataset it created. Requires permission.template.edit. Returns 200 with an EMPTY body (Informer convention), NOT 204 No Content.
Response · 200 · no body
Captured from the API examples test suite; ids and timestamps are normalized.
Empty 200, not 204

This route resolves with an empty body and a 200 status (the Informer db.remove convention), not 204 No Content.