Coleta todos os departamento de todas as unidades de negocio
curl --request GET \
--url https://api.example.com/departamentosconst options = {method: 'GET'};
fetch('https://api.example.com/departamentos', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.example.com/departamentos"
response = requests.get(url)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/departamentos"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/departamentos",
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;
}require 'uri'
require 'net/http'
url = URI("https://api.example.com/departamentos")
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{
"unidades": [
{
"unidadeNegocioId": "1b88e4f3-04bf-4185-b782-9211e4b6bca4",
"logo": "www.database.com/files/logo.png",
"nome": "Pontua Matriz",
"numeroCadastro": "12345678912",
"departamentos": [
{
"departamentoId": "c9f447fe-f97f-4f24-974d-9f92eb3049dc",
"nome": "Desenvolvimento",
"codigo": 5,
"createdAt": "2026-05-11T13:08:56.558Z",
"updatedAt": "2026-05-11T13:08:56.558Z"
}
]
}
],
"pagina": 1,
"limite": 10,
"total": 100
}{
"service": "<string>",
"method": "<string>",
"message": "message erro"
}Departamento
Coleta todos os departamento de todas as unidades de negocio
GET
/
departamentos
Coleta todos os departamento de todas as unidades de negocio
curl --request GET \
--url https://api.example.com/departamentosconst options = {method: 'GET'};
fetch('https://api.example.com/departamentos', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.example.com/departamentos"
response = requests.get(url)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/departamentos"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/departamentos",
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;
}require 'uri'
require 'net/http'
url = URI("https://api.example.com/departamentos")
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{
"unidades": [
{
"unidadeNegocioId": "1b88e4f3-04bf-4185-b782-9211e4b6bca4",
"logo": "www.database.com/files/logo.png",
"nome": "Pontua Matriz",
"numeroCadastro": "12345678912",
"departamentos": [
{
"departamentoId": "c9f447fe-f97f-4f24-974d-9f92eb3049dc",
"nome": "Desenvolvimento",
"codigo": 5,
"createdAt": "2026-05-11T13:08:56.558Z",
"updatedAt": "2026-05-11T13:08:56.558Z"
}
]
}
],
"pagina": 1,
"limite": 10,
"total": 100
}{
"service": "<string>",
"method": "<string>",
"message": "message erro"
}Query Parameters
Texto pesquisado para filtrar consulta
Página que deseja retornar os resultados
Example:
0
Quantidade de itens que retorna na consulta. Min 1 - Max 100
Example:
100
ID referente a unidade de negócio. Ex.: "id-1"