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

# Query a dashboard

> Executes the Prometheus queries defined by a Grafana dashboard, optionally limiting the request to selected panels.



## OpenAPI

````yaml /api/en/monitoring-metrics.yaml post /metrics/dashboards/{dashboardUid}/query
openapi: 3.0.3
info:
  title: Altostrat Monitoring & Metrics API
  version: 1.0.0
  description: >-
    Retrieve portal-facing metrics through the public `/metrics` gateway path,
    including dashboards, WAN tunnels, interfaces, ARP entries, syslogs, BGP,
    and DNS reports.
servers:
  - url: https://v1.api.altostrat.io
security:
  - bearerAuth: []
tags:
  - name: Dashboard
    description: High-level, aggregated metrics for network performance and data usage.
  - name: WAN Tunnels & Performance
    description: >-
      Endpoints for managing and retrieving performance data from SD-WAN
      tunnels.
  - name: Site Interfaces & Metrics
    description: >-
      Endpoints for listing network interfaces at a site and fetching their
      traffic metrics.
  - name: Device Health & Status
    description: Endpoints for monitoring the health and status of network devices.
  - name: ARP Inventory
    description: >-
      Endpoints for querying and managing the Address Resolution Protocol (ARP)
      table to discover devices on the network.
  - name: Network Logs
    description: Access to system, DNS, and BGP logs for diagnostics and security analysis.
  - name: Grafana Dashboards
    description: List Grafana dashboards, query dashboard panels, and export panel data.
  - name: Prometheus Querying
    description: >-
      Discover available metrics and labels, then execute Prometheus queries
      scoped to your workspace.
paths:
  /metrics/dashboards/{dashboardUid}/query:
    post:
      tags:
        - Grafana Dashboards
      summary: Query a dashboard
      description: >-
        Executes the Prometheus queries defined by a Grafana dashboard,
        optionally limiting the request to selected panels.
      operationId: queryGrafanaDashboard
      parameters:
        - name: dashboardUid
          in: path
          required: true
          description: The Grafana dashboard UID.
          schema:
            type: string
            example: router_system_metrics
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DashboardQueryRequest'
      responses:
        '200':
          description: Dashboard query results.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DashboardQueryResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/ServerError'
components:
  schemas:
    DashboardQueryRequest:
      type: object
      properties:
        from:
          type: string
          example: now-6h
        to:
          type: string
          example: now
        interval:
          type: string
          example: 10m
        maxDataPoints:
          type: integer
          example: 1500
        variables:
          type: object
          additionalProperties:
            type: string
          example:
            Site: 9c69345c-8d39-4786-9f17-8153c988c89a
        panels:
          type: array
          items:
            type: integer
          example:
            - 1
            - 2
    DashboardQueryResponse:
      type: object
      properties:
        dashboard:
          type: object
          properties:
            uid:
              type: string
            title:
              type: string
        time_range:
          type: object
          additionalProperties: true
        interval:
          type: string
          example: 10m
        variables:
          type: object
          additionalProperties: true
        results:
          type: array
          items:
            type: object
            additionalProperties: true
    ErrorResponse:
      type: object
      properties:
        type:
          type: string
          description: A broad category for the error (e.g., 'invalid_request_error').
          example: invalid_request_error
        code:
          type: string
          description: A short, unique string identifying the specific error.
          example: parameter_invalid
        message:
          type: string
          description: A human-readable description of what went wrong.
          example: The provided 'siteId' is not a valid UUID.
        doc_url:
          type: string
          description: >-
            A direct link to the documentation page for this specific error
            code.
          example: https://docs.altostrat.io/errors/parameter_invalid
  responses:
    BadRequest:
      description: Bad Request - The request was malformed or invalid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Unauthorized:
      description: Unauthorized - The request lacks valid authentication credentials.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    NotFound:
      description: Not found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    ServerError:
      description: Internal Server Error - An unexpected error occurred on the server.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````