openapi: 3.0.0
info:
  title: SAP API
  version: 1.0.0
servers:
- url: http://localhost:8080
paths:
  /rfc/COM_SES_SEARCH_OBJECTS:
    post:
      tags:
      - COM_SES_SEARCH
      summary: Search Objects
      operationId: /rfc/COM_SES_SEARCH_OBJECTS
      requestBody:
        content:
          application/json:
            schema:
              properties:
                IT_OBJECT_TYPE:
                  type: array
                  items:
                    type: object
                    properties:
                      BUSOBJ:
                        type: string
                        maxLength: 10
                        description: Business Object for Search Engine Service (SES)
                      OBJECT_TYPE:
                        type: string
                        maxLength: 10
                        description: Type of Business Object
                IT_QUERY_ENTRIES:
                  type: array
                  items:
                    type: object
                    properties:
                      LOCATION:
                        type: string
                        maxLength: 64
                        description: Attribute name
                      VALUE1:
                        type: string
                        description: Value low
                      VALUE2:
                        type: string
                        description: Value high (only for between search)
                      ROWTYPE:
                        type: string
                        maxLength: 15
                        description: Rowtype (TERM, OPERATOR, ATTRIBUTE,...)
                      OPERATOR:
                        type: string
                        maxLength: 2
                        description: Operator (EQ, BT, ...)
                      CONTENT_TYPE:
                        type: string
                        maxLength: 1
                        description: Content type
                      TERM_ACTION:
                        type: string
                        maxLength: 1
                        description: Term action (Exact, fuzzy, linquistic search)
                      TERM_WEIGHT:
                        type: integer
                        format: int32
                        description: Weighting
                      NEAR_WIDTH:
                        type: integer
                        format: int32
                        description: 'Phrase search: max. distance between two terms'
                      NEAR_ORDER:
                        type: integer
                        format: int32
                        description: 'Phrase search: order of the terms;  0=ordered, 1=unordered'
                      FUZZY_SIMILARITY:
                        type: integer
                        format: int32
                        description: 'Fuzzy search: similarity 0..10000'
                      RANK_METHOD:
                        type: integer
                        format: int32
                        description: 'Phrase search: 0=nearRanking, 1=frequencyRanking, 2=combined'
                      SEARCH_FLAG:
                        type: integer
                        format: int32
                        description: 'Search flag: 0=default, 1=case sensitive, 2=norm. combounds'
                      FEMS_NUMBER:
                        type: integer
                        format: int64
                        description: 'BW only: FEMS number'
                      INDEX_ID:
                        type: string
                        maxLength: 64
                        description: Index Id
                      JOIN_PATH:
                        type: string
                        maxLength: 10
                        description: Join Path
                      LOC_LANGU:
                        type: string
                        maxLength: 2
                        description: Language for location (not for the indexId)
                      QUERY_PART:
                        type: integer
                        format: int32
                        description: Number of the query part (from -4999 to 5000)
                      BULK_QUERY_PART:
                        type: integer
                        format: int64
                        description: Number of bulk query (from 0 to 9999)
                IT_REQ_ATTRIBUTES:
                  type: array
                  items:
                    type: object
                    properties:
                      ATTR_NAME:
                        type: string
                        maxLength: 64
                        description: Attribute name
                IT_REQ_JOIN_ATTRIBUTES:
                  type: array
                  items:
                    type: object
                    properties:
                      ATTR_NAME:
                        type: string
                        maxLength: 64
                        description: Attribute name
                      INDEX_ID:
                        type: string
                        maxLength: 64
                        description: Index Id
                      LANGU:
                        type: string
                        maxLength: 2
                        description: Language of the index
                      JOIN_PATH:
                        type: string
                        maxLength: 10
                        description: Join path
                      QUERY_PART:
                        type: integer
                        format: int64
                        description: ''
                IT_SORT_ATTRIBUTES:
                  type: array
                  items:
                    type: object
                    properties:
                      ATTR_NAME:
                        type: string
                        maxLength: 64
                        description: name of the attribute
                      SORT:
                        type: string
                        maxLength: 1
                        description: 1 for ascending,  0 for  descending
                      INDEX_ID:
                        type: string
                        maxLength: 64
                        description: Index Id
                      LANGU:
                        type: string
                        maxLength: 2
                        description: Language of the index
                      JOIN_PATH:
                        type: string
                        maxLength: 10
                        description: Join path
                      WEIGHT:
                        type: integer
                        format: int64
                        description: ''
                IV_AUTH_CHECK_LIMIT:
                  type: integer
                  format: int32
                  description: Maximum Number of Objects at Authorization Check
                IV_LANGUAGE:
                  type: string
                  maxLength: 2
                  description: Language of the Search Request
                IV_REQUESTED_RESULTS:
                  type: integer
                  format: int32
                  default: 1
                  description: 'Requested Results: 1 = docs, 8 = hit attrs / doc, 9 = both'
                IV_REQUEST_FLAGS:
                  type: integer
                  format: int64
                  default: 0
                  description: 'Request Flags, Semantics: 128 = distinct'
                IV_RESULT_FROM:
                  type: integer
                  format: int32
                  default: 1
                  description: From Hit Number
                IV_RESULT_TO:
                  type: integer
                  format: int32
                  default: 20
                  description: To Hit Number
                IV_SEARCH_BY_RELATION:
                  type: string
                  maxLength: 1
                  description: X = Search by Relation
              required:
              - IT_QUERY_ENTRIES
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                properties:
                  ET_INDEX_INFOS:
                    type: array
                    items:
                      type: object
                      properties:
                        BUSOBJ:
                          type: string
                          maxLength: 10
                          description: Business Object for Search Engine Service (SES)
                        OBJECT_TYPE:
                          type: string
                          maxLength: 10
                          description: Type of Business Object
                        ENTRY_FOUND:
                          type: string
                          maxLength: 1
                          description: 'Data element for domain BOOLE: TRUE (=''X'') and FALSE (='' '')'
                        INDEX_ACTIVE:
                          type: string
                          maxLength: 1
                          description: Index is Active
                        INDEX_ID:
                          type: string
                          maxLength: 64
                          description: Object Index ID in the Search Engine
                        MULTILANGUAGE:
                          type: string
                          maxLength: 1
                          description: Index Contains Multilingual Objects
                        RFC_DESTINATION:
                          type: string
                          maxLength: 32
                          description: Logical Destination (Specified in Function Call)
                  ET_RESULT_ITEMS:
                    type: array
                    items:
                      type: object
                      properties:
                        OBJECT_TYPE:
                          type: object
                          properties:
                            BUSOBJ:
                              type: string
                              maxLength: 10
                              description: Business Object for Search Engine Service (SES)
                            OBJECT_TYPE:
                              type: string
                              maxLength: 10
                              description: Type of Business Object
                            LANGUAGE:
                              type: string
                              maxLength: 2
                              description: Language according to ISO 639
                            OBJ_TYPE_TEXT:
                              type: string
                              maxLength: 60
                              description: Description of Object Type
                        OBJECT_ID:
                          type: string
                          maxLength: 70
                          description: Internal Object ID (GUID) in Search Engine Service (SES)
                        RANK_VALUE:
                          type: integer
                          format: int32
                          description: Rank Value (0..1000000)
                        ATTRIBUTES:
                          type: array
                          items:
                            type: object
                            properties:
                              ATTR_NAME:
                                type: string
                                maxLength: 64
                                description: Attribute name
                              VALUE1:
                                type: string
                                description: Attribute value
                              VALUE2:
                                type: string
                                description: Value2 (not yet implemented)
                              ATTR_TYPE:
                                type: string
                                maxLength: 1
                                description: Attribute type
                              INDEX_ID:
                                type: string
                                maxLength: 64
                                description: Index Id
                  EV_AUTH_CHECK_IS_COMPLETE:
                    type: string
                    maxLength: 1
                    description: X = All Search Engine Hits Were Checked for Authorization
                  EV_COMPONENT_RUNTIME:
                    type: object
                    properties:
                      RFC_SERVER_TIME:
                        type: integer
                        format: int32
                        description: ''
                      TREX_CLIENT_TIME:
                        type: integer
                        format: int32
                        description: ''
                      TREX_KERNEL_TIME:
                        type: integer
                        format: int32
                        description: ''
                      ABAP_RFC_TIME:
                        type: integer
                        format: int32
                        description: ''
                  EV_NO_OF_ALL_HITS:
                    type: integer
                    format: int32
                    description: Number of All Hits
                  EV_NO_OF_HITS:
                    type: integer
                    format: int32
                    description: Number of Hits in the Hit List
                  EV_RETURN_CODE:
                    type: integer
                    format: int32
                    description: Return Code of the Search Engine
                  EV_RETURN_TEXT:
                    type: string
                    maxLength: 200
                    description: Return Text of the Search Engine
                  EV_RUN_TIME_BO:
                    type: integer
                    format: int32
                    description: Runtime of the Business Object Per Hit
                  EV_RUN_TIME_SE:
                    type: integer
                    format: int32
                    description: Runtime of the Search Engine, Total
        '400':
          description: Bad request.
        5XX:
          description: Unexpected error.
