Developer ‘Tiqs & Tricks
April 2025
Discovering Current Session Information
“Know thyself.”
Well, that was my snappy opener for this blog, but it really backfired this time. I couldn’t remember which Greek philosopher delivered this quote, so I hit the Web, that font of all accuracy, only to discover that it’s attributed to Socrates… and Aristotle, and possibly originally to the Seven Sages of Greece, or maybe even Apollo his godly self…. Before long, I was doomscrolling my way through all of human and mythical history, and completely lost the plot. Apologies in advance if you’re inspired to do the same. Here, just read this.
Ahem. Anyway, today’s blog post is about discovering information pertaining to the user and general environment, both during development, and in real-time.
Let’s start with:
The IDE:
In the IDE NavBar, click on the “person” icon:
From the first glance, you’ll find a trove of information:

(ID blacked out for security reasons.)
But wait, there’s more. Click on the About right underneath this user field, and you’ll see something like:

A handy extra: Clicking on either of these fields will transfer information to the clipboard. If ever you need to contact [email protected], be sure to paste in the information from the Vantiq Platform field. You will save yourself (and our Support personnel) a lot of time wasted in an email back-and-forth requesting this information.
The Context Service:
Among the plethora of built-in system Services that Vantiq provides, tucked comfortably in the VAIL Reference Guide between the Concurrent and Conversation listings, is the Context Service. To speed up learning all the Service procedures, I built a simple Visual Event Handler in my own Service:

getContext is a Service Procedure that calls (almost) all of the Context Service procedures:

…yielding a lot of interesting information:

On another server installation, I ran this and my email and verification were known; but I login to the dev.vantiq.com installation differently, so the system doesn’t get my email here.
In any case, most of these fields are obvious, but not all. A quick explanation of some of them:
isInternalAuth : This will be true if your server is using a built-in identity management & authentication system. dev.vantiq.com uses Keycloak, so this is “false” on that system.
isPartitionKeyOwner: Exclusively for partitioned State in the Service. That’s why I have a SplitByGroup task in the run-up to the procedure call. Without that, the return is false. And, if this is run from outside of a Service, you will get an error.
licenseInfo: No mystery; it’s the information about the Vantiq license. But if you’re not authorized to access that information, you’ll get an error: The generated rule: getContext failed because: The current user is not authorized to access license information: <userId>
preferredUsername: The login name. I don’t like to type much, sooooo….
profiles: What is the user, to the namespace? This is good for discovering what authority the user has in the current environment.
username: Your full user identification number, which you shouldn’t share under most circumstances. (Hence, the big black box for mine.)
The Client:
The Client procedures that report real-time information about users and the environment are all at the Client-level, in the form of “client.<procedureName>.” A few of these procedures mimic the actions of the Context Server procedures, such as:
getUsername(): Returns the full user identification number, just like Context.username().
getProfileNames(): Returns the user profiles for all Namespaces in the server installation(!), whereas Context.profiles() only returns the profiles for the current Namespace.
getUserRecord(): Returns a full listing of the user’s username, preferredUserName, profiles, all namespaces in which the user has any privileges and describes what those privileges are. A sampling of this last part:
“displayName”:”Admin”,”name”:”_140_AIStream.admin”,”descriptionKey”:”io.vantiq.profile.local.admin.desc”,”description”:”Authorizes default admin access level to all local resources. By default this permits read-write access, but this can be altered when defining types.”
Here’s vital information about the user that even the Context Service doesn’t have:
getGroupNames(): returns an array listing all the Vantiq Groups to which the user belongs. This is especially helpful when restricting access to “Public” Clients.
Knowing more about users in the Client includes knowing more about mobile users too:
getDeviceId(): Returns a device id for a mobile device.
getDeviceName(): Returns “browser” or a mobile device name, like “iPhone.”
getLocation(): Retrieves the current latitude & longitude coordinates of the client. This will work for a browser window, too, if location information is allowed.
Beyond users, Clients also have to know something about their running instances, too:
getName(): No, not the username; this procedure returns the name of the current Client.
isNetworkActive(): Returns true or false.
isPublic(): Returns true or false.
createResponseObject(): This procedure returns a handy “status” of all that happened in the Client. For example, let’s say I have a running page that looks like this:

Visually, we can see that the toggle is “on” for More Candy, and “Maybe” was chosen from the Droplist. Thanks to createResponseObject(), we can get a programmatic look as well:
{“responseResource”:null,”responseResourceId”:null,”submitValue”:100,”username”:”<redacted>”,”deviceId”:””,”deviceName”:”Browser”,”state”:{},”values”:{“Droplist3″:3,”Checkbox1″:true},”arsInfo”:{“localeLanguage”:”en”,”localeCountry”:”us”,”localeVariant”:”*”,”username”:”<redacted>”,”deviceId”:””,”deviceName”:”Browser”,”responseTimestamp”:”2025-03-26T18:33:50.497Z”,”responseLocation”:null}}
getCurrentPage() & getCurrentPopup(): Returns the current page/popup page.
getDocumentAssetLabelList() & getDocumentAssetList(): Returns the labels supplied for the listings, or just the listing of the contents in the Client’s list of Document Assets, usually found here, in the Client Properties:

There are even procedures to report the current Client localization: See localeCountryCode(), localeLanguageCode() and the rarely-used localeVariantCode().
Summary:
- Check the User Account icon in the IDE NavBar to see user and system information for the session during development.
- On the Server side, the built-in Context Service procedures can provide session data to running programs.
- On the Client side, multiple client-level procedures supply salient client-instance reporting.
Conclusion:
“Find yourself”… at Vantiq.
Attachments:
You must be
logged in to view attached files.
Developer ‘Tiqs & Tricks
April 2025
Discovering Current Session Information
“Know thyself.”
Well, that was my snappy opener for this blog, but it really backfired this time. I couldn’t remember which Greek philosopher delivered this quote, so I hit the Web, that font of all accuracy, only to discover that it’s attributed to Socrates… and Aristotle, and possibly originally to the Seven Sages of Greece, or maybe even Apollo his godly self…. Before long, I was doomscrolling my way through all of human and mythical history, and completely lost the plot. Apologies in advance if you’re inspired to do the same. Here, just read this.
Ahem. Anyway, today’s blog post is about discovering information pertaining to the user and general environment, both during development, and in real-time.
Let’s start with:
The IDE:
In the IDE NavBar, click on the “person” icon:
From the first glance, you’ll find a trove of information:
(ID blacked out for security reasons.)
But wait, there’s more. Click on the About right underneath this user field, and you’ll see something like:
A handy extra: Clicking on either of these fields will transfer information to the clipboard. If ever you need to contact [email protected], be sure to paste in the information from the Vantiq Platform field. You will save yourself (and our Support personnel) a lot of time wasted in an email back-and-forth requesting this information.
The Context Service:
Among the plethora of built-in system Services that Vantiq provides, tucked comfortably in the VAIL Reference Guide between the Concurrent and Conversation listings, is the Context Service. To speed up learning all the Service procedures, I built a simple Visual Event Handler in my own Service:
getContext is a Service Procedure that calls (almost) all of the Context Service procedures:
…yielding a lot of interesting information:
On another server installation, I ran this and my email and verification were known; but I login to the dev.vantiq.com installation differently, so the system doesn’t get my email here.
In any case, most of these fields are obvious, but not all. A quick explanation of some of them:
isInternalAuth : This will be true if your server is using a built-in identity management & authentication system. dev.vantiq.com uses Keycloak, so this is “false” on that system.
isPartitionKeyOwner: Exclusively for partitioned State in the Service. That’s why I have a SplitByGroup task in the run-up to the procedure call. Without that, the return is false. And, if this is run from outside of a Service, you will get an error.
licenseInfo: No mystery; it’s the information about the Vantiq license. But if you’re not authorized to access that information, you’ll get an error: The generated rule: getContext failed because: The current user is not authorized to access license information: <userId>
preferredUsername: The login name. I don’t like to type much, sooooo….
profiles: What is the user, to the namespace? This is good for discovering what authority the user has in the current environment.
username: Your full user identification number, which you shouldn’t share under most circumstances. (Hence, the big black box for mine.)
The Client:
The Client procedures that report real-time information about users and the environment are all at the Client-level, in the form of “client.<procedureName>.” A few of these procedures mimic the actions of the Context Server procedures, such as:
getUsername(): Returns the full user identification number, just like Context.username().
getProfileNames(): Returns the user profiles for all Namespaces in the server installation(!), whereas Context.profiles() only returns the profiles for the current Namespace.
getUserRecord(): Returns a full listing of the user’s username, preferredUserName, profiles, all namespaces in which the user has any privileges and describes what those privileges are. A sampling of this last part:
Here’s vital information about the user that even the Context Service doesn’t have:
getGroupNames(): returns an array listing all the Vantiq Groups to which the user belongs. This is especially helpful when restricting access to “Public” Clients.
Knowing more about users in the Client includes knowing more about mobile users too:
getDeviceId(): Returns a device id for a mobile device.
getDeviceName(): Returns “browser” or a mobile device name, like “iPhone.”
getLocation(): Retrieves the current latitude & longitude coordinates of the client. This will work for a browser window, too, if location information is allowed.
Beyond users, Clients also have to know something about their running instances, too:
getName(): No, not the username; this procedure returns the name of the current Client.
isNetworkActive(): Returns true or false.
isPublic(): Returns true or false.
createResponseObject(): This procedure returns a handy “status” of all that happened in the Client. For example, let’s say I have a running page that looks like this:
Visually, we can see that the toggle is “on” for More Candy, and “Maybe” was chosen from the Droplist. Thanks to createResponseObject(), we can get a programmatic look as well:
getCurrentPage() & getCurrentPopup(): Returns the current page/popup page.
getDocumentAssetLabelList() & getDocumentAssetList(): Returns the labels supplied for the listings, or just the listing of the contents in the Client’s list of Document Assets, usually found here, in the Client Properties:
There are even procedures to report the current Client localization: See localeCountryCode(), localeLanguageCode() and the rarely-used localeVariantCode().
Summary:
Conclusion:
“Find yourself”… at Vantiq.
Attachments:
You must be logged in to view attached files.