openapi: 3.0.0
info:
  title: SAP API
  version: 1.0.0
servers:
- url: http://localhost:8080
paths:
  /rfc/TREX_RFC_CLASSIFY_DOCUMENTS:
    post:
      tags:
      - TREX_RFC_TM
      summary: 'Classifies documents: for each document an appropriate class is proposed'
      operationId: /rfc/TREX_RFC_CLASSIFY_DOCUMENTS
      requestBody:
        content:
          application/json:
            schema:
              properties:
                CLASSIFY_ATTR:
                  type: string
                  format: byte
                  description: Classification attribute
                CLASSIFY_METHOD:
                  type: string
                  format: byte
                  description: KNN, CENTROID, SAPMETHOD
                CLASSIFY_TYPE:
                  type: string
                  format: byte
                  description: QUERY_BASED, EXAMPLE_BASED, TYPE_BOTH, TYPE_UNDEFINED
                DOC_SEL_QUERY:
                  type: string
                  format: byte
                  description: DocumentSelectionQuery
                INDEXSERVER_LOCATION:
                  type: string
                  format: byte
                  description: Host:Port
                INDEX_ID:
                  type: string
                  format: byte
                  description: IndexId
                LANGUAGE:
                  type: string
                  format: byte
                  description: Language
                MAX_RESULTS:
                  type: integer
                  format: int64
                  description: Number of results
                STAGING:
                  type: integer
                  format: int64
                  description: Staging
                THRESHOLD:
                  type: integer
                  format: int64
                  description: Threshold
                USE_KEYWORDS:
                  type: string
                  format: byte
                  description: Keywords are used
                CLASSIFY_ATTRS:
                  type: array
                  items:
                    type: object
                    properties:
                      ATTR_NAME:
                        type: string
                        format: byte
                        description: ''
                DOC_ATTRIBUTES:
                  type: array
                  items:
                    type: object
                    properties:
                      DOC_COUNTER:
                        type: integer
                        format: int64
                        description: ''
                      ATTR_NAME:
                        type: string
                        format: byte
                        description: ''
                      VALUE1:
                        type: string
                        format: byte
                        description: ''
                      VALUE2:
                        type: string
                        format: byte
                        description: ''
                      ATTR_TYPE:
                        type: string
                        format: byte
                        description: ''
                      ATTR_COUNTER:
                        type: integer
                        format: int64
                        description: ''
                DOC_CONTENT:
                  type: array
                  items:
                    type: object
                    properties:
                      DOC_COUNTER:
                        type: integer
                        format: int64
                        description: ''
                      CONTENT:
                        type: string
                        format: byte
                        description: ''
                RESULT_CONTAINER:
                  type: array
                  items:
                    type: object
                    properties:
                      CONT_KEY:
                        type: string
                        format: byte
                        description: ''
                      CONT_COUNTER:
                        type: integer
                        format: int64
                        description: ''
                      WEIGHT:
                        type: integer
                        format: int64
                        description: ''
                      ERROR_CODE:
                        type: integer
                        format: int64
                        description: ''
                      ERROR_TEXT:
                        type: string
                        format: byte
                        description: ''
                RESULT_ELEM:
                  type: array
                  items:
                    type: object
                    properties:
                      CONT_COUNTER:
                        type: integer
                        format: int64
                        description: ''
                      NAME:
                        type: string
                        format: byte
                        description: ''
                      RANK_VALUE:
                        type: integer
                        format: int64
                        description: ''
                      CLASSI_TYPE:
                        type: integer
                        format: int64
                        description: ''
                      ELEM_COUNTER:
                        type: integer
                        format: int64
                        description: ''
                RESULT_PROPERTY:
                  type: array
                  items:
                    type: object
                    properties:
                      CONT_COUNTER:
                        type: integer
                        format: int64
                        description: ''
                      NAME:
                        type: string
                        format: byte
                        description: ''
                      RANK_VALUE:
                        type: integer
                        format: int64
                        description: ''
                      CLASSI_TYPE:
                        type: integer
                        format: int64
                        description: ''
                      ELEM_COUNTER:
                        type: integer
                        format: int64
                        description: ''
                SEARCH_DOCS:
                  type: array
                  items:
                    type: object
                    properties:
                      DOC_KEY:
                        type: string
                        format: byte
                        description: ''
                      DOC_COUNTER:
                        type: integer
                        format: int64
                        description: ''
                      DOC_GROUP:
                        type: string
                        format: byte
                        description: ''
                      DOC_LANGU:
                        type: string
                        format: byte
                        description: ''
                      DOC_TYPE:
                        type: string
                        format: byte
                        description: ''
              required:
              - INDEX_ID
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                properties:
                  RETURN_CODE:
                    type: integer
                    format: int64
                    description: Returncode
                  RETURN_TEXT:
                    type: string
                    format: byte
                    description: Returntext
                  CLASSIFY_ATTRS:
                    type: array
                    items:
                      type: object
                      properties:
                        ATTR_NAME:
                          type: string
                          format: byte
                          description: ''
                  DOC_ATTRIBUTES:
                    type: array
                    items:
                      type: object
                      properties:
                        DOC_COUNTER:
                          type: integer
                          format: int64
                          description: ''
                        ATTR_NAME:
                          type: string
                          format: byte
                          description: ''
                        VALUE1:
                          type: string
                          format: byte
                          description: ''
                        VALUE2:
                          type: string
                          format: byte
                          description: ''
                        ATTR_TYPE:
                          type: string
                          format: byte
                          description: ''
                        ATTR_COUNTER:
                          type: integer
                          format: int64
                          description: ''
                  DOC_CONTENT:
                    type: array
                    items:
                      type: object
                      properties:
                        DOC_COUNTER:
                          type: integer
                          format: int64
                          description: ''
                        CONTENT:
                          type: string
                          format: byte
                          description: ''
                  RESULT_CONTAINER:
                    type: array
                    items:
                      type: object
                      properties:
                        CONT_KEY:
                          type: string
                          format: byte
                          description: ''
                        CONT_COUNTER:
                          type: integer
                          format: int64
                          description: ''
                        WEIGHT:
                          type: integer
                          format: int64
                          description: ''
                        ERROR_CODE:
                          type: integer
                          format: int64
                          description: ''
                        ERROR_TEXT:
                          type: string
                          format: byte
                          description: ''
                  RESULT_ELEM:
                    type: array
                    items:
                      type: object
                      properties:
                        CONT_COUNTER:
                          type: integer
                          format: int64
                          description: ''
                        NAME:
                          type: string
                          format: byte
                          description: ''
                        RANK_VALUE:
                          type: integer
                          format: int64
                          description: ''
                        CLASSI_TYPE:
                          type: integer
                          format: int64
                          description: ''
                        ELEM_COUNTER:
                          type: integer
                          format: int64
                          description: ''
                  RESULT_PROPERTY:
                    type: array
                    items:
                      type: object
                      properties:
                        CONT_COUNTER:
                          type: integer
                          format: int64
                          description: ''
                        NAME:
                          type: string
                          format: byte
                          description: ''
                        RANK_VALUE:
                          type: integer
                          format: int64
                          description: ''
                        CLASSI_TYPE:
                          type: integer
                          format: int64
                          description: ''
                        ELEM_COUNTER:
                          type: integer
                          format: int64
                          description: ''
                  SEARCH_DOCS:
                    type: array
                    items:
                      type: object
                      properties:
                        DOC_KEY:
                          type: string
                          format: byte
                          description: ''
                        DOC_COUNTER:
                          type: integer
                          format: int64
                          description: ''
                        DOC_GROUP:
                          type: string
                          format: byte
                          description: ''
                        DOC_LANGU:
                          type: string
                          format: byte
                          description: ''
                        DOC_TYPE:
                          type: string
                          format: byte
                          description: ''
        '400':
          description: Bad request.
        5XX:
          description: Unexpected error.
