openapi: 3.1.0
info:
  title: SAPOT Server — Mikrotik Telemetry
  version: 0.1.2
paths:
  /api/admin/router/dashboard:
    get:
      tags:
      - router
      - admin
      summary: Dashboard
      operationId: dashboard_api_admin_router_dashboard_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
      security:
      - OAuth2PasswordBearer: []
  /api/admin/router/health/history:
    get:
      tags:
      - router
      - admin
      summary: Health History
      operationId: health_history_api_admin_router_health_history_get
      security:
      - OAuth2PasswordBearer: []
      parameters:
      - name: limit
        in: query
        required: false
        schema:
          type: integer
          default: 50
          title: Limit
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/admin/router/health/latest:
    get:
      tags:
      - router
      - admin
      summary: Latest Health
      operationId: latest_health_api_admin_router_health_latest_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
      security:
      - OAuth2PasswordBearer: []
  /api/admin/router/traffic/{interface}:
    get:
      tags:
      - router
      - admin
      summary: Traffic
      operationId: traffic_api_admin_router_traffic__interface__get
      security:
      - OAuth2PasswordBearer: []
      parameters:
      - name: interface
        in: path
        required: true
        schema:
          type: string
          title: Interface
      - name: limit
        in: query
        required: false
        schema:
          type: integer
          default: 100
          title: Limit
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    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
  securitySchemes:
    OAuth2PasswordBearer:
      type: oauth2
      flows:
        password:
          scopes: {}
          tokenUrl: auth/token
