WEB API for List

Certified Lead Developer
Is it possible to pass list to the WEB API

Detail requirement
1. We have a requirement to calculate due dates base on start dates+interval in days(varies base on DB config).
2. As we have public holidays and working time set in Appian I am trying to utilize Appian to calculate Due date base on the input parameter.
3. This due dates will be used by the Non-Appian system. which shares the same database.
4. So I am trying to call WEB API from Non-Appian system with list of dates and intervals
I am able to achieve this for single date and interval, But not sure whether this can be done for list of date

OriginalPostID-265585

  Discussion posts and replies are publicly visible

Parents
  • Two approaches:
    1. The easy one: You could try passing the list as text joined by some delimiter, the Web API at Appian side can then split it and then do whatever it wants with that list

    2. Pass the data in JSON format. The query parameters(if it is a GET WebAPI) can be passed in JSON format. Or pass it in request body(if it is a POST WebAPI). Either way, your data goes to WebAPI in a JSON string. At Appian side, simply use the a!fromJson() function to extract the list passed in the query parameters or request body
Reply
  • Two approaches:
    1. The easy one: You could try passing the list as text joined by some delimiter, the Web API at Appian side can then split it and then do whatever it wants with that list

    2. Pass the data in JSON format. The query parameters(if it is a GET WebAPI) can be passed in JSON format. Or pass it in request body(if it is a POST WebAPI). Either way, your data goes to WebAPI in a JSON string. At Appian side, simply use the a!fromJson() function to extract the list passed in the query parameters or request body
Children
No Data