> ## Documentation Index
> Fetch the complete documentation index at: https://docs.vijil.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Logs

> Get logs.



## OpenAPI

````yaml /openapi/api.json get /v1/telemetry/logs
openapi: 3.1.0
info:
  title: Vijil Console API (Combined)
  description: Combined OpenAPI specification for all vijil-console microservices.
  version: 0.1.0
servers: []
security: []
tags:
  - name: Teams
    description: Authentication, users, and team management
  - name: Agent Environment
    description: Agent, persona, policy, and harness management
  - name: Diamond
    description: Evaluation management and report retrieval
  - name: Dome
    description: Protection, guardrails, and telemetry
  - name: Red Team
    description: Red team campaigns
paths:
  /v1/telemetry/logs:
    get:
      tags:
        - Dome
        - Telemetry
      summary: Get Logs
      description: Get logs.
      operationId: get_logs_v1_telemetry_logs_get
      parameters:
        - name: time_range
          in: query
          required: false
          schema:
            enum:
              - 15m
              - 30m
              - 1h
              - 2h
              - 6h
              - 1d
              - 7d
              - 30d
            type: string
            description: Window to pull logs for
            default: 1h
            title: Time Range
          description: Window to pull logs for
        - name: service_name
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Filter by service_name label
            title: Service Name
          description: Filter by service_name label
        - name: level
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Filter by level label
            title: Level
          description: Filter by level label
        - name: job
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Filter by job label
            title: Job
          description: Filter by job label
        - name: exporter
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Filter by exporter label
            title: Exporter
          description: Filter by exporter label
        - name: agent_configuration_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Restrict to a specific agent configuration id
            title: Agent Configuration Id
          description: Restrict to a specific agent configuration id
        - name: evaluation_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Restrict logs to an evaluation id
            title: Evaluation Id
          description: Restrict logs to an evaluation id
        - name: test_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Restrict logs to a test id
            title: Test Id
          description: Restrict logs to a test id
        - name: probe_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Restrict logs to a probe id
            title: Probe Id
          description: Restrict logs to a probe id
        - name: search
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Substring search applied via LogQL pipeline
            title: Search
          description: Substring search applied via LogQL pipeline
        - name: logql
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: >-
              Advanced LogQL expression (overrides generated selector when
              provided)
            title: Logql
          description: >-
            Advanced LogQL expression (overrides generated selector when
            provided)
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 5000
            minimum: 1
            description: Maximum log lines to return
            default: 200
            title: Limit
          description: Maximum log lines to return
        - name: direction
          in: query
          required: false
          schema:
            enum:
              - forward
              - backward
            type: string
            description: Return order for log entries
            default: backward
            title: Direction
          description: Return order for log entries
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LogsQueryResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    LogsQueryResponse:
      properties:
        query:
          type: string
          title: Query
          description: Executed LogQL query
        direction:
          type: string
          enum:
            - forward
            - backward
          title: Direction
          description: Result ordering
        start_ns:
          type: integer
          title: Start Ns
          description: Start window in nanoseconds
        end_ns:
          type: integer
          title: End Ns
          description: End window in nanoseconds
        streams:
          items:
            $ref: '#/components/schemas/LogStreamResponse'
          type: array
          title: Streams
        next_timestamp:
          anyOf:
            - type: integer
            - type: 'null'
          title: Next Timestamp
          description: Bookmark timestamp for pagination
      type: object
      required:
        - query
        - direction
        - start_ns
        - end_ns
      title: LogsQueryResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    LogStreamResponse:
      properties:
        labels:
          additionalProperties:
            type: string
          type: object
          title: Labels
        entries:
          items:
            $ref: '#/components/schemas/LogEntryResponse'
          type: array
          title: Entries
      type: object
      title: LogStreamResponse
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    LogEntryResponse:
      properties:
        timestamp:
          type: integer
          title: Timestamp
          description: Unix timestamp in nanoseconds
        line:
          type: string
          title: Line
          description: Log message
      type: object
      required:
        - timestamp
        - line
      title: LogEntryResponse

````