Skip to main content

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

    deviceId string

    Filter by a single device ID

    groups string[]

    Filter by one or more groups. A group encapsulates multiple topics.

    topics string[]

    Filter by one or more topics (within the selected groups when provided).

    levels string[]

    Possible values: [DEBUG, INFO, WARN, ERROR, FATAL]

    Filter by one or more log levels

    from string

    Start of the time range (ISO 8601). Defaults to 1 hour ago.

    to string

    End of the time range (ISO 8601). Defaults to now.

    search string

    Free-text search over the log message

    limit number

    Max number of logs to return (default 100, max 1000)

    offset number

    Number of logs to skip for pagination (default 0)

Responses​

Schema

    total numberrequired

    Total number of logs matching the filters (ignoring pagination)

    logs

    object[]

    required

    Matching log entries, most recent first

  • Array [

  • logId stringrequired

    Unique identifier of the log entry

    deviceId stringrequired

    Device identifier that generated/forwarded the log

    group string

    Group the log belongs to (encapsulates multiple topics)

    topic stringrequired

    Topic/source of the log (e.g., agent, app-name)

    timestamp stringrequired

    Timestamp when the log was generated (ISO 8601)

    level stringrequired

    Possible values: [DEBUG, INFO, WARN, ERROR, FATAL]

    Log severity level

    message stringrequired

    Log message content

    metadata object

    Additional metadata as key-value pairs

  • ]

Loading...