Listar Usuários
curl --request GET \
--url https://identity.sandbox.lerian.net/v1/users \
--header 'Authorization: Bearer <token>'import requests
url = "https://identity.sandbox.lerian.net/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://identity.sandbox.lerian.net/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://identity.sandbox.lerian.net/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://identity.sandbox.lerian.net/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://identity.sandbox.lerian.net/v1/users")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://identity.sandbox.lerian.net/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": [
{
"email": "john@example.com",
"firstName": "John",
"groups": [
"admin-group",
"midaz-viewer-group",
"midaz-contributor-group"
],
"id": "019c96a0-0c21-71f9-a487-66a1258278a1",
"lastName": "Doe",
"username": "johndoe"
},
{
"email": "janedoe@example.com",
"firstName": "Jane",
"groups": [
"midaz-viewer-group"
],
"id": "019c96a0-6c20-7bcd-e1f2-5d6e7f8a9b0c",
"lastName": "Doe",
"username": "janedoe"
}
],
"page": 1,
"limit": 10,
"total": 2
}{
"code": "IDE-1004",
"title": "No Users Found",
"message": "No users were found in the search."
}{
"code": "IDE-0006",
"title": "Internal Server Error",
"message": "The server encountered an unexpected error. Please try again later."
}Listar Usuários
Use este endpoint para listar todos os usuários registrados no sistema.
GET
/
v1
/
users
Listar Usuários
curl --request GET \
--url https://identity.sandbox.lerian.net/v1/users \
--header 'Authorization: Bearer <token>'import requests
url = "https://identity.sandbox.lerian.net/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://identity.sandbox.lerian.net/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://identity.sandbox.lerian.net/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://identity.sandbox.lerian.net/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://identity.sandbox.lerian.net/v1/users")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://identity.sandbox.lerian.net/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": [
{
"email": "john@example.com",
"firstName": "John",
"groups": [
"admin-group",
"midaz-viewer-group",
"midaz-contributor-group"
],
"id": "019c96a0-0c21-71f9-a487-66a1258278a1",
"lastName": "Doe",
"username": "johndoe"
},
{
"email": "janedoe@example.com",
"firstName": "Jane",
"groups": [
"midaz-viewer-group"
],
"id": "019c96a0-6c20-7bcd-e1f2-5d6e7f8a9b0c",
"lastName": "Doe",
"username": "janedoe"
}
],
"page": 1,
"limit": 10,
"total": 2
}{
"code": "IDE-1004",
"title": "No Users Found",
"message": "No users were found in the search."
}{
"code": "IDE-0006",
"title": "Internal Server Error",
"message": "The server encountered an unexpected error. Please try again later."
}Autorizações
O token de autorização no formato 'Bearer '.
Parâmetros de consulta
O número da página a ser recuperada.
Intervalo obrigatório:
x >= 1O número máximo de itens retornados por página. Não pode exceder 100.
Intervalo obrigatório:
1 <= x <= 100Resposta
A lista de todos os usuários registrados no sistema.
Envelope padrão de resposta paginada.
Esta página foi útil?
⌘I

