Public List Analyses
curl --request GET \
--url https://public-api.salu.com.vc/dev/routes/v0/analysis/ \
--header 'x-api-key: <api-key>'import requests
url = "https://public-api.salu.com.vc/dev/routes/v0/analysis/"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://public-api.salu.com.vc/dev/routes/v0/analysis/', 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://public-api.salu.com.vc/dev/routes/v0/analysis/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <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://public-api.salu.com.vc/dev/routes/v0/analysis/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<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://public-api.salu.com.vc/dev/routes/v0/analysis/")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://public-api.salu.com.vc/dev/routes/v0/analysis/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"gov_id": "<string>",
"status": "IN_ANALYSIS",
"request_date": "2023-11-07T05:31:56Z",
"organization": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
},
"validation_date": "2023-11-07T05:31:56Z",
"observation": "<string>",
"employee_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"disabilities": [
{}
],
"expiration_date": "2023-11-07T05:31:56Z",
"expired": true,
"analysis_files": []
}
],
"cursor": {
"total": 123,
"page": 123,
"page_size": 123,
"total_pages": 123,
"next_page": true
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Analysis
List Analyses
GET
/
v0
/
analysis
/
Public List Analyses
curl --request GET \
--url https://public-api.salu.com.vc/dev/routes/v0/analysis/ \
--header 'x-api-key: <api-key>'import requests
url = "https://public-api.salu.com.vc/dev/routes/v0/analysis/"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://public-api.salu.com.vc/dev/routes/v0/analysis/', 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://public-api.salu.com.vc/dev/routes/v0/analysis/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <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://public-api.salu.com.vc/dev/routes/v0/analysis/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<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://public-api.salu.com.vc/dev/routes/v0/analysis/")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://public-api.salu.com.vc/dev/routes/v0/analysis/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"gov_id": "<string>",
"status": "IN_ANALYSIS",
"request_date": "2023-11-07T05:31:56Z",
"organization": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
},
"validation_date": "2023-11-07T05:31:56Z",
"observation": "<string>",
"employee_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"disabilities": [
{}
],
"expiration_date": "2023-11-07T05:31:56Z",
"expired": true,
"analysis_files": []
}
],
"cursor": {
"total": 123,
"page": 123,
"page_size": 123,
"total_pages": 123,
"next_page": true
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Lista as análises da organização, com paginação por cursor. Veja o conceito
em Análise PCD.
Visão Geral
- Método:
GET - Path:
/v0/analysis/ - OperationId:
public_list_analyses_v0_analysis__get - Autenticação: header
x-api-key
Filtros e paginação
Suporta os parâmetros padrão de paginação/ordenação (page, limit, order_by, order_dir)
e os seguintes filtros:
| Filtro | Significado (PT) |
|---|---|
organization_id | Organização da análise. |
gov_id | CPF do candidato/colaborador. |
employee_id | UUID do colaborador. |
status | Um dos valores de status (IN_ANALYSIS, INCOMPLETE, APPROVED, REPROVED, EXPIRED). |
request_date_start / request_date_end | Intervalo de data de abertura da análise. |
cursor — veja Como usar §8.
Não há webhook de conclusão de análise — o acompanhamento é feito por polling neste endpoint.
Combine
status com request_date_start/request_date_end para buscar em lote apenas as
análises pendentes de um período, em vez de um GET /v0/analysis/{analysis_id} por análise.Exemplo de requisição
curl -X GET "https://public-api.salu.com.vc/dev/routes/v0/analysis/?page=0&limit=20" \
-H "Accept: application/json" \
-H "x-api-key: $SALU_PUBLIC_API_KEY"
Authorizations
Query Parameters
Required range:
x >= 0Required range:
x >= 1Available options:
IN_ANALYSIS, INCOMPLETE, APPROVED, REPROVED, EXPIRED