openapi: 3.1.0 info: title: QueryCat API description: Use SQL to query different data sources like logs, JSON, CSV, XML, etc. version: 1.0.0 contact: name: Ivan Kozhin license: name: MIT url: https://github.com/krasninja/querycat/blob/develop/LICENSE.txt servers: - url: http://localhost:6789/api/ description: Localhost paths: /query: post: summary: Run the query. operationId: RunQueryOperation requestBody: content: multipart/form-data: schema: title: SQL text. allOf: - $ref: "#/components/schemas/QCQuery" application/json: schema: title: SQL text. allOf: - $ref: "#/components/schemas/QCQuery" text/plain: schema: title: SQL text. example: "SELECT 'Hello World!'" responses: 200: description: A table data. content: application/json: schema: title: Result table. allOf: - $ref: "#/components/schemas/QCTable" 400: description: Bad data. content: application/json: schema: title: Error. allOf: - $ref: "#/components/schemas/Error" components: schemas: QCQuery: type: object required: - query properties: query: type: string description: SQL text. example: "SELECT 'Hello World!'" QCTable: type: object required: - schema - data properties: schema: type: array items: $ref: "#/components/schemas/QCTableColumn" data: type: object allOf: - $ref: "#/components/schemas/QCTableData" QCTableColumn: type: object required: - id - name - type properties: id: type: integer format: int64 description: Column internal identifier. example: 1 name: type: string description: Column name. example: value type: type: object allOf: - $ref: "#/components/schemas/QCColumnType" description: type: string QCColumnType: type: string description: QueryCat data types. enum: [Void, Integer, String, Float, Timestamp, Boolean, Numeric, Interval, Blob, Object, Dynamic] example: String QCTableData: type: object additionalProperties: true Error: type: object required: - message properties: message: type: string description: Error message. example: result