Manticore Search utils API

The utils API from Manticore Search — 1 operation(s) for utils.

OpenAPI Specification

manticore-utils-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Manticore Search Client Index utils API
  description: 'Сlient for Manticore Search.

    '
  version: 5.0.0
  contact:
    name: Manticore Software Ltd.
    email: info@manticoresearch.com
    url: https://manticoresearch.com/contact-us/
  license:
    name: MIT
    url: http://opensource.org/licenses/MIT
servers:
- description: Default Manticore Search HTTP
  url: http://127.0.0.1:9308/
tags:
- name: utils
paths:
  /sql:
    post:
      summary: Perform SQL requests
      x-is_sql: true
      description: 'Run a query in SQL format.

        Expects a query string passed through `body` parameter and optional `raw_response` parameter that defines a format of response.

        `raw_response` can be set to `False` for Select queries only, e.g., `SELECT * FROM mytable`

        The query string must stay as it is, no URL encoding is needed.

        The response object depends on the query executed. In select mode the response has same format as `/search` operation.

        '
      operationId: sql
      tags:
      - utils
      externalDocs:
        url: https://manual.manticoresearch.com/Connecting_to_the_server/HTTP#sql-api
      requestBody:
        required: true
        description: 'A query parameter string.

          '
        content:
          text/plain:
            schema:
              type: string
            example: SHOW TABLES
      parameters:
      - in: query
        name: raw_response
        description: 'Optional parameter, defines a format of response. Can be set to `False` for Select only queries and set to `True` for any type of queries. Default value is ''True''.

          '
        schema:
          type: boolean
          default: true
      responses:
        '200':
          description: 'In case of SELECT-only in mode none the response schema is the same as of `search`.

            In case of `mode=raw` or `raw_response=true` the response depends on the query executed.

            '
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/sqlResponse'
        default:
          description: error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorResponse'
components:
  schemas:
    responseErrorText:
      type: string
      description: Error message text returned in case of an error
    responseErrorDetails:
      type: object
      description: Detailed error information returned in case of an error response
      required:
      - type
      properties:
        type:
          type: string
          description: Type or category of the error
        reason:
          type:
          - string
          - 'null'
          description: Detailed explanation of why the error occurred
        table:
          type:
          - string
          - 'null'
          description: The table related to the error, if applicable
    responseError:
      oneOf:
      - $ref: '#/components/schemas/responseErrorDetails'
      - $ref: '#/components/schemas/responseErrorText'
    sqlRawResponse:
      type: array
      items:
        type: object
    sqlObjResponse:
      type: object
      required:
      - hits
      properties:
        hits:
          type: object
        took:
          type: number
        timed_out:
          type: boolean
    errorResponse:
      type: object
      description: Error response object containing information about the error and a status code
      required:
      - error
      properties:
        error:
          $ref: '#/components/schemas/responseError'
        status:
          type: integer
          description: HTTP status code of the error response
          default: 500
      example:
        status: 500
        error: an error occured
    sqlResponse:
      oneOf:
      - $ref: '#/components/schemas/sqlRawResponse'
      - $ref: '#/components/schemas/sqlObjResponse'
      description: List of responses from executed SQL queries
      example:
      - total: 0
        error: null
externalDocs:
  description: Find out more about Manticore Search
  url: https://manticoresearch.com/