Amigo Command Center API

The Command Center API from Amigo — 1 operation(s) for command center.

OpenAPI Specification

amigo-command-center-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Amigo Account Command Center API
  version: 0.1.0
servers:
- url: https://api.amigo.ai
- url: https://internal-api.amigo.ai
- url: https://api-eu-central-1.amigo.ai
- url: https://api-ap-southeast-2.amigo.ai
- url: https://api-ca-central-1.amigo.ai
security:
- Bearer-Authorization: []
  Bearer-Authorization-Organization: []
  Basic: []
tags:
- name: Command Center
paths:
  /v1/{workspace_id}/command-center:
    get:
      tags:
      - Command Center
      summary: Get Command Center
      description: Single-pane workspace health dashboard combining voice, pipeline, data quality, and identity metrics.
      operationId: get-command-center
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CommandCenterResponse'
        '429':
          description: Rate limit exceeded
      parameters:
      - name: workspace_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Workspace Id
components:
  schemas:
    VoiceMetrics:
      properties:
        active_calls:
          type: integer
          title: Active Calls
          default: 0
        active_escalated:
          type: integer
          title: Active Escalated
          default: 0
        calls_today:
          type: integer
          title: Calls Today
          default: 0
        avg_quality_score_today:
          anyOf:
          - type: number
          - type: 'null'
          title: Avg Quality Score Today
        escalation_rate_today:
          type: number
          title: Escalation Rate Today
          default: 0.0
      type: object
      title: VoiceMetrics
    CommandCenterResponse:
      properties:
        workspace_id:
          type: string
          format: uuid
          title: Workspace Id
        voice:
          $ref: '#/components/schemas/VoiceMetrics'
          default:
            active_calls: 0
            active_escalated: 0
            calls_today: 0
            escalation_rate_today: 0.0
        pipeline:
          $ref: '#/components/schemas/PipelineMetrics'
          default:
            sources_total: 0
            sources_healthy: 0
            sources_degraded: 0
            sources_failing: 0
            events_last_hour: 0
            outbound_pending: 0
            outbound_failed: 0
            connector_status: unavailable
        data_quality:
          $ref: '#/components/schemas/DataQualityMetrics'
          default:
            pending_reviews: 0
            entities_total: 0
            entities_merged_7d: 0
        identity:
          $ref: '#/components/schemas/IdentityMetrics'
          default:
            active_api_keys: 0
        alerts:
          items:
            $ref: '#/components/schemas/CommandCenterAlert'
          type: array
          title: Alerts
          default: []
        degraded_sections:
          items:
            type: string
          type: array
          title: Degraded Sections
          default: []
        generated_at:
          type: string
          title: Generated At
        cached:
          type: boolean
          title: Cached
          default: false
      type: object
      required:
      - workspace_id
      - generated_at
      title: CommandCenterResponse
    IdentityMetrics:
      properties:
        active_api_keys:
          type: integer
          title: Active Api Keys
          default: 0
        active_sessions:
          anyOf:
          - type: integer
          - type: 'null'
          title: Active Sessions
        failed_auths_1h:
          anyOf:
          - type: integer
          - type: 'null'
          title: Failed Auths 1H
        locked_accounts:
          anyOf:
          - type: integer
          - type: 'null'
          title: Locked Accounts
        mfa_coverage_pct:
          anyOf:
          - type: number
          - type: 'null'
          title: Mfa Coverage Pct
      type: object
      title: IdentityMetrics
    CommandCenterAlert:
      properties:
        level:
          type: string
          enum:
          - info
          - warning
          - critical
          title: Level
        code:
          type: string
          title: Code
        message:
          type: string
          title: Message
        section:
          type: string
          title: Section
      type: object
      required:
      - level
      - code
      - message
      - section
      title: CommandCenterAlert
    DataQualityMetrics:
      properties:
        pending_reviews:
          type: integer
          title: Pending Reviews
          default: 0
        approval_rate_7d:
          anyOf:
          - type: number
          - type: 'null'
          title: Approval Rate 7D
        avg_confidence:
          anyOf:
          - type: number
          - type: 'null'
          title: Avg Confidence
        entities_total:
          type: integer
          title: Entities Total
          default: 0
        entities_merged_7d:
          type: integer
          title: Entities Merged 7D
          default: 0
      type: object
      title: DataQualityMetrics
    PipelineMetrics:
      properties:
        sources_total:
          type: integer
          title: Sources Total
          default: 0
        sources_healthy:
          type: integer
          title: Sources Healthy
          default: 0
        sources_degraded:
          type: integer
          title: Sources Degraded
          default: 0
        sources_failing:
          type: integer
          title: Sources Failing
          default: 0
        events_last_hour:
          type: integer
          title: Events Last Hour
          default: 0
        outbound_pending:
          type: integer
          title: Outbound Pending
          default: 0
        outbound_failed:
          type: integer
          title: Outbound Failed
          default: 0
        connector_status:
          type: string
          enum:
          - healthy
          - degraded
          - unavailable
          title: Connector Status
          default: unavailable
      type: object
      title: PipelineMetrics
  securitySchemes:
    Bearer-Authorization:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Amigo issued JWT token that identifies an user. It's issued either after logging in through the frontend, or manually through the [`SignInWithAPIKey`](sign-in-with-api-key) endpoint.
    Bearer-Authorization-Organization:
      type: apiKey
      in: header
      name: X-ORG-ID
      description: An optional organization identifier that indicates from which organization the token is issued. This is used in rare cases where the user to authenticate is making a request for resources in another organization.
    Basic:
      type: http
      scheme: basic
      description: The username should be set to {org_id}_{user_id}, and the password should be the Amigo issued JWT token that identifies the user.