# SDK transfert data from gateway to perspective

**URL:** <https://forum.inductiveautomation.com/t/sdk-transfert-data-from-gateway-to-perspective/36349>\
**Category:** Module Development\
**Tags:** ignition80, perspective\
**Created:** [July 3, 2020, 5:27pm UTC](https://forum.inductiveautomation.com/t/sdk-transfert-data-from-gateway-to-perspective/36349 "2020-07-03T17:27:50Z")\
**Posts on this page:** 1\
**Showing post:** 23

<div class="post-metadata">

**Author:** ![mazeyrat](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mazeyrat/32/10955_2.png) [@mazeyrat](https://forum.inductiveautomation.com/u/mazeyrat)\
**Post date:** [April 16, 2021, 1:09pm UTC](https://forum.inductiveautomation.com/t/sdk-transfert-data-from-gateway-to-perspective/36349/23 "2021-04-16T13:09:54Z")

</div>

Hi @paul-griffith

to obtain the sessionId

```auto
String sessionId = InternalSession.SESSION.get().getSession().getSessionId().toString();

```

work fine.

But if I need to obtain the pageId, I’ve tried:

```auto
String pageId = InternalSession.SESSION.get().getSession().getPage().getId().toString();

```

or

```auto
String pageId = InternalSession.SESSION.get().getPage().getId().toString();

```

But both of them are triggering a **java.lang.NullPointerException: null**

Did I missed something ?

I try to guess in a script function the sessionId and pageId to keep distinct data for multiple sessionId/pageId.

---

_[View the full topic](https://forum.inductiveautomation.com/t/sdk-transfert-data-from-gateway-to-perspective/36349)._
