openapi: 3.0.0
info:
  title: SAP API
  version: 1.0.0
servers:
- url: http://localhost:8080
paths:
  /rfc/TREX_RFC_GET_REORG_DATA:
    post:
      tags:
      - TREX_RFC_ADMINISTRATION
      summary: Get the target state (improvement forecast) of a TREX index reorg run
      operationId: /rfc/TREX_RFC_GET_REORG_DATA
      requestBody:
        content:
          application/json:
            schema:
              properties:
                REORG_PLAN:
                  type: array
                  items:
                    type: object
                    properties:
                      STEP:
                        type: integer
                        format: int64
                        description: Number of the plan steps that are executed in this order
                      STATE:
                        type: integer
                        format: int64
                        description: 'State of a step in a TREX index reorg plan  enumValues: 5=cancel,0=idle,1=start,2=working,6=canelling,7=cancelled,4=failed,3=done'
                        enum:
                        - '5'
                        - '0'
                        - '1'
                        - '2'
                        - '6'
                        - '7'
                        - '4'
                        - '3'
                      OPERATION:
                        type: integer
                        format: int64
                        description: 'Operation in a TREX index reorg plan  enumValues: 02=switch master backup,03=move backup,07=remove slave,09=remove temp index,08=split,00=none,06=add slave,04=add backup,01=move master,05=remove backup'
                        enum:
                        - '02'
                        - '03'
                        - '07'
                        - '09'
                        - '08'
                        - '00'
                        - '06'
                        - '04'
                        - '01'
                        - '05'
                      INDEX_ID:
                        type: string
                        format: byte
                        description: Index ID
                      TARGET_LOCATION:
                        type: string
                        format: byte
                        description: Host:Port of TREX Service
                      ERROR_CODE:
                        type: integer
                        format: int64
                        description: Error Code
                      ERROR_MESSAGE:
                        type: string
                        format: byte
                        description: Error Message
                      BEGIN_TIME:
                        type: integer
                        format: int64
                        description: Begin time in [ms]
                      END_TIME:
                        type: integer
                        format: int64
                        description: End time in [ms]
                REORG_TARGET_STATE:
                  type: array
                  items:
                    type: object
                    properties:
                      KEY_FIGURE:
                        type: string
                        format: byte
                        description: Key Figure which is improved by a reorg run
                      CURRENT_VALUE:
                        type: string
                        format: byte
                        description: Current value of the key figure
                      TARGET_VALUE:
                        type: string
                        format: byte
                        description: predicted value after a reorg run
                      IMPROVEMENT:
                        type: string
                        format: byte
                        description: improvement of a reorg run in %, absolute value, yes, no...
                      REORG_HINT:
                        type: integer
                        format: int64
                        description: 'Hint if a TREX index reorg run is recommended or not  enumValues: 1=reorg yes,2=reorg optional,0=reorg no,3=reorg error'
                        enum:
                        - '1'
                        - '2'
                        - '0'
                        - '3'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                properties:
                  REORG_REQUIRED_SUMMARY:
                    type: integer
                    format: int64
                    description: Hint if a TREX index reorg run is recommended or not
                  RETURN_CODE:
                    type: integer
                    format: int64
                    description: Return Code
                  RETURN_TEXT:
                    type: string
                    format: byte
                    description: Return Text
                  REORG_PLAN:
                    type: array
                    items:
                      type: object
                      properties:
                        STEP:
                          type: integer
                          format: int64
                          description: Number of the plan steps that are executed in this order
                        STATE:
                          type: integer
                          format: int64
                          description: 'State of a step in a TREX index reorg plan  enumValues: 5=cancel,0=idle,1=start,2=working,6=canelling,7=cancelled,4=failed,3=done'
                          enum:
                          - '5'
                          - '0'
                          - '1'
                          - '2'
                          - '6'
                          - '7'
                          - '4'
                          - '3'
                        OPERATION:
                          type: integer
                          format: int64
                          description: 'Operation in a TREX index reorg plan  enumValues: 02=switch master backup,03=move backup,07=remove slave,09=remove temp index,08=split,00=none,06=add slave,04=add backup,01=move master,05=remove backup'
                          enum:
                          - '02'
                          - '03'
                          - '07'
                          - '09'
                          - '08'
                          - '00'
                          - '06'
                          - '04'
                          - '01'
                          - '05'
                        INDEX_ID:
                          type: string
                          format: byte
                          description: Index ID
                        TARGET_LOCATION:
                          type: string
                          format: byte
                          description: Host:Port of TREX Service
                        ERROR_CODE:
                          type: integer
                          format: int64
                          description: Error Code
                        ERROR_MESSAGE:
                          type: string
                          format: byte
                          description: Error Message
                        BEGIN_TIME:
                          type: integer
                          format: int64
                          description: Begin time in [ms]
                        END_TIME:
                          type: integer
                          format: int64
                          description: End time in [ms]
                  REORG_TARGET_STATE:
                    type: array
                    items:
                      type: object
                      properties:
                        KEY_FIGURE:
                          type: string
                          format: byte
                          description: Key Figure which is improved by a reorg run
                        CURRENT_VALUE:
                          type: string
                          format: byte
                          description: Current value of the key figure
                        TARGET_VALUE:
                          type: string
                          format: byte
                          description: predicted value after a reorg run
                        IMPROVEMENT:
                          type: string
                          format: byte
                          description: improvement of a reorg run in %, absolute value, yes, no...
                        REORG_HINT:
                          type: integer
                          format: int64
                          description: 'Hint if a TREX index reorg run is recommended or not  enumValues: 1=reorg yes,2=reorg optional,0=reorg no,3=reorg error'
                          enum:
                          - '1'
                          - '2'
                          - '0'
                          - '3'
        '400':
          description: Bad request.
        5XX:
          description: Unexpected error.
