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

# Get the unified observability dashboard for a workspace

> Returns the per-workspace dashboard in a single response: health,
metrics, errors, costs, and usage sections. Backed by the
per-interval `platform_metrics` rows plus a summary cache; refreshes
the current open interval on demand and self-heals gaps in closed
intervals.

Requires `observability:read` permission.




## OpenAPI

````yaml /api-reference/ai-governance-v2/swagger.yml get /v1/observability/{workspaceId}/dashboard
openapi: 3.0.3
info:
  version: 1.0.0
  title: AI Governance API
  description: |
    Public REST API for the Prisme.ai AI Governance workspace -
    announcements, legal documents, notifications, observability
    dashboards, audit logs, and active-org listing.
  contact:
    name: Prisme.ai
    url: https://prisme.ai
servers:
  - url: https://{host}/v2/workspaces/slug:ai-governance-v2/webhooks
    description: Prisme.ai workspace webhooks
    variables:
      host:
        default: api.studio.prisme.ai
        description: API host (override for self-hosted or sandbox)
security:
  - BearerAuth: []
  - OrgApiKeyAuth: []
tags:
  - name: Announcements
    description: Platform announcements (CRUD + audience targeting).
  - name: Legal
    description: Versioned legal documents (terms, privacy, etc.).
  - name: Notifications
    description: Per-user notifications derived from announcements.
  - name: Observability
    description: >-
      Cross-workspace and per-workspace observability dashboards, traces, and
      feeds.
  - name: Orgs
    description: Organization listing and audit logs.
paths:
  /v1/observability/{workspaceId}/dashboard:
    parameters:
      - in: path
        name: workspaceId
        required: true
        schema:
          type: string
          maxLength: 64
          pattern: ^[a-zA-Z0-9_-]+$
        description: Workspace identifier.
    get:
      tags:
        - Observability
      summary: Get the unified observability dashboard for a workspace
      description: |
        Returns the per-workspace dashboard in a single response: health,
        metrics, errors, costs, and usage sections. Backed by the
        per-interval `platform_metrics` rows plus a summary cache; refreshes
        the current open interval on demand and self-heals gaps in closed
        intervals.

        Requires `observability:read` permission.
      operationId: getWorkspaceDashboard
      parameters:
        - in: query
          name: period
          schema:
            type: string
            enum:
              - 15m
              - 30m
              - 1h
              - 24h
              - 7d
              - 30d
          description: Preset window (default `24h`).
        - in: query
          name: start
          schema:
            type: string
            format: date-time
          description: Custom range start (overrides `period`; never cached).
        - in: query
          name: end
          schema:
            type: string
            format: date-time
          description: Custom range end (overrides `period`; never cached).
        - in: query
          name: granularity
          schema:
            type: string
            enum:
              - 5m
              - hourly
              - daily
          description: |
            Granularity override (auto-picked from period; 5m windows
            shorter than 1h are never cached).
      responses:
        '200':
          description: Unified dashboard payload.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkspaceDashboard'
        '401':
          description: Unauthenticated.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden - missing `observability:read` permission.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    WorkspaceDashboard:
      type: object
      description: Unified per-workspace observability dashboard.
      properties:
        workspaceId:
          type: string
        period:
          type: object
          properties:
            type:
              type: string
            start:
              type: string
              format: date-time
            end:
              type: string
              format: date-time
            granularity:
              type: string
        health:
          $ref: '#/components/schemas/DashboardHealth'
        metrics:
          $ref: '#/components/schemas/DashboardMetrics'
        errors:
          $ref: '#/components/schemas/DashboardErrors'
        costs:
          $ref: '#/components/schemas/DashboardCosts'
        usage:
          $ref: '#/components/schemas/DashboardUsage'
        meta:
          type: object
          properties:
            source:
              type: string
            data_points:
              type: integer
            includes_current_interval:
              type: boolean
            summary_cached:
              type: boolean
            granularity_override_applied:
              type: boolean
            generated_at:
              type: string
              format: date-time
            data_computed_at:
              type: string
              format: date-time
            next_refresh_at:
              type: string
              format: date-time
    Error:
      type: object
      required:
        - error
        - message
      properties:
        error:
          type: string
          description: >-
            Stable PascalCase error code (e.g. AnnouncementNotFound,
            ValidationError).
        message:
          type: string
          description: Human-readable error message.
        details:
          type: object
          description: Optional structured context.
          additionalProperties: true
    DashboardHealth:
      type: object
      description: |
        `health` block - output of `internal/observability/build-health`.
      properties:
        score:
          type: number
        status:
          type: string
        metrics:
          $ref: '#/components/schemas/DashboardHealthMetrics'
        breakdown:
          type: object
          additionalProperties: true
          description: Per-component score breakdown produced by `compute-health-score`.
        issues:
          type: array
          items:
            $ref: '#/components/schemas/DashboardHealthIssue'
    DashboardMetrics:
      type: object
      description: |
        `metrics` block - output of `internal/observability/build-metrics`.
      properties:
        totalExecutions:
          type: integer
        totalEntryExecutions:
          type: integer
        totalInteractions:
          type: integer
        latency:
          $ref: '#/components/schemas/DashboardLatency'
        slowestAutomations:
          type: array
          items:
            $ref: '#/components/schemas/DashboardSlowestAutomation'
        timeline:
          type: array
          items:
            $ref: '#/components/schemas/DashboardMetricsTimelinePoint'
    DashboardErrors:
      type: object
      description: |
        `errors` block - output of `internal/observability/build-errors`.
      properties:
        totalErrors:
          type: integer
        totalExecutions:
          type: integer
        totalInteractions:
          type: integer
        failedInteractions:
          type: integer
        errorRate:
          type: number
        byType:
          type: array
          items:
            $ref: '#/components/schemas/DashboardErrorByType'
        byAutomation:
          type: array
          items:
            $ref: '#/components/schemas/DashboardErrorByAutomation'
        timeline:
          type: array
          items:
            $ref: '#/components/schemas/DashboardErrorsTimelinePoint'
    DashboardCosts:
      type: object
      description: |
        `costs` block - output of `internal/observability/build-costs`.
      properties:
        summary:
          $ref: '#/components/schemas/DashboardCostsSummary'
        byModel:
          type: array
          items:
            $ref: '#/components/schemas/DashboardCostByModel'
        byProvider:
          type: array
          items:
            $ref: '#/components/schemas/DashboardCostByProvider'
        timeline:
          type: array
          items:
            $ref: '#/components/schemas/DashboardCostsTimelinePoint'
    DashboardUsage:
      type: object
      description: |
        `usage` block - output of `internal/observability/build-usage`.
      properties:
        summary:
          $ref: '#/components/schemas/DashboardUsageSummary'
        intervalStats:
          type: array
          items:
            $ref: '#/components/schemas/DashboardUsageIntervalStat'
        topEntrypoints:
          type: array
          items:
            $ref: '#/components/schemas/DashboardUsageTopEntrypoint'
    DashboardHealthMetrics:
      type: object
      properties:
        totalInteractions:
          type: integer
        failedInteractions:
          type: integer
        totalExecutions:
          type: integer
        totalErrors:
          type: integer
        errorRate:
          type: number
          description: Failed / total interactions, percentage rounded to 2 decimals.
        successRate:
          type: number
          description: 1 - errorRate, percentage rounded to 2 decimals.
        p95Ms:
          type: number
        p50Ms:
          type: number
    DashboardHealthIssue:
      type: object
      description: Issue surfaced by the health builder (mutually-exclusive thresholds).
      properties:
        type:
          type: string
          enum:
            - high_error_rate
            - high_latency
            - low_activity
        message:
          type: string
        impact:
          type: string
          enum:
            - info
            - medium
            - high
    DashboardLatency:
      type: object
      properties:
        p50Ms:
          type: number
        p90Ms:
          type: number
        p95Ms:
          type: number
        p99Ms:
          type: number
    DashboardSlowestAutomation:
      type: object
      properties:
        automation:
          type: string
        executions:
          type: integer
        p95Ms:
          type: number
        errorRate:
          type: number
        correlationIds:
          type: array
          items:
            type: string
    DashboardMetricsTimelinePoint:
      type: object
      properties:
        date:
          type: string
          format: date-time
        p95Ms:
          type: number
        count:
          type: integer
        entryCount:
          type: integer
        interactions:
          type: integer
        status:
          type: string
    DashboardErrorByType:
      type: object
      properties:
        type:
          type: string
        appInstanceFullSlug:
          type: string
          description: >-
            Empty when the error came from a workspace automation rather than an
            installed app instance.
        count:
          type: integer
        percentage:
          type: number
    DashboardErrorByAutomation:
      type: object
      properties:
        automation:
          type: string
        errorCount:
          type: integer
        execCount:
          type: integer
        errorRate:
          type: number
    DashboardErrorsTimelinePoint:
      type: object
      properties:
        date:
          type: string
          format: date-time
        count:
          type: integer
        failedInteractions:
          type: integer
        status:
          type: string
    DashboardCostsSummary:
      type: object
      properties:
        totalCalls:
          type: integer
        totalCostUsd:
          type: number
        totalTokens:
          type: integer
        inputTokens:
          type: integer
        outputTokens:
          type: integer
        totalCarbonKgco2:
          type: number
    DashboardCostByModel:
      type: object
      properties:
        model:
          type: string
        calls:
          type: integer
        cost:
          type: number
        tokens:
          type: integer
        percentage:
          type: number
    DashboardCostByProvider:
      type: object
      properties:
        provider:
          type: string
        calls:
          type: integer
        latencyMs:
          type: number
    DashboardCostsTimelinePoint:
      type: object
      properties:
        date:
          type: string
          format: date-time
        calls:
          type: integer
        cost:
          type: number
        tokens:
          type: integer
        status:
          type: string
    DashboardUsageSummary:
      type: object
      properties:
        totalInteractions:
          type: integer
        totalExecutions:
          type: integer
        uniqueUsers:
          type: integer
        avgInteractionsPerDay:
          type: integer
        avgRpm:
          type: number
        peakRpm:
          type: number
    DashboardUsageIntervalStat:
      type: object
      properties:
        date:
          type: string
          format: date-time
        interactions:
          type: integer
        executions:
          type: integer
        users:
          type: integer
        status:
          type: string
    DashboardUsageTopEntrypoint:
      type: object
      properties:
        automation:
          type: string
        count:
          type: integer
        percentage:
          type: number
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: |
        User-bound credential carrying an identity: either a session JWT
        or a user access token (`at:*`) generated from the user settings UI.
        Send as `Authorization: Bearer <token>`.
        Org API keys (`iak_*`) are **not** accepted here - they carry
        no user identity. Use the `x-prismeai-api-key` header instead
        (see `OrgApiKeyAuth`).
    OrgApiKeyAuth:
      type: apiKey
      in: header
      name: x-prismeai-api-key
      description: |
        Organization API key (`iak_{orgSlug}_{uuid}`), managed from the
        AI Governance UI. Unlike `Authorization: Bearer`, this credential
        is **not** tied to a user identity - it is bound to the org and
        its effective access is defined by the scopes / permission rules
        attached to it (it can be restricted to a single project, or kept
        broader - e.g. usable across AI Governance, Agent Factory and
        LLM Gateway).
        Send as `x-prismeai-api-key: iak_...`.

````