openapi: 3.0.0
info:
  title: SAP API
  version: 1.0.0
servers:
- url: http://localhost:8080
paths:
  /rfc/SAP_WAPI_GET_WI_AGENTS:
    post:
      tags:
      - SWRW
      operationId: /rfc/SAP_WAPI_GET_WI_AGENTS
      requestBody:
        content:
          application/json:
            schema:
              properties:
                LANGUAGE:
                  type: string
                  default: SY-LANGU
                  maxLength: 1
                  description: SAP R/3 System, Current Language
                USER:
                  type: string
                  default: SY-UNAME
                  maxLength: 12
                  description: SAP System, User Logon Name
                WITH_SUBSTITUTES:
                  type: string
                  maxLength: 1
                  description: SAP System, User Logon Name
                WORKITEMS:
                  type: array
                  items:
                    type: integer
                    format: int64
                    description: Work item ID
                MESSAGE_LINES:
                  type: array
                  items:
                    type: object
                    properties:
                      MSG_TYPE:
                        type: string
                        maxLength: 1
                        description: Message Type
                      LINE:
                        type: string
                        maxLength: 273
                        description: Text line for message
                MESSAGE_STRUCT:
                  type: array
                  items:
                    type: object
                    properties:
                      MSGID:
                        type: string
                        maxLength: 20
                        description: Message Class
                      MSGTY:
                        type: string
                        maxLength: 1
                        description: Message Type
                      MSGNO:
                        type: integer
                        format: int64
                        description: Message Number
                      MSGV1:
                        type: string
                        maxLength: 50
                        description: Message Variable
                      MSGV2:
                        type: string
                        maxLength: 50
                        description: Message Variable
                      MSGV3:
                        type: string
                        maxLength: 50
                        description: Message Variable
                      MSGV4:
                        type: string
                        maxLength: 50
                        description: Message Variable
              required:
              - LANGUAGE
              - USER
              - WORKITEMS
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                properties:
                  RETURN_CODE:
                    type: integer
                    format: int32
                    description: Return code (0,999)
                  TIMESTAMP:
                    type: integer
                    format: int64
                    description: UTC time stamp in long form (YYYYMMDDhhmmssmmmuuun)
                  WI_AGENTS:
                    type: array
                    items:
                      type: object
                      properties:
                        WI_ID:
                          type: integer
                          format: int64
                          description: Work item ID
                        USER:
                          type: string
                          maxLength: 12
                          description: User Name
                        GENERAL:
                          type: string
                          maxLength: 1
                          description: Checkbox
                        IS_SUBSTITUTE:
                          type: string
                          maxLength: 1
                          description: Checkbox
                        SUBST_FOR_OTYPE:
                          type: string
                          maxLength: 2
                          description: Object Type
                        SUBST_FOR_OBJID:
                          type: string
                          maxLength: 12
                          description: Agent ID in Organizational Management
                  MESSAGE_LINES:
                    type: array
                    items:
                      type: object
                      properties:
                        MSG_TYPE:
                          type: string
                          maxLength: 1
                          description: Message Type
                        LINE:
                          type: string
                          maxLength: 273
                          description: Text line for message
                  MESSAGE_STRUCT:
                    type: array
                    items:
                      type: object
                      properties:
                        MSGID:
                          type: string
                          maxLength: 20
                          description: Message Class
                        MSGTY:
                          type: string
                          maxLength: 1
                          description: Message Type
                        MSGNO:
                          type: integer
                          format: int64
                          description: Message Number
                        MSGV1:
                          type: string
                          maxLength: 50
                          description: Message Variable
                        MSGV2:
                          type: string
                          maxLength: 50
                          description: Message Variable
                        MSGV3:
                          type: string
                          maxLength: 50
                          description: Message Variable
                        MSGV4:
                          type: string
                          maxLength: 50
                          description: Message Variable
        '400':
          description: Bad request.
        5XX:
          description: Unexpected error.
