|
<< Click to Display Table of Contents >> Navigation: 3. Script Language > AI - Artificial Intelligence Commands > AIX. - Grok / X - API > !Setup and Configuration > AIX. - Grok / X - API |
MiniRobotLanguage (MRL)
AIX.Get User
Retrieve the Current User Identifier
Intention
GetUser Command: Fetching the User Identifier
The Get User command retrieves the current user identifier set for the session, stored in AIX_User.
This allows you to verify or use the identifier in your scripts.
It’s part of the AIX - Grok / X - API suite.
The Get User command returns the current value of AIX_User, which identifies the user in API interactions.
It can be stored in a variable or retrieved directly.
Retrieving the user identifier is useful for:
•Verification: Confirm the current user setting before making API calls.
•Logging: Record the user associated with script actions.
•Debugging: Check the identifier sent with API requests.
Call the command with an optional variable to store the result.
If no variable is specified, the value can be retrieved via other means or checked in AIX_User.
Example Usage
AIX.Set User|jane_smith
AIX.Get User|$$USR
DBP.Current User: $$USR
Returns jane_smith or an empty string if unset.
Illustration
┌───────────────┐
│ AIX_User │
├───────────────┤
│ jane_smith │
└───────────────┘
Retrieving the current user identifier.
Syntax
AIX.GetUser[|P1]
AIX.Get User[|P1]
Parameter Explanation
P1 - (Optional) The variable to store the retrieved user identifier. If omitted, the value remains in AIX_User.
Example
AIX.Set User|user_789
AIX.Get User|$$ID
DBP.User ID: $$ID
ENR.
Remarks
- Default value is an empty string unless set by AIX.Set User.
- Used in API payloads if non-empty; see AIX.Ask.
Limitations
- Only retrieves the current value; does not validate its use in the API.
- No built-in mechanism to persist across sessions.
See also:
• AIX.Ask