Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.


Returns information about one or more Perspective Sessions. The information returned by this function is a combination of information available on the Perspective Sessions status page on the Gateway, and some Session props (id and userAgent). Exact fields are as follows:

userAgentInformation the device running the Session. The exact content returned by this key is based on the the browser/device running the Session.

Either the Id of the Session (similar to or if called from the Designer, returns the Designer's id, as listed on the Designers Status page located on the Gateway.

usernameEither the username of the logged in user if authenticated, or "Unauthenticated" if an unauthenticated Session.
projectThe name of the project running in the Session.
uptimeThe number of milliseconds that the Session instance has been running.
clientAddressThe address of the Session.
lastCommThe number of milliseconds since the last communication from the Gateway.
sessionScopeWhere the Session is running. Possible values are: designer, browser, iOS, or Android.
activePagesThe number of active pages.
recentBytesSentThe number of bytes last sent by the Session to the Gateway.
totalBytesSentThe total number of bytes sent by the Session to the Gateway.
pageIdsAn array of page IDs that are currently open in the Session.

This function accepts keyword arguments.


system.perspective.getSessionInfo([usernameFilter], [projectFilter])

  • Parameters

String usernameFilter - A filter based on logged in user. [optional] 

String projectFilter - A filter based on the project name. [optional] 

  • Returns

List A list of objects (PyJsonObjectAdapter).

  • Scope

Gateway, Perspective Session

titleCode Examples
Code Block
titleCode Snippet
# This code counts the number of times a user named "billy" is logged in.
sessions = system.perspective.getSessionInfo("billy")
print "Billy has %d sessions" % len(sessions)
Code Block
titleCode Snippet
# This script gets all sessions using the "MyProject" project and displays information about them.
# Get the Session info.
projectResults = system.perspective.getSessionInfo(projectFilter="MyProject")
# Loop through the sessions.
# Enumerate() gives both the Session object and the index.
for index, sessionObj in enumerate(projectResults):
    # Print session info
    print "Session", index, ": username: ", sessionObj["username"], "uptime: ", sessionObj["uptime"], " seconds"

system perspective getSessionInfo, perspective.getSessionInfo