# Api result location

**URL:** <https://forum.inductiveautomation.com/t/api-result-location/95980>\
**Category:** Ignition\
**Created:** [September 14, 2024, 2:30am UTC](https://forum.inductiveautomation.com/t/api-result-location/95980 "2024-09-14T02:30:35Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![drewdin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/drewdin/32/3363_2.png) [@drewdin](https://forum.inductiveautomation.com/u/drewdin)\
**Post date:** [September 14, 2024, 2:30am UTC](https://forum.inductiveautomation.com/t/api-result-location/95980/1 "2024-09-14T02:30:35Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![bschroeder](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bschroeder/32/13260_2.png) [@bschroeder](https://forum.inductiveautomation.com/u/bschroeder)\
**Post date:** [September 14, 2024, 11:59am UTC](https://forum.inductiveautomation.com/t/api-result-location/95980/2 "2024-09-14T11:59:26Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![drewdin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/drewdin/32/3363_2.png) [@drewdin](https://forum.inductiveautomation.com/u/drewdin)\
**Post date:** [September 14, 2024, 12:53pm UTC](https://forum.inductiveautomation.com/t/api-result-location/95980/3 "2024-09-14T12:53:20Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![bschroeder](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bschroeder/32/13260_2.png) [@bschroeder](https://forum.inductiveautomation.com/u/bschroeder)\
**Post date:** [September 14, 2024, 1:16pm UTC](https://forum.inductiveautomation.com/t/api-result-location/95980/4 "2024-09-14T13:16:54Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [September 14, 2024, 2:17pm UTC](https://forum.inductiveautomation.com/t/api-result-location/95980/5 "2024-09-14T14:17:07Z")

</div>

> [@drewdin](#):
>
> tells me I have item value alerts.

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()`.

> [@Automation Professionals' Integration Toolkit Module](https://forum.inductiveautomation.com/t/automation-professionals-integration-toolkit-module/74934/78):
>
> Ok. Beta release with a bunch of new features. For Ignition v8.1+: s\>v2.0.14.232662056 New Expression Functions since v2.0.13: globalVarMap(key) sessionVarMap() pageVarMap() viewVarMap() mungeColumnName(name) unQualify(object) New Scripting Functions since v2.0.13: system.util.globalVarMap(key) system.util.simAidsCtx() now system.util.toolkitCtx() system.util.indirectAction(functionName, proxyFor, projectName={current}) system.perspective.sessionVarMap(…) system.perspective.pageVarMap(…) …

---

<div class="post-metadata">

**Author:** ![drewdin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/drewdin/32/3363_2.png) [@drewdin](https://forum.inductiveautomation.com/u/drewdin)\
**Post date:** [September 14, 2024, 11:33pm UTC](https://forum.inductiveautomation.com/t/api-result-location/95980/6 "2024-09-14T23:33:19Z")

</div>

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!
