Skip to main content
December 15, 2021
Question

How to call a process from a GET Web API ?

  • December 15, 2021
  • 2 replies
  • 0 views

Hi All,

I am creating Document Download WebAPI which will be called by external system to download Appian Document . I want to capture few parameters such as data, time , document , user  whenever the document is downloaded (for an audit purpose) .I am trying to use a!startprocess or a!writetodatastoreentity() in the same webAPI but it doesn't work .

Can I call a smart service a!startProcess or a!writeToDataStoreEntity in web API's of the method GET?

What should be approach in this case ?

Any help would be appreciated. Thanks in advance!

2 replies

stefanhelzle0001
Brainy
December 15, 2021

A GET API cannot modify data in Appian.Why does that have to be a GET?

richardm900458
December 15, 2021

stefan is absolutly right here regarding "GET"
https://docs.appian.com/suite/help/21.4/Designing_Web_APIs.html
"Only Web APIs for the POSTPUTDELETE, and PATCH methods may execute smart services. Web APIs for the GET method will not execute any smart services included in their expression. Attempting to do so will result in the following error message: Smart Services cannot be executed in Web APIs that have a method of "GET."