openapi: 3.0.0
info:
  title: SAP API
  version: 1.0.0
servers:
- url: http://localhost:8080
paths:
  /rfc/SAP_WAPI_START_WORKFLOW:
    post:
      tags:
      - SWRR
      summary: 'Workflow interfaces: Start workflow'
      operationId: /rfc/SAP_WAPI_START_WORKFLOW
      requestBody:
        content:
          application/json:
            schema:
              properties:
                DESIRED_START_DATE:
                  type: string
                  format: date
                  description: 'WAPI: Date in internal format (YYYYMMDD)'
                DESIRED_START_TIME:
                  type: string
                  maxLength: 6
                  description: 'WAPI: Time in internal format (hhmmss)'
                DESIRED_START_ZONLO:
                  type: string
                  default: SY-ZONLO
                  maxLength: 6
                  description: Date and time, time zone of user
                DO_COMMIT:
                  type: string
                  default: X
                  maxLength: 1
                  description: Execute Commit
                IFS_XML_CONTAINER:
                  type: string
                  format: byte
                  description: Workflow Container as XML Data Stream
                LANGUAGE:
                  type: string
                  default: SY-LANGU
                  maxLength: 1
                  description: Language
                START_ASYNCHRONOUS:
                  type: string
                  default: ' '
                  maxLength: 1
                  description: Start Workflow Asynchronously
                TASK:
                  type: string
                  maxLength: 14
                  description: Task (According to PD org.)
                USER:
                  type: string
                  default: SY-UNAME
                  maxLength: 12
                  description: ABAP System, User Logon Name
                AGENTS:
                  type: array
                  items:
                    type: object
                    properties:
                      OTYPE:
                        type: string
                        maxLength: 2
                        description: Object Type
                      OBJID:
                        type: string
                        maxLength: 12
                        description: Agent ID in Organizational Management
                INPUT_CONTAINER:
                  type: array
                  items:
                    type: object
                    properties:
                      ELEMENT:
                        type: string
                        maxLength: 32
                        description: Element
                      VALUE:
                        type: string
                        maxLength: 255
                        description: Character value
                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:
              - TASK
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                properties:
                  NEW_STATUS:
                    type: object
                    properties:
                      STATUS:
                        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
                      STATUSTEXT:
                        type: string
                        maxLength: 20
                        description: 'Workflow: Work Item Status'
                  RETURN_CODE:
                    type: integer
                    format: int32
                    description: Return code (0 - 6, 999)
                  WORKITEM_ID:
                    type: integer
                    format: int64
                    description: Work Item ID
                  AGENTS:
                    type: array
                    items:
                      type: object
                      properties:
                        OTYPE:
                          type: string
                          maxLength: 2
                          description: Object Type
                        OBJID:
                          type: string
                          maxLength: 12
                          description: Agent ID in Organizational Management
                  INPUT_CONTAINER:
                    type: array
                    items:
                      type: object
                      properties:
                        ELEMENT:
                          type: string
                          maxLength: 32
                          description: Element
                        VALUE:
                          type: string
                          maxLength: 255
                          description: Character value
                  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.
