Cobertura
curl --request GET \
--url https://api.example.com/api/v1/coberturaimport requests
url = "https://api.example.com/api/v1/cobertura"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/api/v1/cobertura', 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://api.example.com/api/v1/cobertura",
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;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/v1/cobertura"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/api/v1/cobertura")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/cobertura")
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{
"temos": {},
"emVezDisso": "<string>"
}Cobertura
O que temos e o que não temos, consultável em vez de perguntável.
GET
/
api
/
v1
/
cobertura
Cobertura
curl --request GET \
--url https://api.example.com/api/v1/coberturaimport requests
url = "https://api.example.com/api/v1/cobertura"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/api/v1/cobertura', 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://api.example.com/api/v1/cobertura",
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;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/v1/cobertura"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/api/v1/cobertura")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/cobertura")
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{
"temos": {},
"emVezDisso": "<string>"
}string
O assunto nas suas palavras. Sem ele, devolve as listas completas.
curl "https://brain.pandoragraph.com/api/v1/cobertura?assunto=sanção da OFAC" \
-H "Authorization: Bearer pk_sua_chave"
{
"dado": {
"assunto": "sanção da OFAC",
"temos": false,
"naoTemos": "lista de sanção internacional — OFAC/SDN, ONU, União Europeia",
"emVezDisso": "a sanção administrativa brasileira, que está completa"
}
}
boolean | null
true cobrimos, false não cobrimos, null o assunto não está declarado —
e null não é o mesmo que false.string
O que existe no lugar. Recusa sem alternativa é beco sem saída.
?assunto=, você recebe cobre[] e naoCobre[] completos.
Este endpoint responde a pergunta que todo integrador faz na primeira semana.
Use-o antes de abrir chamado — e antes de concluir, a partir de uma resposta
vazia, que um dado não existe.