openapi: 3.0.0
info:
  title: SAP API
  version: 1.0.0
servers:
- url: http://localhost:8080
paths:
  /rfc/SAP_WAPI_GET_WORKITEM_DETAIL:
    post:
      tags:
      - SWRC
      operationId: /rfc/SAP_WAPI_GET_WORKITEM_DETAIL
      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
                WORKITEM_ID:
                  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:
              - WORKITEM_ID
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                properties:
                  RETURN_CODE:
                    type: integer
                    format: int32
                    description: Return Code (0, 1, 999)
                  WORKITEM_DETAIL:
                    type: object
                    properties:
                      WI_ID:
                        type: integer
                        format: int64
                        description: Work item ID
                      WI_TEXT:
                        type: string
                        maxLength: 120
                        description: Work item text
                      WI_TYPE:
                        type: string
                        maxLength: 1
                        description: 'Work item type  enumValues: E=Work Item that Waits for an Event (Wait Step),C=Work Item that Represents a Container Linkage,R=Work Item that Represents a Remote Work Item (http),F=Workflow (Also Subworkflow),X=Work Item that Represents a Block,B=Work Item for Background Step,A=Work Item that Represents a Work Queue,Q=Work Item that Represents a Dialog Block,W=Dialog Work Item; Represents a Single-Step Task,N=Notification Item (No Longer Used),P=Work Item that
                          Represents a Remote Work Item (Proxy WI),D=Deadline Work Item; Notification upon Missed Deadline'
                        enum:
                        - E
                        - C
                        - R
                        - F
                        - X
                        - B
                        - A
                        - Q
                        - W
                        - N
                        - P
                        - D
                      WI_TYPETEXT:
                        type: string
                        maxLength: 20
                        description: Work Item Type
                      WI_LANG:
                        type: string
                        maxLength: 1
                        description: Language for Texts of a Work Item
                      WI_LANGTEXT:
                        type: string
                        maxLength: 16
                        description: 'Workflow: Language Text'
                      WI_RH_TASK:
                        type: string
                        maxLength: 14
                        description: Task ID
                      WI_RHTEXT:
                        type: string
                        maxLength: 40
                        description: Short Text from Task
                      WI_PRIO:
                        type: integer
                        format: int64
                        description: 'Priority of a Work Item  enumValues: 1=1 Highest - Express,6=6 Low,3=3 Higher,9=9 Lowest,8=8 Very low,5=5 Medium,7=7 Lower,2=2 Very high,4=4 High'
                        enum:
                        - '1'
                        - '6'
                        - '3'
                        - '9'
                        - '8'
                        - '5'
                        - '7'
                        - '2'
                        - '4'
                      WI_PRIOTEXT:
                        type: string
                        maxLength: 25
                        description: 'Workflow: Priority'
                      WI_STAT:
                        type: string
                        maxLength: 12
                        description: 'Processing Status of a Work Item  enumValues: STARTED=In Process,CANCELLED=Logically Deleted,READY=Ready,EXCPHANDLR=Exception Being Handled,COMMITTED=Executed (Only If Expl. End Confirmation Is Expected),WAITING=Waiting (Also: Work Items in Resubmission),COMPLETED=Completed,ERROR=Error,EXCPCAUGHT=Exception Caught,CHECKED=In Preparation,SELECTED=Reserved'
                        enum:
                        - STARTED
                        - CANCELLED
                        - READY
                        - EXCPHANDLR
                        - COMMITTED
                        - WAITING
                        - COMPLETED
                        - ERROR
                        - EXCPCAUGHT
                        - CHECKED
                        - SELECTED
                      WI_STATTEXT:
                        type: string
                        maxLength: 20
                        description: 'Workflow: Work Item Status'
                      WI_DH_STAT:
                        type: integer
                        format: int64
                        description: 'Deadline Status of a Work Item  enumValues: 8996=Latest Start,8990=Requested Start,8998=Latest End,0000=Deadline Not Yet Reached,8997=Requested End'
                        enum:
                        - '8996'
                        - '8990'
                        - '8998'
                        - '0000'
                        - '8997'
                      WI_DH_STATTEXT:
                        type: string
                        maxLength: 20
                        description: 'Workflow: Work Item Status'
                      WI_CD:
                        type: string
                        format: date
                        description: Creation Date of Work Item
                      WI_CT:
                        type: string
                        maxLength: 6
                        description: Creation Time of Work Item
                      WI_CD_FTD:
                        type: string
                        maxLength: 20
                        description: Creation date of work item (formatted)
                      WI_CT_FTD:
                        type: string
                        maxLength: 20
                        description: Creation time of work item (formatted)
                      WI_CR_TIMEIO:
                        type: string
                        maxLength: 32
                        description: 'Workflow: Creation Time/Date'
                      WI_DSD:
                        type: string
                        format: date
                        description: Requested Start Date for Work Item
                      WI_DST:
                        type: string
                        maxLength: 6
                        description: Requested start time for work item
                      WI_DSD_FTD:
                        type: string
                        maxLength: 20
                        description: Requested Start Date of a Work Item (Formatted)
                      WI_DST_FTD:
                        type: string
                        maxLength: 20
                        description: Requested Start Time of a Work Item (Formatted)
                      WI_DS_TIMEIO:
                        type: string
                        maxLength: 32
                        description: 'Workflow: Date/Time for Submission Deadline'
                      WI_LSD:
                        type: string
                        format: date
                        description: Latest Start Date for Work Item
                      WI_LST:
                        type: string
                        maxLength: 6
                        description: Latest start time for work item
                      WI_LSD_FTD:
                        type: string
                        maxLength: 20
                        description: Latest Start Date of a Work Item (Formatted)
                      WI_LST_FTD:
                        type: string
                        maxLength: 20
                        description: Latest Start Time of a Work Item (Formatted)
                      WI_LS_TIMEIO:
                        type: string
                        maxLength: 32
                        description: 'Workflow: Date/Time for Latest Start'
                      WI_DED:
                        type: string
                        format: date
                        description: Requested End Date for Work Item
                      WI_DET:
                        type: string
                        maxLength: 6
                        description: Requested end time for work item
                      WI_DED_FTD:
                        type: string
                        maxLength: 20
                        description: Required End Date/Time of a Work Item (Formatted)
                      WI_DET_FTD:
                        type: string
                        maxLength: 20
                        description: Required End Time of a Work Item (Formatted)
                      WI_DE_TIMEIO:
                        type: string
                        maxLength: 32
                        description: 'Workflow: Date/Time for Required End'
                      WI_LED:
                        type: string
                        format: date
                        description: Latest End Date for Work Item
                      WI_LET:
                        type: string
                        maxLength: 6
                        description: Latest end time for work item
                      WI_LED_FTD:
                        type: string
                        maxLength: 20
                        description: Latest end date of a work item (formatted)
                      WI_LET_FTD:
                        type: string
                        maxLength: 20
                        description: Latest End Time of a Work Item (Formatted)
                      WI_LE_TIMEIO:
                        type: string
                        maxLength: 32
                        description: 'Workflow: Date/Time of Deadline'
                      WI_AAGENT:
                        type: string
                        maxLength: 12
                        description: Actual Agent of Work Item
                      WI_AA_NAME:
                        type: string
                        maxLength: 40
                        description: Name of Actual Agent
                      WI_FORW_BY:
                        type: string
                        maxLength: 12
                        description: (Last) forwarder of work item
                      WI_FORW_NAME:
                        type: string
                        maxLength: 40
                        description: Name of Last Forwarder
                      WI_CHCKWI:
                        type: integer
                        format: int64
                        description: Superordinate Work Item
                      TOP_WI_ID:
                        type: integer
                        format: int64
                        description: 'Workflow: Unique ID of Top-Level Instance (6.1/get)'
                      NOTE_COUNT:
                        type: integer
                        format: int32
                        description: Number of Attachments
                      EXEC_TIME:
                        type: integer
                        format: int32
                        description: 'Workflow: De Facto Execution Time in Sec (6.1/get)'
                  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.
