Retrieving data from an API and displaying it on Appian

Hi,

I have a requirement to call an API that returns a response(REST), and then display the elements in a grid in Appian.

I was able to  create a process model with a "Call Integration" to which I passed the end-point and request and upon clicking "TEST RESULT" I am able to see the response body(Convert the JSON Response body to an Appian value) as expected.

I want to display this response on a grid and am unsure how to do it. Any help with inputs or links to sources would be highly appreciated.

 

Thanks,

Subramaniyan J P 

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer

    Hi subramaniyanjp you can follow below mentioned steps to achieve your requirement:

    • Return the response in JSON Format via Integration Object
    • Store this response into a process variable of type TEXT
    • Create an Expression Rule having a rule input of type Text (or) Any Type
    • Pass this process variable as an input to this rule
    • Make the use fromJson() to return Dictionary format data out of your JSON and cast it to a CDT array having similar structure(name of the attribute and it's type) as your Dictionary
    • Return the casted CDT array as the response of this Rule
    • Now, because you have the data ready in CDT format, you can easily prepare a grid to display these data.

    Hope this will help you.

  • Hi aloks0001 can you please provide me a reference example for the same? i am new to this.

    or any link will be help full for me to achieve this. thanks

Reply Children