Query Agent Logs
GET/api/v2/telemetry/logs
Retrieves collected agent logs from Elasticsearch, filtered by device, groups, topics, levels, free text and time range. Intended to back log dashboards in the UI.
Request
Query Parameters
Filter by a single device ID
Filter by one or more groups. A group encapsulates multiple topics.
Filter by one or more topics (within the selected groups when provided).
Possible values: [DEBUG, INFO, WARN, ERROR, FATAL]
Filter by one or more log levels
Start of the time range (ISO 8601). Defaults to 1 hour ago.
End of the time range (ISO 8601). Defaults to now.
Free-text search over the log message
Max number of logs to return (default 100, max 1000)
Number of logs to skip for pagination (default 0)
Responses
- 200
- application/json
- Schema
- Example (from schema)
Schema
Array [
]
Total number of logs matching the filters (ignoring pagination)
logs
object[]
required
Matching log entries, most recent first
Unique identifier of the log entry
Device identifier that generated/forwarded the log
Group the log belongs to (encapsulates multiple topics)
Topic/source of the log (e.g., agent, app-name)
Timestamp when the log was generated (ISO 8601)
Possible values: [DEBUG, INFO, WARN, ERROR, FATAL]
Log severity level
Log message content
Additional metadata as key-value pairs
{
"total": 0,
"logs": [
{
"logId": "string",
"deviceId": "string",
"group": "string",
"topic": "string",
"timestamp": "string",
"level": "DEBUG",
"message": "string",
"metadata": {}
}
]
}