Quix Definitions API

Declare parameter and event metadata for a stream (Streaming Writer API).

OpenAPI Specification

quix-definitions-api-openapi.yml Raw ↑
openapi: 3.0.1
info:
  title: Quix Cloud HTTP APIs Definitions API
  description: 'OpenAPI 3.0 description of the HTTP (REST) surfaces of Quix Cloud: the Streaming Writer API for publishing time-series parameter data, events, and definitions into Quix topics, and the account-wide Portal API for managing workspaces, topics, and deployments.


    The Streaming Reader API is delivered exclusively over a Microsoft SignalR hub (WebSockets / Long Polling) and is therefore modeled separately in the companion AsyncAPI document at asyncapi/quix-asyncapi.yml, not here.


    All endpoints authenticate with a Quix Personal Access Token (PAT) supplied as an `Authorization: Bearer <PAT>` header. The Streaming Writer API base host is environment-specific (`writer-{environmentId}.cloud.quix.io`); the Portal API is account-wide (`portal-api.platform.quix.io`). Endpoint paths are documented by Quix; per-environment Swagger/OpenAPI references are available from the Quix portal under Settings > APIs and tokens.'
  termsOfService: https://quix.io/terms/
  contact:
    name: Quix Support
    url: https://quix.io/contact/
  license:
    name: API documentation - Quix Terms
    url: https://quix.io/terms/
  version: '1.0'
servers:
- url: https://writer-{environmentId}.cloud.quix.io
  description: Streaming Writer API. Environment-specific host; `{environmentId}` is the URL-friendly combination of organization, project, and environment names (e.g. `myorg-myproject-production`).
  variables:
    environmentId:
      default: myorg-myproject-production
      description: Quix environment (workspace) identifier.
- url: https://portal-api.platform.quix.io
  description: Portal API. Account-wide management host. The subdomain segment may differ per Quix deployment; copy the exact Portal API base from the Quix portal (Settings > APIs and tokens).
tags:
- name: Definitions
  description: Declare parameter and event metadata for a stream (Streaming Writer API).
paths:
  /topics/{topicName}/streams/{streamId}/parameters/definitions:
    post:
      operationId: setParameterDefinitions
      tags:
      - Definitions
      summary: Set parameter definitions
      description: Declares the parameter definitions (names, display names, units, ranges, formats) for a stream so consumers can interpret incoming parameter data.
      servers:
      - url: https://writer-{environmentId}.cloud.quix.io
        variables:
          environmentId:
            default: myorg-myproject-production
      parameters:
      - $ref: '#/components/parameters/TopicName'
      - $ref: '#/components/parameters/StreamId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ParameterDefinitionsRequest'
      responses:
        '200':
          description: Definitions stored.
        '401':
          $ref: '#/components/responses/Unauthorized'
      security:
      - bearerAuth: []
  /topics/{topicName}/streams/{streamId}/events/definitions:
    post:
      operationId: setEventDefinitions
      tags:
      - Definitions
      summary: Set event definitions
      description: Declares the event definitions (ids, names, descriptions, severity levels) for a stream so consumers can interpret incoming events.
      servers:
      - url: https://writer-{environmentId}.cloud.quix.io
        variables:
          environmentId:
            default: myorg-myproject-production
      parameters:
      - $ref: '#/components/parameters/TopicName'
      - $ref: '#/components/parameters/StreamId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EventDefinitionsRequest'
      responses:
        '200':
          description: Definitions stored.
        '401':
          $ref: '#/components/responses/Unauthorized'
      security:
      - bearerAuth: []
components:
  responses:
    Unauthorized:
      description: Authentication failed - the bearer token is missing, malformed, or expired.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  schemas:
    EventDefinitionsRequest:
      type: object
      description: Event definitions for the stream.
      properties:
        events:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              name:
                type: string
              description:
                type: string
              level:
                type: string
                enum:
                - Trace
                - Debug
                - Information
                - Warning
                - Error
                - Critical
    ParameterDefinitionsRequest:
      type: object
      description: Parameter definitions for the stream.
      properties:
        parameters:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              name:
                type: string
              unit:
                type: string
              minimumValue:
                type: number
              maximumValue:
                type: number
              format:
                type: string
    Error:
      type: object
      properties:
        status:
          type: integer
        title:
          type: string
        detail:
          type: string
  parameters:
    TopicName:
      name: topicName
      in: path
      required: true
      description: The name of the topic the stream belongs to.
      schema:
        type: string
    StreamId:
      name: streamId
      in: path
      required: true
      description: The unique identifier of the stream. Publishing to an id that does not exist creates the stream implicitly.
      schema:
        type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: PAT
      description: 'Quix Personal Access Token (PAT) presented as `Authorization: Bearer <PAT>`. Generate from the Quix portal under your profile > Personal Access Tokens, or Settings > APIs and tokens.'