curl --request GET \
--url https://services.pref.rio/heimdall-admin/api/v1/users/ \
--header 'Authorization: Bearer <token>'import requests
url = "https://services.pref.rio/heimdall-admin/api/v1/users/"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://services.pref.rio/heimdall-admin/api/v1/users/', 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://services.pref.rio/heimdall-admin/api/v1/users/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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://services.pref.rio/heimdall-admin/api/v1/users/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://services.pref.rio/heimdall-admin/api/v1/users/")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://services.pref.rio/heimdall-admin/api/v1/users/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"items": [
{
"id": 1,
"cpf": "12345678901",
"display_name": "João Silva",
"groups": [
"engineering_team:backend"
],
"roles": [
"superadmin"
]
},
{
"id": 2,
"cpf": "98765432109",
"display_name": "Maria Santos",
"groups": [
"data_analysts:read"
],
"roles": [
"data-analyst"
]
}
],
"total": 150,
"skip": 0,
"limit": 50,
"has_more": true
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}List all users
Retrieve a paginated list of all users in the system.
Pagination: Uses skip and limit query parameters for pagination.
Default limit is 50 users per page, maximum is 100.
Authentication: Requires a valid JWT token.
Role Aggregation: Each user in the response includes both direct roles and roles inherited through group memberships.
Use Cases:
- User management dashboards
- Administrative user listing
- User directory
- Bulk user operations
- Reporting and analytics
Response Fields:
items: Array of user objects for the current pagetotal: Total number of users in the systemskip: Number of users skipped (offset)limit: Maximum number of users returned in this pagehas_more: Whether there are more users available
curl --request GET \
--url https://services.pref.rio/heimdall-admin/api/v1/users/ \
--header 'Authorization: Bearer <token>'import requests
url = "https://services.pref.rio/heimdall-admin/api/v1/users/"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://services.pref.rio/heimdall-admin/api/v1/users/', 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://services.pref.rio/heimdall-admin/api/v1/users/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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://services.pref.rio/heimdall-admin/api/v1/users/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://services.pref.rio/heimdall-admin/api/v1/users/")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://services.pref.rio/heimdall-admin/api/v1/users/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"items": [
{
"id": 1,
"cpf": "12345678901",
"display_name": "João Silva",
"groups": [
"engineering_team:backend"
],
"roles": [
"superadmin"
]
},
{
"id": 2,
"cpf": "98765432109",
"display_name": "Maria Santos",
"groups": [
"data_analysts:read"
],
"roles": [
"data-analyst"
]
}
],
"total": 150,
"skip": 0,
"limit": 50,
"has_more": true
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
Number of users to skip
x >= 0Maximum number of users to return
1 <= x <= 100Only return users with at least one group membership
Response
Users retrieved successfully
List of items for the current page
Show child attributes
Show child attributes
Total number of items available
x >= 0150
Number of items skipped (offset)
x >= 00
Maximum number of items returned
1 <= x <= 10050
Whether there are more items available
true
