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

# Get Dashboard Data

> Answer one dashboard's query widgets, up to the per-request cap, for a window.



## OpenAPI

````yaml /api-reference/openapi.json get /api/v1/public/dashboards/{dashboard_id}/data
openapi: 3.1.0
info:
  title: TraceRoot Public API
  version: 0.1.0
servers:
  - description: TraceRoot Cloud
    url: https://app.traceroot.ai
  - description: Self-hosted
    url: '{baseUrl}'
    variables:
      baseUrl:
        default: http://localhost:8000
        description: Your TraceRoot backend URL
security: []
paths:
  /api/v1/public/dashboards/{dashboard_id}/data:
    get:
      tags:
        - Dashboards
      summary: Get Dashboard Data
      description: >-
        Answer one dashboard's query widgets, up to the per-request cap, for a
        window.
      operationId: get_dashboard_data
      parameters:
        - in: path
          name: dashboard_id
          required: true
          schema:
            title: Dashboard Id
            type: string
        - description: >-
            A preset window ending now, by the site picker's id. Give this or
            explicit start_time/end_time; neither means the site's 24-hour
            default.
          in: query
          name: range
          required: false
          schema:
            anyOf:
              - enum:
                  - 30m
                  - 1h
                  - 3h
                  - 6h
                  - 1d
                  - 7d
                  - 14d
                  - 30d
                  - 60d
                  - 90d
                type: string
              - type: 'null'
            description: >-
              A preset window ending now, by the site picker's id. Give this or
              explicit start_time/end_time; neither means the site's 24-hour
              default.
            title: Range
        - in: query
          name: start_time
          required: false
          schema:
            anyOf:
              - format: date-time
                type: string
              - type: 'null'
            title: Start Time
        - in: query
          name: end_time
          required: false
          schema:
            anyOf:
              - format: date-time
                type: string
              - type: 'null'
            title: End Time
        - description: >-
            Target project for the request. Required when authenticating with a
            user session token (a user credential is only meaningful scoped to a
            project); for an API key it is optional and, if given, must match
            the key's project.
          in: query
          name: project_id
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: >-
              Target project for the request. Required when authenticating with
              a user session token (a user credential is only meaningful scoped
              to a project); for an API key it is optional and, if given, must
              match the key's project.
            title: Project Id
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DashboardDataResponse'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Authentication failed
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Dashboard not found
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
        '503':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Authentication service unavailable
      security:
        - BearerAuth: []
components:
  schemas:
    DashboardDataResponse:
      description: >-
        A dashboard's query widgets, up to the per-request cap, answered for one
        window.


        Widgets keep the dashboard's order. ``window`` is the window they were
        all

        answered for — the one to name alongside any figure taken from here.
      properties:
        dashboard:
          $ref: '#/components/schemas/DashboardSummary'
        failed:
          title: Failed
          type: integer
        queried:
          title: Queried
          type: integer
        skipped:
          title: Skipped
          type: integer
        widgets:
          items:
            $ref: '#/components/schemas/DashboardWidgetData'
          title: Widgets
          type: array
        window:
          $ref: '#/components/schemas/QueryWindow'
      required:
        - dashboard
        - window
        - widgets
        - queried
        - skipped
        - failed
      title: DashboardDataResponse
      type: object
    ErrorResponse:
      description: >-
        The canonical public error envelope (matches the gateway's normalized
        shape).
      properties:
        detail:
          title: Detail
          type: string
      required:
        - detail
      title: ErrorResponse
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    DashboardSummary:
      description: >-
        The dashboard fields shared by the list and detail reads.


        ``creator`` is the created-by user's display name (or email), resolved
        by

        the internal route; it is None when the creating account was deleted.
      properties:
        create_time:
          format: date-time
          title: Create Time
          type: string
        creator:
          anyOf:
            - type: string
            - type: 'null'
          title: Creator
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        id:
          title: Id
          type: string
        is_default:
          title: Is Default
          type: boolean
        name:
          title: Name
          type: string
        update_time:
          format: date-time
          title: Update Time
          type: string
      required:
        - id
        - name
        - description
        - is_default
        - creator
        - create_time
        - update_time
      title: DashboardSummary
      type: object
    DashboardWidgetData:
      description: >-
        One widget's answer within a dashboard data read.


        ``status`` says what happened: ``ok`` carries the engine's columns/rows/

        meta (a series carries every bucket of the window; every other display's

        rows are capped, with ``truncated`` set when the cap bit); ``skipped``

        is a feed widget (a trace list, not an aggregate — read those with

        ``list_traces`` and the feed's filters); ``error`` carries a short
        reason

        and no rows — a broken widget, or a query widget past the per-request
        cap

        with a reason naming it — so neither fails the whole dashboard.
      properties:
        columns:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Columns
        error:
          anyOf:
            - type: string
            - type: 'null'
          title: Error
        id:
          title: Id
          type: string
        meta:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Meta
        rows:
          anyOf:
            - items:
                items: {}
                type: array
              type: array
            - type: 'null'
          title: Rows
        status:
          enum:
            - ok
            - skipped
            - error
          title: Status
          type: string
        title:
          title: Title
          type: string
        truncated:
          default: false
          title: Truncated
          type: boolean
        type:
          title: Type
          type: string
      required:
        - id
        - title
        - type
        - status
      title: DashboardWidgetData
      type: object
    QueryWindow:
      description: |-
        The window a query was actually answered for.

        ``range`` is the preset id the caller gave (or the default's, when they
        gave nothing) and None for explicit bounds. ``clamped`` is True when the
        plan's retention pulled ``start_time`` forward — the honest reason a
        caller's window and the answered one differ.
      properties:
        clamped:
          title: Clamped
          type: boolean
        end_time:
          format: date-time
          title: End Time
          type: string
        range:
          anyOf:
            - enum:
                - 30m
                - 1h
                - 3h
                - 6h
                - 1d
                - 7d
                - 14d
                - 30d
                - 60d
                - 90d
              type: string
            - type: 'null'
          title: Range
        start_time:
          format: date-time
          title: Start Time
          type: string
      required:
        - start_time
        - end_time
        - range
        - clamped
      title: QueryWindow
      type: object
    ValidationError:
      properties:
        ctx:
          title: Context
          type: object
        input:
          title: Input
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object
  securitySchemes:
    BearerAuth:
      scheme: bearer
      type: http

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.