latestOpenAPI 3.1.02026-08-223321,1001.6 MB

2134ebffd1ef

integrations-v3

Test Query

Execute an ad-hoc query against a saved integration.

Used to test connectivity and queries (logs, metrics, traces, …) with the live credentials stored for the instance. The query string is interpreted by the integration in its native language (LogQL, PromQL, TraceQL, …).

Permissions: org admin of the owning org, or platform admin.

Returns HTTP 404 if the instance does not exist, and HTTP 501 if the integration type does not support ad-hoc query execution.

post/v3/integrations/{id}/test-query

Path parameters

idstring required

Request body

querystring required

Source-native query string to execute. LogQL for Loki, PromQL for Mimir, TraceQL for Tempo.

start_timestring date-time nullable

Lower bound of the query time range (ISO-8601). If omitted, defaults to an integration-appropriate window ending at end_time.

end_timestring date-time nullable

Upper bound of the query time range (ISO-8601). If omitted, defaults to the current time.

limitinteger

Maximum number of rows/series/traces to return.

Response

Successful Response

querystring required
messagestring required
result_countinteger required
resultsobject[] required
detailsobject
executed_atstring date-time required