Python
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 = client.users.retrieve(
"user_id",
)
print(user.id)package main
import (
"context"
"fmt"
"github.com/stainless-sdks/sgp-go"
"github.com/stainless-sdks/sgp-go/option"
)
func main() {
client := sgp.NewClient(
option.WithAPIKey("My API Key"),
)
user, err := client.Users.Get(context.TODO(), "user_id")
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", user.ID)
}
curl --request GET \
--url https://api.egp.scale.com/users/{user_id}const options = {method: 'GET'};
fetch('https://api.egp.scale.com/users/{user_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.egp.scale.com/users/{user_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.get("https://api.egp.scale.com/users/{user_id}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.egp.scale.com/users/{user_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"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": {}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Users
Get User
Get basic information for a user. The requester must belong to the same organization as the target user and be an admin or manager of an account the target user belongs to.
GET
/
users
/
{user_id}
Python
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 = client.users.retrieve(
"user_id",
)
print(user.id)package main
import (
"context"
"fmt"
"github.com/stainless-sdks/sgp-go"
"github.com/stainless-sdks/sgp-go/option"
)
func main() {
client := sgp.NewClient(
option.WithAPIKey("My API Key"),
)
user, err := client.Users.Get(context.TODO(), "user_id")
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", user.ID)
}
curl --request GET \
--url https://api.egp.scale.com/users/{user_id}const options = {method: 'GET'};
fetch('https://api.egp.scale.com/users/{user_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.egp.scale.com/users/{user_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.get("https://api.egp.scale.com/users/{user_id}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.egp.scale.com/users/{user_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"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": {}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Path Parameters
Response
Successful Response
User id
E-mail address
A list of access profiles that the selected user has access to
Show child attributes
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.

