Web API configuration to upload a file along with input data

Hi Team,


We have a requirement to get files from external system along with some input parameters to our process model via a web api.

The web api which starts a process would upload the file to the target folder and write/update data in respective appian DB tables.

How can we achieve this?

Request format : 

document - type (document/file)

id - type int

name - type text etc

This request can either be in form or json format.

Appian version used is 21.1

  Discussion posts and replies are publicly visible

Parents Reply
  • Did you go through the link I've attached? That contains pretty much everything you need including examples on how to build the API, how to initiate the PM and how to pass the process variables into it. 

    Simply, on the given example the http!request.body will be your json message which you have to pass into the Process Model in a pv. For example: 

    a!startProcess(
          processModel: cons!UPLOAD_STUDENT_TRANSCRIPT,
          processParameters: {
    jsonData: http!request.body
    },

    The jsonData should be a process variable of type text in the PM.

    For parsing the jsonData and getting your information from it, use the a!fromJson() function in an expression rule.

Children
No Data