BPM, Workflow, and Case

BPM, Workflow, and Case

Come for answers. Stay for best practices. All we’re missing is you.

 View Only
  • 1.  Uploading a file in External Service

    Posted Mon February 07, 2022 07:12 AM
    I am trying to import a YAML file for an external service, but I am getting the following error on import.

    image
    This is the YAML for that part: 

    /XXXX/Upload:
    post:
    summary: Document upload
    tags:
    - Misc
    operationId: Documentupload
    deprecated: false
    produces:
    - application/json
    Consumes:
    - application/x-www-form-urlencoded
    parameters:
    - name: TransactionID
    in: formData
    required: true
    type: string
    description: ''
    - name: File
    in: formData
    required: true
    type: file
    description: ''
    responses:
    '200':
    description: ''
    headers: {}
    schema:
    $ref: "#/definitions/Documentuploadout"
    security:
    - basic: []

    How can I correct this for pass a document to this external service



    ------------------------------
    Alistair Gardner
    ------------------------------


  • 2.  RE: Uploading a file in External Service

    Posted Mon February 07, 2022 07:37 AM
    In BAW 19.X content type application/x-www-form-urlencoded is not supported.
    However, you can use multipart/form-data content type.
    See:
    https://www.ibm.com/docs/en/baw/19.x?topic=javascript-passing-file-types#cdev_restapis_invoke_rest_c__7_file_output

    Other restrictions are documented here:
    https://www.ibm.com/docs/en/baw/19.x?topic=service-limitations-invoking-rest

    ------------------------------
    Sebastian Tylko
    ------------------------------