openapi: 3.0.0
info:
  title: SAP API
  version: 1.0.0
servers:
- url: http://localhost:8080
paths:
  /rfc/RS_DME_BAPI_CALL_WHATIF:
    post:
      tags:
      - RS_DME_BAPI
      summary: Execute What-If Prediction for given field values - INBOUND function
      operationId: /rfc/RS_DME_BAPI_CALL_WHATIF
      requestBody:
        content:
          application/json:
            schema:
              properties:
                I_ENGINE:
                  type: string
                  maxLength: 30
                  description: Analytical service
                I_MODEL:
                  type: string
                  maxLength: 30
                  description: Analytical Model
                E_T_OUTPUT:
                  type: array
                  items:
                    type: object
                    properties:
                      SETID:
                        type: integer
                        format: int64
                        description: Unique Record ID
                      OUTPUT_FIELD:
                        type: string
                        maxLength: 30
                        description: Prediction Output Field
                      OUTPUT_FIELD_DESC:
                        type: string
                        maxLength: 50
                        description: Description
                      RANK:
                        type: integer
                        format: int32
                        description: Rank
                      VALUE:
                        type: string
                        maxLength: 64
                        description: Attribute Values
                      VALUE_DESC:
                        type: string
                        maxLength: 50
                        description: Description
                E_T_RETURN:
                  type: array
                  items:
                    type: object
                    properties:
                      TYPE:
                        type: string
                        maxLength: 1
                        description: 'Message type: S Success, E Error, W Warning, I Info, A Abort'
                      ID:
                        type: string
                        maxLength: 20
                        description: Message Class
                      NUMBER:
                        type: integer
                        format: int64
                        description: Message Number
                      MESSAGE:
                        type: string
                        maxLength: 220
                        description: Message Text
                      LOG_NO:
                        type: string
                        maxLength: 20
                        description: 'Application log: log number'
                      LOG_MSG_NO:
                        type: integer
                        format: int64
                        description: 'Application log: Internal message serial number'
                      MESSAGE_V1:
                        type: string
                        maxLength: 50
                        description: Message Variable
                      MESSAGE_V2:
                        type: string
                        maxLength: 50
                        description: Message Variable
                      MESSAGE_V3:
                        type: string
                        maxLength: 50
                        description: Message Variable
                      MESSAGE_V4:
                        type: string
                        maxLength: 50
                        description: Message Variable
                      PARAMETER:
                        type: string
                        maxLength: 32
                        description: Parameter Name
                      ROW:
                        type: integer
                        format: int32
                        description: Lines in parameter
                      FIELD:
                        type: string
                        maxLength: 30
                        description: Field in parameter
                      SYSTEM:
                        type: string
                        maxLength: 10
                        description: Logical system from which message originates
                I_T_FIELD_VALUES:
                  type: array
                  items:
                    type: object
                    properties:
                      SETID:
                        type: integer
                        format: int64
                        description: Unique Record ID
                      MODEL_FIELD:
                        type: string
                        maxLength: 30
                        description: Model Field Name
                      MODEL_FIELD_DESC:
                        type: string
                        maxLength: 50
                        description: Description
                      VALUE:
                        type: string
                        maxLength: 64
                        description: Attribute Values
                      IS_OUTPUT_FIELD:
                        type: string
                        maxLength: 1
                        description: Field Type - Model Signature field / Prediction Output Field
                      RANK:
                        type: integer
                        format: int32
                        description: Rank
                      TARGET_VAL:
                        type: string
                        maxLength: 64
                        description: Target Value (RFC)
                      MAP_BY_RANK:
                        type: string
                        maxLength: 1
                        description: Mapped by Rank ?
              required:
              - I_ENGINE
              - I_MODEL
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                properties:
                  E_T_OUTPUT:
                    type: array
                    items:
                      type: object
                      properties:
                        SETID:
                          type: integer
                          format: int64
                          description: Unique Record ID
                        OUTPUT_FIELD:
                          type: string
                          maxLength: 30
                          description: Prediction Output Field
                        OUTPUT_FIELD_DESC:
                          type: string
                          maxLength: 50
                          description: Description
                        RANK:
                          type: integer
                          format: int32
                          description: Rank
                        VALUE:
                          type: string
                          maxLength: 64
                          description: Attribute Values
                        VALUE_DESC:
                          type: string
                          maxLength: 50
                          description: Description
                  E_T_RETURN:
                    type: array
                    items:
                      type: object
                      properties:
                        TYPE:
                          type: string
                          maxLength: 1
                          description: 'Message type: S Success, E Error, W Warning, I Info, A Abort'
                        ID:
                          type: string
                          maxLength: 20
                          description: Message Class
                        NUMBER:
                          type: integer
                          format: int64
                          description: Message Number
                        MESSAGE:
                          type: string
                          maxLength: 220
                          description: Message Text
                        LOG_NO:
                          type: string
                          maxLength: 20
                          description: 'Application log: log number'
                        LOG_MSG_NO:
                          type: integer
                          format: int64
                          description: 'Application log: Internal message serial number'
                        MESSAGE_V1:
                          type: string
                          maxLength: 50
                          description: Message Variable
                        MESSAGE_V2:
                          type: string
                          maxLength: 50
                          description: Message Variable
                        MESSAGE_V3:
                          type: string
                          maxLength: 50
                          description: Message Variable
                        MESSAGE_V4:
                          type: string
                          maxLength: 50
                          description: Message Variable
                        PARAMETER:
                          type: string
                          maxLength: 32
                          description: Parameter Name
                        ROW:
                          type: integer
                          format: int32
                          description: Lines in parameter
                        FIELD:
                          type: string
                          maxLength: 30
                          description: Field in parameter
                        SYSTEM:
                          type: string
                          maxLength: 10
                          description: Logical system from which message originates
                  I_T_FIELD_VALUES:
                    type: array
                    items:
                      type: object
                      properties:
                        SETID:
                          type: integer
                          format: int64
                          description: Unique Record ID
                        MODEL_FIELD:
                          type: string
                          maxLength: 30
                          description: Model Field Name
                        MODEL_FIELD_DESC:
                          type: string
                          maxLength: 50
                          description: Description
                        VALUE:
                          type: string
                          maxLength: 64
                          description: Attribute Values
                        IS_OUTPUT_FIELD:
                          type: string
                          maxLength: 1
                          description: Field Type - Model Signature field / Prediction Output Field
                        RANK:
                          type: integer
                          format: int32
                          description: Rank
                        TARGET_VAL:
                          type: string
                          maxLength: 64
                          description: Target Value (RFC)
                        MAP_BY_RANK:
                          type: string
                          maxLength: 1
                          description: Mapped by Rank ?
        '400':
          description: Bad request.
        5XX:
          description: Unexpected error.
