Api result location

I'm using an system.net.httpclient to send some api calls, the return from the call is a pretty large json. I want to return the full json somewhere and then parse out the sections I need, when I need them. I could be convinced to do the parsing at the front but my question is the same.

I'm stuck on what I want to do with the json results and I am looking for some suggestions.

  • initially I was thinking to run the api calls in the session event startup, take the results and put them into a session custom property. But the results don't need to be client based. I'm having an issue getting the json to display properly
  • I ran the session startup and put the data into a tag but it was a bit messy to deal with.
  • Last resort is to just have the calls on the root of a view based on what the page needs.

I am pretty much paralysis by analysis here, does anyone have any suggestions to get me off the pot? Thanks and have a good weekend!

Use a gateway timer script to grab the JSON at an interval, and then write it to a tag? Then you can bind to that rag and get data from it

Thanks for the suggestion, the tag was too messy to parse. I put the json in an object in the session props but it tells me I have item value alerts.

I might put the data into root custom parameters. I’ll try all three and see how it goes.

Anything in a view or session will be isolated to that user. Just fyi. If you want it shared across uses then you will need to get creative.

Perspective JSONifies anything you assign to a property. Any Perspective property. This discards the original object and breaks many things. It is the reason my Integration Toolkit has sessionVarMap(), pageVarMap(), and viewVarMap() functions. If you want to have something across all sessions, use globalVarMap().

1 Like

Thanks, I see of of the nested dataset has an array and the keys are 1-60. Those are the ones showing invalid key. I might modify it with a transform.

Thanks again!