import os
from scale_gp import SGPClient
client = SGPClient(
api_key=os.environ.get("SGP_API_KEY"), # This is the default and can be omitted
)
user_info = client.users.info()
print(user_info.id){
"id": "<string>",
"email": "<string>",
"access_profiles": [
{
"id": "<string>",
"identity": {
"id": "<string>",
"type": "user",
"object": "identity"
},
"role": "manager",
"account": {
"id": "<string>",
"name": "<string>",
"status": "<string>",
"organization_id": "<string>"
}
}
],
"first_name": "<string>",
"last_name": "<string>",
"organization_id": "<string>",
"is_organization_admin": true,
"is_deployment_admin": true,
"preferences": {},
"assumed_access_profile": {
"id": "<string>",
"identity": {
"id": "<string>",
"type": "user",
"object": "identity"
},
"role": "manager",
"account": {
"id": "<string>",
"name": "<string>",
"status": "<string>",
"organization_id": "<string>"
}
}
}Get basic information for the logged in user making this request including preferences.
import os
from scale_gp import SGPClient
client = SGPClient(
api_key=os.environ.get("SGP_API_KEY"), # This is the default and can be omitted
)
user_info = client.users.info()
print(user_info.id){
"id": "<string>",
"email": "<string>",
"access_profiles": [
{
"id": "<string>",
"identity": {
"id": "<string>",
"type": "user",
"object": "identity"
},
"role": "manager",
"account": {
"id": "<string>",
"name": "<string>",
"status": "<string>",
"organization_id": "<string>"
}
}
],
"first_name": "<string>",
"last_name": "<string>",
"organization_id": "<string>",
"is_organization_admin": true,
"is_deployment_admin": true,
"preferences": {},
"assumed_access_profile": {
"id": "<string>",
"identity": {
"id": "<string>",
"type": "user",
"object": "identity"
},
"role": "manager",
"account": {
"id": "<string>",
"name": "<string>",
"status": "<string>",
"organization_id": "<string>"
}
}
}Successful Response
User id
E-mail address
A list of access profiles that the selected user has access to
Show child attributes
First name
Last name
The organization ID of the user.
True if the current user is an organization admin.
True if the current user is a deployment admin.
User preferences that can be stored in the Scale GenAI Platform.
Present if the user has assumed a specific access profile via JWT token.
Show child attributes