---
components:
  schemas:
    restapi.DetailedError:
      properties:
        errors:
          items:
            type: string
          type: array
        message:
          type: string
      type: object
    restapi.ErrorResponse:
      properties:
        message:
          examples:
            - "Internal Server Error"
          type: string
      type: object
    restapi.ExecuteRequest:
      properties:
        id:
          description: "The ContX IQ query ID or query name."
          examples:
            - "gid:AAAAI3CpKUguokArp0rY8oQW9eo"
          type: string
        input_params:
          additionalProperties: true
          description: "InputParams map specifies the values of input parameters used within the query execution.\nIf a query uses input parameters and is used for making the decision,\nthey must be sent with the request, otherwise an error is returned.\nThe length of string values must be between 1 and 256 characters."
          type: object
        page_size:
          description: "The size of the result set. The default size is 100."
          format: int32
          type: integer
        page_token:
          description: "The page token for the query result. Any value under 1 returns the first page."
          format: int32
          type: integer
        preprocess_params:
          additionalProperties:
            type: string
          description: "PreprocessParams map specifies the values of preprocess parameters used within the query execution.\nThis value is optional and only used for CIQ v2.0."
          type: object
      type: object
    restapi.ExecuteResponse:
      properties:
        data:
          description: "List of results, composed of nodes, relationships, and their properties, from executing the query."
          items:
            "$ref": "#/components/schemas/restapi.ExecuteResponseRecord"
          type: array
      type: object
    restapi.ExecuteResponseRecord:
      properties:
        aggregate_values:
          additionalProperties: true
          description: "List of aggregate values as the result."
          type: object
        nodes:
          additionalProperties: true
          description: "List of nodes and their properties as the result."
          type: object
        relationships:
          additionalProperties: true
          description: "List of relationships and their properties as the result."
          type: object
      type: object
  securitySchemes:
    APIKey:
      description: "The value of the App Agent credential header must be passed as is, without any prefix."
      in: header
      name: X-IK-ClientKey
      type: apiKey
    bearerAuth:
      description: "Optional third-party end-user token, introspected via the Token Introspect configuration."
      scheme: bearer
      type: http
info:
  description: "ContX IQ API supports CRUD operations on IKG which cooperates with authorization engine."
  license:
    name: "Apache 2.0"
    url: "https://www.apache.org/licenses/LICENSE-2.0"
  title: "ContX IQ REST API"
  version: "1"
openapi: "3.2.0"
paths:
  /execute:
    post:
      description: "Execute the ContX IQ query and return the results that requestor is authorized to access."
      operationId: execute
      requestBody:
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/restapi.ExecuteRequest"
        description: "execute request"
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/restapi.ExecuteResponse"
          description: OK
        "400":
          content:
            application/json:
              schema:
                properties:
                  errors:
                    items:
                      type: string
                    type: array
                  message:
                    type: string
                type: object
          description: "Bad request"
        "401":
          content:
            application/json:
              schema:
                properties:
                  errors:
                    items:
                      type: string
                    type: array
                  message:
                    type: string
                type: object
          description: "Unauthorized request"
        "500":
          content:
            application/json:
              schema:
                properties:
                  message:
                    type: string
                type: object
          description: "Internal Server Error"
      summary: "ContX IQ specified query execution endpoint"
      tags:
        - "ContX IQ"
security:
  - APIKey: []
  - APIKey: []
    bearerAuth: []
servers:
  - url: "https://eu.api.indykite.com/contx-iq/v1"
  - url: "https://us.api.indykite.com/contx-iq/v1"
tags:
  - description: "ContX IQ API supports CRUD operations on IKG which cooperates with authorization engine."
    name: "ContX IQ"
