curl --request POST \
--url http://localhost:4005/v1/reports \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"filters": {
"accounts": {
"account": {
"status": {
"eq": [
"ACTIVE"
]
}
}
}
},
"templateId": "00000000-0000-0000-0000-000000000000"
}
'import requests
url = "http://localhost:4005/v1/reports"
payload = {
"filters": { "accounts": { "account": { "status": { "eq": ["ACTIVE"] } } } },
"templateId": "00000000-0000-0000-0000-000000000000"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
filters: {accounts: {account: {status: {eq: ['ACTIVE']}}}},
templateId: '00000000-0000-0000-0000-000000000000'
})
};
fetch('http://localhost:4005/v1/reports', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "4005",
CURLOPT_URL => "http://localhost:4005/v1/reports",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'filters' => [
'accounts' => [
'account' => [
'status' => [
'eq' => [
'ACTIVE'
]
]
]
]
],
'templateId' => '00000000-0000-0000-0000-000000000000'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "http://localhost:4005/v1/reports"
payload := strings.NewReader("{\n \"filters\": {\n \"accounts\": {\n \"account\": {\n \"status\": {\n \"eq\": [\n \"ACTIVE\"\n ]\n }\n }\n }\n },\n \"templateId\": \"00000000-0000-0000-0000-000000000000\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("http://localhost:4005/v1/reports")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"filters\": {\n \"accounts\": {\n \"account\": {\n \"status\": {\n \"eq\": [\n \"ACTIVE\"\n ]\n }\n }\n }\n },\n \"templateId\": \"00000000-0000-0000-0000-000000000000\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:4005/v1/reports")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"filters\": {\n \"accounts\": {\n \"account\": {\n \"status\": {\n \"eq\": [\n \"ACTIVE\"\n ]\n }\n }\n }\n },\n \"templateId\": \"00000000-0000-0000-0000-000000000000\"\n}"
response = http.request(request)
puts response.read_body{
"completedAt": "2026-01-31T15:04:05Z",
"createdAt": "2026-01-31T15:00:00Z",
"deletedAt": "2026-02-01T09:00:00Z",
"filters": {
"accounts": {
"account": {
"status": {
"eq": [
"ACTIVE"
]
}
}
}
},
"id": "00000000-0000-0000-0000-000000000001",
"metadata": {
"source": "ledger",
"tenant": "sandbox"
},
"status": "Processing",
"templateDescription": "Monthly accounting report",
"templateId": "00000000-0000-0000-0000-000000000002",
"templateOutputFormat": "pdf",
"updatedAt": "2026-01-31T15:04:05Z"
}{
"code": "ERR-0001",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "body.templateId",
"message": "expected string to match 'uuid' format",
"value": "not-a-uuid"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example"
}{
"code": "ERR-0001",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "body.templateId",
"message": "expected string to match 'uuid' format",
"value": "not-a-uuid"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example"
}{
"code": "ERR-0001",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "body.templateId",
"message": "expected string to match 'uuid' format",
"value": "not-a-uuid"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example"
}{
"code": "ERR-0001",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "body.templateId",
"message": "expected string to match 'uuid' format",
"value": "not-a-uuid"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example"
}{
"code": "ERR-0001",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "body.templateId",
"message": "expected string to match 'uuid' format",
"value": "not-a-uuid"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example"
}{
"code": "ERR-0001",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "body.templateId",
"message": "expected string to match 'uuid' format",
"value": "not-a-uuid"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example"
}{
"code": "ERR-0001",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "body.templateId",
"message": "expected string to match 'uuid' format",
"value": "not-a-uuid"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example"
}{
"code": "ERR-0001",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "body.templateId",
"message": "expected string to match 'uuid' format",
"value": "not-a-uuid"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example"
}Criar um relatório
Cria um relatório a partir de um template existente e despacha sua geração.
curl --request POST \
--url http://localhost:4005/v1/reports \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"filters": {
"accounts": {
"account": {
"status": {
"eq": [
"ACTIVE"
]
}
}
}
},
"templateId": "00000000-0000-0000-0000-000000000000"
}
'import requests
url = "http://localhost:4005/v1/reports"
payload = {
"filters": { "accounts": { "account": { "status": { "eq": ["ACTIVE"] } } } },
"templateId": "00000000-0000-0000-0000-000000000000"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
filters: {accounts: {account: {status: {eq: ['ACTIVE']}}}},
templateId: '00000000-0000-0000-0000-000000000000'
})
};
fetch('http://localhost:4005/v1/reports', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "4005",
CURLOPT_URL => "http://localhost:4005/v1/reports",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'filters' => [
'accounts' => [
'account' => [
'status' => [
'eq' => [
'ACTIVE'
]
]
]
]
],
'templateId' => '00000000-0000-0000-0000-000000000000'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "http://localhost:4005/v1/reports"
payload := strings.NewReader("{\n \"filters\": {\n \"accounts\": {\n \"account\": {\n \"status\": {\n \"eq\": [\n \"ACTIVE\"\n ]\n }\n }\n }\n },\n \"templateId\": \"00000000-0000-0000-0000-000000000000\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("http://localhost:4005/v1/reports")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"filters\": {\n \"accounts\": {\n \"account\": {\n \"status\": {\n \"eq\": [\n \"ACTIVE\"\n ]\n }\n }\n }\n },\n \"templateId\": \"00000000-0000-0000-0000-000000000000\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:4005/v1/reports")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"filters\": {\n \"accounts\": {\n \"account\": {\n \"status\": {\n \"eq\": [\n \"ACTIVE\"\n ]\n }\n }\n }\n },\n \"templateId\": \"00000000-0000-0000-0000-000000000000\"\n}"
response = http.request(request)
puts response.read_body{
"completedAt": "2026-01-31T15:04:05Z",
"createdAt": "2026-01-31T15:00:00Z",
"deletedAt": "2026-02-01T09:00:00Z",
"filters": {
"accounts": {
"account": {
"status": {
"eq": [
"ACTIVE"
]
}
}
}
},
"id": "00000000-0000-0000-0000-000000000001",
"metadata": {
"source": "ledger",
"tenant": "sandbox"
},
"status": "Processing",
"templateDescription": "Monthly accounting report",
"templateId": "00000000-0000-0000-0000-000000000002",
"templateOutputFormat": "pdf",
"updatedAt": "2026-01-31T15:04:05Z"
}{
"code": "ERR-0001",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "body.templateId",
"message": "expected string to match 'uuid' format",
"value": "not-a-uuid"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example"
}{
"code": "ERR-0001",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "body.templateId",
"message": "expected string to match 'uuid' format",
"value": "not-a-uuid"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example"
}{
"code": "ERR-0001",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "body.templateId",
"message": "expected string to match 'uuid' format",
"value": "not-a-uuid"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example"
}{
"code": "ERR-0001",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "body.templateId",
"message": "expected string to match 'uuid' format",
"value": "not-a-uuid"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example"
}{
"code": "ERR-0001",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "body.templateId",
"message": "expected string to match 'uuid' format",
"value": "not-a-uuid"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example"
}{
"code": "ERR-0001",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "body.templateId",
"message": "expected string to match 'uuid' format",
"value": "not-a-uuid"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example"
}{
"code": "ERR-0001",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "body.templateId",
"message": "expected string to match 'uuid' format",
"value": "not-a-uuid"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example"
}{
"code": "ERR-0001",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "body.templateId",
"message": "expected string to match 'uuid' format",
"value": "not-a-uuid"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example"
}Autorizações
Token bearer JWT emitido pelo provedor de identidade.
Cabeçalhos
Chave de idempotência fornecida pelo cliente que impede a criação de relatórios duplicados
Corpo
Entrada do relatório
Condições de filtro agrupadas por fonte de dados, tabela e campo.
Show child attributes
Show child attributes
{
"accounts": {
"account": { "status": { "eq": ["ACTIVE"] } }
}
}
Identificador do template usado para gerar o relatório.
"00000000-0000-0000-0000-000000000000"
Resposta
Criado
Hora em que a geração do relatório foi concluída, quando disponível.
"2026-01-31T15:04:05Z"
Hora em que o relatório foi criado.
"2026-01-31T15:00:00Z"
Hora em que o relatório foi excluído de forma lógica, quando aplicável.
"2026-02-01T09:00:00Z"
Condições de filtro agrupadas por fonte de dados, tabela e campo.
Show child attributes
Show child attributes
{
"accounts": {
"account": { "status": { "eq": ["ACTIVE"] } }
}
}
Identificador estável do relatório.
"00000000-0000-0000-0000-000000000001"
Metadados adicionais do relatório, indexados pelo nome do atributo.
Show child attributes
Show child attributes
{ "source": "ledger", "tenant": "sandbox" }
Status atual da geração do relatório.
"Processing"
Descrição copiada do template quando o relatório foi criado.
"Monthly accounting report"
Identificador de origem do snapshot do template.
"00000000-0000-0000-0000-000000000002"
Formato de saída selecionado para o relatório gerado.
"pdf"
Hora da última atualização do relatório.
"2026-01-31T15:04:05Z"
Esta página foi útil?

