Public Get Analysis
curl --request GET \
--url https://public-api.salu.com.vc/dev/routes/v0/analysis/{analysis_id} \
--header 'x-api-key: <api-key>'import requests
url = "https://public-api.salu.com.vc/dev/routes/v0/analysis/{analysis_id}"
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/{analysis_id}', 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/{analysis_id}",
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/{analysis_id}"
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/{analysis_id}")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://public-api.salu.com.vc/dev/routes/v0/analysis/{analysis_id}")
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{
"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": []
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Analysis
Get Analysis
GET
/
v0
/
analysis
/
{analysis_id}
Public Get Analysis
curl --request GET \
--url https://public-api.salu.com.vc/dev/routes/v0/analysis/{analysis_id} \
--header 'x-api-key: <api-key>'import requests
url = "https://public-api.salu.com.vc/dev/routes/v0/analysis/{analysis_id}"
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/{analysis_id}', 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/{analysis_id}",
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/{analysis_id}"
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/{analysis_id}")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://public-api.salu.com.vc/dev/routes/v0/analysis/{analysis_id}")
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{
"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": []
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Retorna uma análise pelo seu identificador. Use para acompanhar o
status da Análise PCD.Visão Geral
- Método:
GET - Path:
/v0/analysis/{analysis_id} - OperationId:
public_get_analysis_v0_analysis__analysis_id__get - Autenticação: header
x-api-key
Parâmetros
| Parâmetro | Em | Obrigatório | Significado (PT) |
|---|---|---|---|
analysis_id | path | sim | Identificador (UUID) da análise. |
Em
analysis_files, o campo file_path é uma URL de download temporária (pré-assinada)
do arquivo, válida por aproximadamente 1 hora após a consulta. Ela não deve ser
armazenada: quando expirar, basta consultar o endpoint novamente para obter uma URL nova.Códigos de erro
| Código | Situação |
|---|---|
404 | Não existe análise com esse analysis_id no escopo da chave de API. |
Exemplo de requisição
curl -X GET "https://public-api.salu.com.vc/dev/routes/v0/analysis/ANALYSIS_UUID" \
-H "Accept: application/json" \
-H "x-api-key: $SALU_PUBLIC_API_KEY"
Authorizations
Path Parameters
Response
Successful Response
Available options:
IN_ANALYSIS, INCOMPLETE, APPROVED, REPROVED, EXPIRED Show child attributes
Show child attributes
Show child attributes
Show child attributes