Consulta realizadas por dia
Retorna lista com totais de consultas realizadas para métrica do consumo.
É considerado todos os dias dentre o período informado, existindo ou não consultas realizadas.
Requisição
GET https://api.capturaweb.com.br/v1/stats/use
Parâmetros
Nome | Tipo | Obrigatório | Descrição |
---|---|---|---|
start | string | true | Data inicial da lista: ex.: 2022-02-01 |
end | string | true | Data final da lista: ex.: 2022-02-02 |
Exemplos
- cURL
- Python
- PHP
- NodeJs
curl -X GET "https://api.capturaweb.com.br/v1/stats/use?start=2022-02-01&end=2022-02-02" \
-H "accept: */*" \
-H "Authorization: Bearer eyJhb…..57wxQ"
import requests
headers = {
'accept': '*/*',
'Authorization': 'Bearer eyJhb…..57wxQ',
}
params = {
'start': '2022-02-01',
'end': '2022-02-02',
}
response = requests.get('https://api.capturaweb.com.br/v1/stats/use', params=params, headers=headers)
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api.capturaweb.com.br/v1/stats/use?start=2022-02-01&end=2022-02-02');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'accept: */*',
"Authorization: Bearer eyJhb…..57wxQ",
]);
$response = curl_exec($ch);
curl_close($ch);
var request = require("request");
var headers = {
accept: "*/*",
Authorization: "Bearer eyJhb…..57wxQ",
};
var options = {
url: "https://api.capturaweb.com.br/v1/stats/use?start=2022-02-01&end=2022-02-02",
headers: headers,
};
function callback(error, response, body) {
if (!error && response.statusCode == 200) {
console.log(body);
}
}
request(options, callback);
Respostas
- Sucesso
{
"success": true,
"data": {
"today": {
"date": "2022-03-08",
"success": 5145,
"warning": 30,
"error": 0,
"pending": 3,
"total": 5178,
"bytes": 0
},
"days": [
{
"date": "2022-02-01",
"success": 8179,
"warning": 11,
"error": 1,
"pending": 0,
"total": 8191,
"bytes": 0
},
{
"date": "2022-02-02",
"success": 0,
"warning": 0,
"error": 0,
"pending": 0,
"total": 0,
"bytes": 0
},
.
.
.
]
}
}
Status | Significado | Descrição | Schema |
---|---|---|---|
200 | OK | Sucesso | None |
401 | Undocumented | "key" must be one of [cnj, number, cartaprecatoria, doc, documentodelegacia, legado, nome, nomeadvogado, oab, numerocda, nomeadv, nomeparte, numorigem, numregistro, numstj] | None |
401 | Unauthorized | Access denied | None |
429 | Too Many Requests | Waiting for request data | None |