Skip to main content

Translating a Stax User ID to Email Address

Stax utilizes UUIDs as identifiers for many resources, including users. When reviewing logs or other machine-generated information, UUIDs need to be resolved to review an individual user's details. This can be done using the Stax console, API, or SDK.

Using the Stax Console

When reviewing user details in the Stax Console, the user's identifier is displayed under the User ID heading in the User details drawer.

translating-stax-user-id-to-email-address-0.png

Using the API

The Stax API can be used to resolve a user based on their UUID. Choose the appropriate API endpoint to query based on your Installation Region:

Using the Python SDK

The Python SDK allows for resolving user details in a simpler fashion than querying the API directly. The code sample below demonstrates the basic steps required to perform this task.

import json
from staxapp.config import Config
from staxapp.openapi import StaxClient

Config.access_key = "YOUR_API_ACCESS_KEY"
Config.secret_key = "YOUR_API_SECRET_KEY"

user_id = "868fef84-f9d0-473d-8c03-bb4ea5286703"
teams = StaxClient("teams")
response = teams.ReadUsers(id_filter=user_id)
user = response["Users"][0]

print(json.dumps(user, indent=4, sort_keys=True))

When executed, a payload of the User type will be returned. See the API documentation for your installation region for specifics on each field: