Skip to main content

Query Languages

Endpoints for discovering the query languages Informer has registered and the query-builder templates available to the caller. A query language is a registered queryLanguage driver; the discovery routes serialize the driver's data properties (not a synthetic capability schema).

These are driver-manager reads and require only a normal authenticated user. Read access on the template catalog is enforced by datasource eligibility (each template requires a query_access datasource of its language), not by a permission.

GET /api/query-languages

List the registered query-language drivers.

Authentication: Required

Response:

A HAL collection embedding the drivers under inf:query-languge (note the rel spelling). Each entry is a driver descriptor carrying its data properties only: the registered ids include sql, informer, web, valueLabel, inQuery, distinctValue, informerGraphql, file, and u2. Driver functions are not serialized, and the internal schema / schemas Joi blobs are omitted from each entry.

List query languagesGET /api/query-languages
HAL collection of the registered `queryLanguage` drivers (embedded as inf:query-languge). Each entry is a driver descriptor (id, name, description, image, color); driver functions are not serialized and the internal schema/schemas blobs are omitted. Real ids include sql, informer, web, valueLabel, inQuery, distinctValue, informerGraphql, file, u2 — not just sql/i5-ql/flow.
Response · 200
{
"_links": {
"self": {
"href": "https://informer.example.com/api/query-languages"
}
},
"start": 0,
"count": 9,
"total": 9,
"_embedded": {
"inf:query-languge": [
{
"_links": {
"self": {
"href": "https://informer.example.com/api/query-languages/file"
}
},
"id": "file",
"formatInputParams": null
},
{
"_links": {
"self": {
"href": "https://informer.example.com/api/query-languages/sql"
}
},
"id": "sql",
"name": "Native SQL",
"description": "A custom SQL statement",
"image": "/images/query/native-sql-query.svg",
"color": "deepPurple",
"formatInputParams": null
},
{
"_links": {
"self": {
"href": "https://informer.example.com/api/query-languages/u2"
}
},
"id": "u2",
"formatInputParams": null
},
"… 6 more items (9 total) — omitted from docs"
]
}
}
Captured from the API examples test suite; ids and timestamps are normalized.

Entry properties:

FieldTypeDescription
idstringLanguage driver id (for example sql, informer, u2)
namestringDisplay name (for example Native SQL)
descriptionstringShort description of the language
imagestringIcon path
colorstringPalette color name
formatInputParamsobject | nullDriver input-formatting metadata

Not every entry populates every field; minimal drivers (for example file, u2) serialize little more than id.

Driver ids, not a fixed set

The language set is whatever drivers are registered, not a fixed sql / i5-ql / flow list. Read the ids from this endpoint rather than hardcoding them.


GET /api/query-languages/{id}

Retrieve a single query-language driver descriptor.

Authentication: Required

Path Parameters:

ParameterTypeDescription
idstringLanguage driver id (for example sql, informer)

Response:

The single driver descriptor with the same shape as a list entry (schema / schemas omitted). There is no version, parameterSyntax, payloadSchema, or documentation envelope.

Get a query languageGET /api/query-languages/sql
Returns a single query-language driver descriptor by id, with the internal schema/schemas joi blobs omitted. There is no version/parameterSyntax/documentation envelope.
Response · 200
{
"_links": {
"self": {
"href": "https://informer.example.com/api/query-languages/sql"
}
},
"id": "sql",
"name": "Native SQL",
"description": "A custom SQL statement",
"image": "/images/query/native-sql-query.svg",
"color": "deepPurple",
"formatInputParams": null
}
Captured from the API examples test suite; ids and timestamps are normalized.

An unregistered id answers 404.

Get an unknown query languageGET /api/query-languages/no-such-language
An unregistered language id 404s (boom.notFound).
Response · 404
{
"statusCode": 404,
"error": "Not Found",
"message": "Not Found"
}
Captured from the API examples test suite; ids and timestamps are normalized.

GET /api/query-templates

List the query-builder templates available to the caller.

Authentication: Required

Response:

This route is the query-builder:global discovery result: each registered builder contributes a template descriptor (group, name, language, editor component, and related metadata). Every builder is gated by an eligible (query_access) datasource of its language, so the catalog reflects only the templates the caller can actually start. On a tenant with no datasources the catalog is empty.

List query templatesGET /api/query-templates
GET /api/query-templates is the `query-builder:global` Agency .discover(req) result: a FLAT array of { detective, id, value } rows (each value a builder descriptor), NOT a paged inf:query-template collection. Every registered builder is gated by an eligible (query_access) datasource of its language, so on a tenant with no datasources the array is empty.
Response · 200
{
"_links": {
"self": {
"href": "https://informer.example.com/api/query-templates"
}
},
"items": [],
"start": 0,
"count": 0,
"total": 0
}
Captured from the API examples test suite; ids and timestamps are normalized.
Eligibility-scoped catalog

Templates appear only when the tenant has an eligible datasource of the template's language. An empty items array means no eligible datasource exists yet, not that templates are unavailable in the product.


GET /api/queries/{id}/query-string

Get the compiled query string (datasource-specific SQL representation) for a saved query.

Authentication: Required

Path Parameters:

ParameterTypeDescription
idstringQuery id

Response:

The query is compiled to a string by its datasource driver (query.toQueryString() delegates to datasource.queryToString(query)), so the output depends on the bound datasource and the language. This route needs a saved Query bound to a working datasource driver and is not captured here.


GET /api/queries/{id}/discover

Discover the datasource fields available to a saved query.

Authentication: Required

Path Parameters:

ParameterTypeDescription
idstringQuery id

Response:

Returns the fields available for the query's datasource. This route requires a saved Query bound to a working datasource driver and is not captured here.