Get one request by ID for the current company
curl --request GET \
--url https://miner.production.judit.io/requests/{request_id} \
--header 'api-key: <api-key>'import requests
url = "https://miner.production.judit.io/requests/{request_id}"
headers = {"api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'api-key': '<api-key>'}};
fetch('https://miner.production.judit.io/requests/{request_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://miner.production.judit.io/requests/{request_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 => [
"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://miner.production.judit.io/requests/{request_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("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://miner.production.judit.io/requests/{request_id}")
.header("api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://miner.production.judit.io/requests/{request_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"request_id": 123,
"status": "pending",
"type": "count",
"total_lawsuits": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"processed_lawsuits": 123,
"error_message": "<string>",
"filter": {
"kind": "judgement-bond",
"tribunals": [
123
],
"amount_min": 123,
"amount_max": 123,
"budget_years": [
123
],
"natures": [
"alimentary"
],
"tags": [
"precatory_dispatched"
]
}
}{
"errors": [
"<string>"
]
}{
"errors": [
"<string>"
]
}Referência da API · Miner
Consultar status de uma busca
Retorna metadados e status (pending, completed, failed) de uma busca pelo seu request_id. Use para acompanhar o processamento até concluir.
GET
/
requests
/
{request_id}
Get one request by ID for the current company
curl --request GET \
--url https://miner.production.judit.io/requests/{request_id} \
--header 'api-key: <api-key>'import requests
url = "https://miner.production.judit.io/requests/{request_id}"
headers = {"api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'api-key': '<api-key>'}};
fetch('https://miner.production.judit.io/requests/{request_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://miner.production.judit.io/requests/{request_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 => [
"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://miner.production.judit.io/requests/{request_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("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://miner.production.judit.io/requests/{request_id}")
.header("api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://miner.production.judit.io/requests/{request_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"request_id": 123,
"status": "pending",
"type": "count",
"total_lawsuits": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"processed_lawsuits": 123,
"error_message": "<string>",
"filter": {
"kind": "judgement-bond",
"tribunals": [
123
],
"amount_min": 123,
"amount_max": 123,
"budget_years": [
123
],
"natures": [
"alimentary"
],
"tags": [
"precatory_dispatched"
]
}
}{
"errors": [
"<string>"
]
}{
"errors": [
"<string>"
]
}Autorizações
Replace with the actual API key requirement for your Miner API deployment.
Parâmetros de caminho
Numeric request identifier
Intervalo obrigatório:
x >= 1Resposta
Request found
Opções disponíveis:
pending, completed, failed Opções disponíveis:
count, find Present when truthy in persistence layer
Subset of filters returned on GET request (when stored on the entity)
Show child attributes
Show child attributes
Esta página foi útil?