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.
{
"_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"
]
}
}
Entry properties:
| Field | Type | Description |
|---|---|---|
id | string | Language driver id (for example sql, informer, u2) |
name | string | Display name (for example Native SQL) |
description | string | Short description of the language |
image | string | Icon path |
color | string | Palette color name |
formatInputParams | object | null | Driver input-formatting metadata |
Not every entry populates every field; minimal drivers (for example file,
u2) serialize little more than id.
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:
| Parameter | Type | Description |
|---|---|---|
id | string | Language 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.
{
"_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
}
An unregistered id answers 404.
{
"statusCode": 404,
"error": "Not Found",
"message": "Not Found"
}
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.
{
"_links": {
"self": {
"href": "https://informer.example.com/api/query-templates"
}
},
"items": [],
"start": 0,
"count": 0,
"total": 0
}
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:
| Parameter | Type | Description |
|---|---|---|
id | string | Query 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:
| Parameter | Type | Description |
|---|---|---|
id | string | Query 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.