Web API to receive a document from an external system

Certified Lead Developer

Hi,

Is it possible to create a WebAPI in Appian that can receive a document?

Basically an API that can handle multipart requests.

 

Regards,

Sunil Zacharia

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer
    Hi Sunil,

    Web Api's in Appian are meant for exposing Appian data or documents to external systems. If you want to recieve a document from external systems you can use integration object.
  • 0
    Certified Lead Developer
    in reply to santoshd378
    Hi Santosh,

    I agree that Web Api's in Appian can expose Appian data/documents to external systems but they can also be used to start processes in Appian.
    My requirment is to start a process in Appian with a document and meta-data as input from an external system which as per my understanding is a valid use case.

    Regards,
    Sunil Zacharia
  • Hi Sunil ,

    As per your requirement you have to start a process model which has parameters coming in from an external system.
    In this case you expose your web api which calls your process model and data from the external system should be given as an input to the web-api which in-turn will be passed to the process model you want to trigger.

    For this to happen, you must set the property processParameters : http!request.body . Where body will be having that external data that you want to pass to the process model.

    Hope this helps.


    Thanks,
    Rohit Ouhal
  • 0
    A Score Level 2
    in reply to Sunil Zacharia
    Hi Sunil,
    We are Implemented a different use case, we use to get base64 document data in Json from an Http query smart service and we use that document bytes and convert it into an appian document.
    What i can say here like you can create an json request tha sends the base64 document along with meta data, and pass to the Web Api, now you can store those values in a process variable and convert that base64 document to Appian document.
    This is not a recommended way since this service will be tightly coupled with the base64 document json request only and there is no reusability for the service(web Api) that we are developing the user has to send doc bytes only.
Reply
  • 0
    A Score Level 2
    in reply to Sunil Zacharia
    Hi Sunil,
    We are Implemented a different use case, we use to get base64 document data in Json from an Http query smart service and we use that document bytes and convert it into an appian document.
    What i can say here like you can create an json request tha sends the base64 document along with meta data, and pass to the Web Api, now you can store those values in a process variable and convert that base64 document to Appian document.
    This is not a recommended way since this service will be tightly coupled with the base64 document json request only and there is no reusability for the service(web Api) that we are developing the user has to send doc bytes only.
Children
  • 0
    Certified Lead Developer
    in reply to chandu
    Hi Chandu,

    I was looking at exactly the same solution. However I could not find an existing plugin/service that can convert a base64 string into an Appian document directly. How did you manage to do that?
    I agree with you that this is a costly operation but we need this for our use case and we don’t expect high volumes of input through this design.

    Regards,
    Sunil Zacharia