Get user details
curl --request GET \
--url https://{tenant}/admin/users/{userId} \
--header 'Admin-Auth: <api-key>'import requests
url = "https://{tenant}/admin/users/{userId}"
headers = {"Admin-Auth": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'Admin-Auth': '<api-key>'}};
fetch('https://{tenant}/admin/users/{userId}', 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://{tenant}/admin/users/{userId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Admin-Auth: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{tenant}/admin/users/{userId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Admin-Auth", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://{tenant}/admin/users/{userId}")
.header("Admin-Auth", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{tenant}/admin/users/{userId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Admin-Auth"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"access_key": "c8251902f3f44dfa729e0267d0d62859",
"active": false,
"email_address": "itachisasuke@gmail.com",
"first_name": "itachi",
"group_id": "",
"id": "679a02465715ecdd507d7273",
"last_login_date": "0001-01-01T00:00:00Z",
"last_name": "sasuke",
"org_id": "",
"password_max_days": 0,
"password_updated": "0001-01-01T00:00:00Z",
"user_permissions": {
"IsAdmin": "admin",
"ResetPassword": "admin"
}
}{
"Message": "Could not retrieve user detail",
"Meta": null,
"Status": "Error"
}{
"Message": "Failed to marshal user data from DB",
"Meta": null,
"Status": "Error"
}Users
Get user details
Get user summary with user id
GET
/
admin
/
users
/
{userId}
Get user details
curl --request GET \
--url https://{tenant}/admin/users/{userId} \
--header 'Admin-Auth: <api-key>'import requests
url = "https://{tenant}/admin/users/{userId}"
headers = {"Admin-Auth": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'Admin-Auth': '<api-key>'}};
fetch('https://{tenant}/admin/users/{userId}', 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://{tenant}/admin/users/{userId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Admin-Auth: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{tenant}/admin/users/{userId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Admin-Auth", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://{tenant}/admin/users/{userId}")
.header("Admin-Auth", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{tenant}/admin/users/{userId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Admin-Auth"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"access_key": "c8251902f3f44dfa729e0267d0d62859",
"active": false,
"email_address": "itachisasuke@gmail.com",
"first_name": "itachi",
"group_id": "",
"id": "679a02465715ecdd507d7273",
"last_login_date": "0001-01-01T00:00:00Z",
"last_name": "sasuke",
"org_id": "",
"password_max_days": 0,
"password_updated": "0001-01-01T00:00:00Z",
"user_permissions": {
"IsAdmin": "admin",
"ResetPassword": "admin"
}
}{
"Message": "Could not retrieve user detail",
"Meta": null,
"Status": "Error"
}{
"Message": "Failed to marshal user data from DB",
"Meta": null,
"Status": "Error"
}Authorizations
Api key
Path Parameters
The Id of the user you want to get
Response
user fetched successfully
Was this page helpful?
⌘I