OpsMill Telemetry API

The Telemetry API from OpsMill — 1 operation(s) for telemetry.

OpenAPI Specification

opsmill-telemetry-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Infrahub Artifact Telemetry API
  version: 1.10.0
tags:
- name: Telemetry
paths:
  /api/telemetry/snapshots:
    get:
      summary: Get Telemetry Snapshots
      operationId: get_telemetry_snapshots_api_telemetry_snapshots_get
      security:
      - HTTPBearer: []
      - APIKeyHeader: []
      parameters:
      - name: start_date
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: Include snapshots created on or after this date (ISO 8601)
          title: Start Date
        description: Include snapshots created on or after this date (ISO 8601)
      - name: end_date
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: Include snapshots created on or before this date (ISO 8601)
          title: End Date
        description: Include snapshots created on or before this date (ISO 8601)
      - name: limit
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          description: Maximum number of snapshots to return
          default: 1000
          title: Limit
        description: Maximum number of snapshots to return
      - name: offset
        in: query
        required: false
        schema:
          type: integer
          minimum: 0
          description: Number of snapshots to skip
          default: 0
          title: Offset
        description: Number of snapshots to skip
      - name: branch
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: Name of the branch to use for the query
          title: Branch
        description: Name of the branch to use for the query
      - name: at
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: Time to use for the query, in absolute or relative format
          title: At
        description: Time to use for the query, in absolute or relative format
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TelemetrySnapshotListResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      tags:
      - Telemetry
components:
  schemas:
    TelemetrySnapshotListResponse:
      properties:
        count:
          type: integer
          title: Count
        snapshots:
          items:
            $ref: '#/components/schemas/TelemetrySnapshotResponse'
          type: array
          title: Snapshots
      type: object
      required:
      - count
      - snapshots
      title: TelemetrySnapshotListResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    RemoteSendStatus:
      type: string
      enum:
      - pending
      - sent
      - skipped
      - failed
      title: RemoteSendStatus
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
            - type: string
            - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
      - loc
      - msg
      - type
      title: ValidationError
    TelemetrySnapshotResponse:
      properties:
        id:
          type: string
          title: Id
        created_at:
          type: string
          title: Created At
        kind:
          type: string
          title: Kind
        payload_format:
          type: string
          title: Payload Format
        deployment_id:
          type: string
          title: Deployment Id
        infrahub_version:
          type: string
          title: Infrahub Version
        data:
          additionalProperties: true
          type: object
          title: Data
        checksum:
          type: string
          title: Checksum
        remote_send_status:
          $ref: '#/components/schemas/RemoteSendStatus'
      type: object
      required:
      - id
      - created_at
      - kind
      - payload_format
      - deployment_id
      - infrahub_version
      - data
      - checksum
      - remote_send_status
      title: TelemetrySnapshotResponse
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-INFRAHUB-KEY