Missing Key in Docs: system.perspective.getSessionInfo

I noticed while porting a vision project script to a perspective version that the manual is missing the "authorized":true key documentation. Also, I'm surprised that I can't call this function, for testing, from anywhere except from a view. I would expect this function to not be limited to perspective scope.

system.perspective.getSessionInfo - Ignition User Manual 8.1 - Ignition Documentation (inductiveautomation.com)

?? Everything under system.perspective.* is only available in Perspective.

Oops. This would be one of the two functions that are the exceptions. :man_shrugging:

Well, system.perspective.getProjectInfo() and system.perspective.getSessionInfo() are supposed to work from anywhere, since they're giving you meta information. And then technically the other functions can be called from anywhere on the gateway, you'll just have to explicitly pass the session/page/view IDs you want to target because they're not implicitly known from the call context.

That said, I don't see an authorized keyword arg supported by system.perspective.getSessionInfo, @dkhayes117, as in, while looking at the code.

1 Like

v8.1.24

11:42:33.630 [Browser Thread: 57553] INFO Perspective.Designer.Workspace - {"userAgent":"<designer>","id":"7E408747","username":"admin","authorized":true,"project":"SewingStation","uptime":11990300,"clientAddress":"","lastComm":19369,"sessionScope":"designer","activePages":3,"recentBytesSent":23,"totalBytesSent":"104121","pageIds":["nav","Home","session-props"]}

Ahhh, gotcha; in the payload. I was thinking it was a parameter for some reason. I'll let the documentation team know.

1 Like