Endpoint Reference by Area
Integrating a system with DATTA should not require reverse-engineering the user interface. This page consolidates, area by area, the endpoints referenced across the platform guides — with method, path and what each one does — so you can build your integration from a single place. Authentication, CSRF protection and general conventions (JSON format, error field, permissions) live in the API overview and apply to everything below.
Conventions on this page: variable segments appear as placeholders ({id}, {numero}, {taskId}); relevant query parameters are mentioned in the description; endpoints marked as server-to-server are meant for system-to-system integration, not browser calls.
Search, Chat & AI
Build semantic search, conversational assistants and AI-assisted generation on top of your context's collection.
| Method | Endpoint | What it does |
|---|---|---|
| POST | /api/search/hybrid | Hybrid text search (lexical + vector + graph, with rank fusion) |
| POST | /api/chat/stream | Streaming AI answer (SSE) for Search/Chat |
| GET | /api/users/me/prompt | Reads the logged-in user's custom prompt (resolved from the token, never from a parameter); no prompt → {"customPrompt":""} |
| PUT | /api/users/me/prompt | Saves the custom prompt ({"customPrompt":"..."}; trimmed and truncated at 8000 characters) |
| POST | /api/captain/sessoes/{id}/anexos | Attaches a document to the Captain conversation (multipart, field file); the extracted text becomes context for the goal. The original file stays in the staging bucket (MinIO) for 24h; nothing is indexed or vectorized |
| GET | /api/captain/sessoes/{id}/anexos/{indice}/arquivo | Downloads an attachment's original file, as uploaded. 404 once the retention has expired |
| POST | /api/captain/sessoes/{id}/objetivo | Builds the Captain plan from a natural-language goal; progress via SSE. Executes nothing |
| POST | /api/captain/sessoes/{id}/confirmar | Executes the confirmed plan (SSE, step by step). The only place a write is born; requires CAPTAIN_EXECUTE |
| POST | /api/llm/chat/sync | Synchronous call to the language model; header X-LLM-Lane: batch selects the low-priority lane (no header = interactive) |
| POST | /api/embeddings/batch | Generates embeddings in batch (server-to-server; used e.g. for semantic deduplication of rules) |
| POST | /api/siql/semantic/nl-to-sql | Converts a Portuguese question into SQL ({question, workspace?, modelId?}); limit of 30 calls/hour |
| POST | /api/siql/events/ingest | Receives query events from the analytics engine through the fallback path, when publishing to the event stream fails (server-to-server) |
| GET | /api/search/node-text | Resolves the full text of an indexed item from a pointer (?index=&id=); server-to-server, restricted to platform indexes |
curl -X PUT "$BASE/api/users/me/prompt" \
-H "Authorization: Bearer $TOKEN" \
-H "X-Requested-With: XMLHttpRequest" \
-H "Content-Type: application/json" \
-d '{"customPrompt": "Responda sempre com referências normativas."}'Documents & Ingestion
Automate content intake — legislation URLs, case-law sources, context updates — and the controlled removal of court cases.
| Method | Endpoint | What it does |
|---|---|---|
| POST | /api/upload/extrair-texto | Returns the TEXT of an uploaded document (multipart, field file; ?maxCaracteres= truncates at the source) — no ingestion, indexing or vectorization. Requires DOCUMENT_EXTRACT_TEXT; a format outside the whitelist returns 422 with an actionable message |
| POST | /api/ingest-url/start | Starts URL ingestion (legislation, HTML, files); returns {taskId} immediately |
| GET | /api/ingest-url/status/{taskId} | Status, percentage and phase of the URL ingestion (poll ~2 s) |
| POST | /api/ingest-url/cancel/{taskId} | Cancels the URL ingestion in progress |
| POST | /api/pipelines/{id}/execute | Triggers the case-law load — each official source is a Datta Extract package; optional body {parametros:{...}} |
| POST | /api/contexts/{ctx}/update | "Update context" (resumes from where it stopped); {force:true} reprocesses everything |
| GET | /api/contexts/{ctx}/update/status/{taskId} | Progress and report of the update (differences, drift) |
| DELETE | /api/processos/{numero} | Deletes the court case and its own subgraph (?domain=; body {justificativa} required) |
| DELETE | /api/search/chunks/by-processo | Removes the case's indexed excerpts from the search store (?processoNumero=&domain=; optional body {documentCodes[]}; idempotent) |
| GET | /api/documents/dossie/{cnpj}/pdfs.zip | Downloads a ZIP with every PDF of the dossier linked to the company ID (?domain= of the context) |
Screening & Rules
Trigger batch or single-case screenings, follow progress in real time and manage the full rule lifecycle — including AI generation.
| Method | Endpoint | What it does |
|---|---|---|
| POST | /api/audit/batch/start | Starts the batch screening ({reprocess, apenasRegrasNovas, domain} → {taskId, total, ...}) |
| GET | /api/audit/batch/stream | Per-case progress via SSE (consume with fetch + Bearer, not EventSource; 15 s heartbeat) |
| GET | /api/audit/batch/status | Status/reconciliation of the batch screening (same source as the executions panel) |
| POST | /api/audit/batch/cancel | Cancels the batch screening in progress |
| POST | /api/audit/single | Reprocesses the screening of a single case |
| GET | /api/audit/details | Audit detail + case summary (?numero=&domain= — the number goes in the query because it contains /) |
| GET | /api/alerts | Lists the alerts of the context (?context=&status=&severidade=&page=&size=; ordered by severity, then recency) |
| GET | /api/alerts/{alertaId} | Detail of one alert, with the analysis that originated it |
| POST | /api/alerts/{alertaId}/status | Moves the alert state ({status, justificativa}; discarding requires a justification, and every transition is recorded) |
| GET | /api/alerts/acoes | History of the alert transitions in the context (who moved it, when and why) |
| POST | /api/alerts/backfill | Reprojects already-finished screenings of the context as alerts (?context=; idempotent, no LLM — the analysis is already stored) |
| GET | /api/rules | Lists screening rules (?contexto= filters) |
| POST | /api/rules | Creates a rule |
| PUT | /api/rules/{numero} | Updates/moves a rule |
| DELETE | /api/rules/{numero} | Deletes a rule |
| PATCH | /api/rules/{numero}/toggle | Enables/disables a rule |
| GET | /api/rules/{numero}/versoes | Version history of the rule or criterion (author, date and reason for each change) |
| GET | /api/rules/{numero}/interpretacao | LLM reading of the rule: intent, criteria, paraphrases and expected evidence |
| POST | /api/rules/{numero}/interpretacao | Regenerates the reading on demand (best-effort, in the background) |
| GET | /api/rules/niveis-anomalia | Anomaly levels with nested types (?contexto= filters the types) |
| GET | /api/rules/niveis-anomalia/tipos | Names of a context's active types (?contexto= required) |
| POST | /api/rules/niveis-anomalia | Creates an anomaly level |
| PUT | /api/rules/niveis-anomalia/{chave} | Updates a level |
| DELETE | /api/rules/niveis-anomalia/{chave} | Deletes a level (refuses the built-in ones and those still holding types) |
| POST | /api/rules/niveis-anomalia/{chave}/tipos | Creates an anomaly type under the level |
| PUT | /api/rules/niveis-anomalia/{chave}/tipos/{id} | Updates a type (changing level moves the link) |
| DELETE | /api/rules/niveis-anomalia/{chave}/tipos/{id} | Deletes a type |
| GET | /api/rules/{numero}/versoes/{versao} | Exact text of a specific version of the rule or criterion |
| POST | /api/rules/test-references | Tests a rule's normative references ({regraTexto, regraContexto[]} → {references[], total_found, total_missing}) |
| POST | /api/rules/delete-all | Deletes ALL rules of a context ({contexto, motivo}; dedicated administrative permission) |
| POST | /api/rules/generate | Generates screening rules with AI ({contexto, descricao, quantidade, todas} → {status:"RUNNING", taskId}) |
| GET | /api/rules/generate/stream/{taskId} | Real-time generation progress (SSE) |
| GET | /api/rules/generate/status/{taskId} | Generation status (lets you resume after reopening the page) |
| POST | /api/rules/generate/cancel/{taskId} | Cancels the rule generation |
| GET | /api/rules/generate/active | Rule generations in progress |
| GET | /api/rules/generate/recent | Latest finished rule generations |
curl -X POST "$BASE/api/rules/generate" \
-H "Authorization: Bearer $TOKEN" \
-H "X-Requested-With: XMLHttpRequest" \
-H "Content-Type: application/json" \
-d '{"contexto": "CPC", "descricao": "prazos recursais", "quantidade": 5}'Appeals & Legal Drafts
Generate AI-grounded appeal drafts and convert the result into an editable document.
| Method | Endpoint | What it does |
|---|---|---|
| POST | /api/chat/recurso | Generates the appeal draft (processoNumero, tipoRecurso, fundamentacao, chatContext, model, provider, domain); limit ~20 calls/hour |
| POST | /api/chat/recurso/docx | Converts the already generated draft into .docx (content, tipoRecurso, processoNumero); does not call the AI again |
curl -X POST "$BASE/api/chat/recurso" \
-H "Authorization: Bearer $TOKEN" \
-H "X-Requested-With: XMLHttpRequest" \
-H "Content-Type: application/json" \
-d '{"processoNumero": "0001234-56.2024.8.26.0100", "tipoRecurso": "apelacao", "fundamentacao": "cerceamento de defesa"}'Catalog & Knowledge
Publish and govern datasets in the Knowledge Catalog, run the knowledge-asset curation cycle and maintain glossary and domain prompts.
| Method | Endpoint | What it does |
|---|---|---|
| POST | /api/catalog/datasets/upsert | Registers/updates a dataset in the Knowledge Catalog (statistics + per-column semantics; also called by automatic cataloging) |
| GET | /api/catalog/lineage/graph | Lineage graph (dashboard, chart, dataset, process, column) |
| POST | /api/catalog/lineage/edges/by-name | Writes lineage edges idempotently |
| GET | /api/catalog/classifications | Lists the 5 data classification levels |
| GET | /api/catalog/datasets/{id}/ownership | Reads current ownership (owner, steward, classification) |
| PUT | /api/catalog/datasets/{id}/ownership | Assigns/replaces ownership ({ownerId, stewardId, classification}) |
| DELETE | /api/catalog/datasets/{id}/ownership | Removes ownership (back to the INTERNAL default) |
| POST | /api/catalog/datasets/{id}/classify | Automatic classification (PII heuristics + AI), preserving owner/steward |
| GET | /api/catalog/datasets/by-classification | Lists datasets by level (?level=PII; LGPD reports) |
| GET | /api/catalog/sources/grouped | Aggregate of the data sources available across all engines (?type=all) |
| POST | /api/catalog/sources/invalidate | Forces a refresh of the source aggregator |
| GET | /api/knowledge/assets | Lists knowledge assets with pagination (filters dominio, tipo, status, page, size) |
| GET | /api/knowledge/assets/{id} | Asset detail with full traceability (source document, excerpts, model, version, approver) |
| POST | /api/knowledge/assets/generate | Triggers batch asset generation ({dominio, documentCodes?, tipos?}); 202 + {taskId}; max. 50 documents per batch |
| GET | /api/knowledge/assets/generate/stream/{taskId} | Generation progress via SSE (phase, total, processed, failures, generated assets) |
| POST | /api/knowledge/assets/{id}/regenerate | One-off regeneration (new version of the same document/type); 202 + {taskId} |
| PUT | /api/knowledge/assets/{id}/status | Status transition (`{status: "APPROVED"\ |
| PUT | /api/knowledge/assets/{id}/conteudo | Persists a human edit of the content (keeps DRAFT, flags human edit; validates citations) |
| GET | /api/knowledge/assets/{id}/fonte | Asset + cited source excerpts, for side-by-side review |
| GET | /api/knowledge/assets/{id}/diff | Difference between the current version and the last approved one |
| PUT | /api/knowledge/assets/status-lote | Batch approval/rejection ({ids, status, reason}, max. 200 ids; per-item partial result) |
| DELETE | /api/knowledge/assets/{id} | Deletes a DRAFT/REJECTED asset (never an approved one) |
| GET | /api/knowledge/review-queue/fontes | Documents outside the expected origin awaiting human decision (?dominio=) |
| GET | /api/knowledge/metrics/overview | Knowledge-base indicators (funnel, backlog, generation quality, latest batches) |
| GET | /api/catalog/glossary/terms | Lists glossary terms (?status=DRAFT; with source-document provenance) |
| PUT | /api/catalog/glossary/terms/{id} | Inline edit of a term's definition |
| PUT | /api/catalog/glossary/status-lote | Batch approval/rejection of terms (max. 500 ids); propagates to chat within ≤ 5 min |
| GET | /api/knowledge-prompt/{tipo} | Reads the domain's knowledge prompt (tipo: doc, faq, glossary, tone; ?domain=) |
| POST | /api/knowledge-prompt/{tipo} | Customizes the domain's prompt (?domain=) |
| POST | /api/knowledge-prompt/{tipo}/reset | Restores the domain's default prompt (?domain=) |
curl -X POST "$BASE/api/knowledge/assets/generate" \
-H "Authorization: Bearer $TOKEN" \
-H "X-Requested-With: XMLHttpRequest" \
-H "Content-Type: application/json" \
-d '{"dominio": "CPC"}'Connections & Drivers
Register external data sources idempotently — every created connection triggers automatic cataloging — and manage the drivers behind them.
| Method | Endpoint | What it does |
|---|---|---|
| POST | /api/connections | Creates a connection explicitly (no deduplication) |
| POST | /api/connections/ensure | Creates or reuses a connection idempotently (deduplication by fingerprint of type+host+port+database+user, without credentials) |
| GET | /api/connections | Lists connections visible to the user (?orphan=true lists orphans; admin) |
| GET | /api/connections/{id} | Connection detail |
| POST | /api/connections/test-without-save | Tests the configuration before persisting |
| POST | /api/connections/{id}/test | Tests an existing connection |
| POST | /api/connections/{id}/scan | Manual re-cataloging — queues a new cataloging scan (admin) |
| GET | /api/connections/{id}/scan/status | State of the cataloging scan in progress |
| GET | /api/connections/{id}/scan/events | Cataloging progress via SSE |
| POST | /api/connections/{id}/bindings | Reassigns credential/binding to a user (orphan connection) |
| GET | /api/connections/{id}/monitoring | Reads the monitored source's schedule, window and policy |
| PUT | /api/connections/{id}/monitoring | Writes the monitored source's schedule, window and policy |
| POST | /api/connections/{id}/check-now | Triggers an immediate check; 202 + {syncId, status, historyUrl}; 409 if a sync is already running; limit 10/hour per user |
| GET | /api/connections/{id}/sync-history | Paginated sync history (?page=&size=, size 1–100) |
| DELETE | /api/connections/{id} | Revokes the connection (already cataloged datasets remain) |
| GET | /api/drivers | Lists installed drivers (?status= filters) |
| GET | /api/drivers/catalog | Official catalog of approved drivers |
| POST | /api/drivers/upload | Driver upload + metadata; goes through a validation pipeline (bytecode, vulnerabilities, signature, load test) |
| POST | /api/drivers/bootstrap | Batch-installs the official auto-download drivers |
| GET | /api/drivers/{id}/usages | Connections using the driver |
| POST | /api/drivers/{id}/fetch-docs | Re-ingests the vendor documentation (202; background task) |
| GET | /api/drivers/{id}/docs-status | Documentation ingestion progress (RUNNING/COMPLETED/FAILED) |
Panels & DATTA BI
Assemble workspaces, publish dashboards, render visuals with filters and drill, and drive the BI copilots — everything the editor does, via API.
| Method | Endpoint | What it does |
|---|---|---|
| GET | /api/config/panels | Flattened catalog of platform panels (native, canvas and BI dashboards) — scoped to the user's workspace visibility |
| GET | /api/config/workspaces | Lists the workspaces visible to the user (admin/S2S sees all; a workspace with no members is public; with members, only members and the owner) |
| GET | /api/config/workspaces/{id} | Detail of a visible workspace; a restricted workspace the user is not a member of returns 404 |
| PUT | /api/config/workspaces/{id}/panel-refs | Sets the panels linked by reference ({"panelRefs":[{"workspaceId","panelId"}]}; validates and deduplicates; invalid reference → 400) |
| POST | /api/config/workspaces/{id}/panels | Creates a canvas panel / publishes a BI dashboard in the workspace (kind: "dattabi-dashboard") |
| PUT | /api/config/workspaces/{id}/panels/{panelId} | Saves the panel's title/configuration |
| GET | /api/config/panel/{domain}/datasources | Sources available in the context (panel builder) |
| POST | /api/config/panel/{domain}/fields | Fields of the selected source (_all_ as domain in quick creation) |
| POST | /api/config/panel/{domain}/tables | Tables of the selected source |
| POST | /api/config/panel/{domain}/aggregate | Aggregated data for panel rendering (read via POST — parameters in the body) |
| POST | /api/config/panel/{domain}/preview | Preview of real data for tables |
| GET | /api/datalayer-admin/kafka/topics | Lists available streaming topics (quick creation) |
| GET | /api/dattabi/workspaces | Lists DATTA BI workspaces |
| GET | /api/dattabi/workspaces/{id}/shares | Lists users with access to the workspace + role |
| PUT | /api/dattabi/workspaces/{id}/shares/{userId} | Sets the sharing role (`{role: "view"\ |
| DELETE | /api/dattabi/workspaces/{id}/shares/{userId} | Removes the workspace share |
| GET | /api/dattabi/workspaces/{id}/themes | Lists workspace themes |
| GET | /api/dattabi/dashboards | Lists dashboards (?workspaceId=&includeArchived=; empty workspaceId → []) |
| POST | /api/dattabi/dashboards | Creates a dashboard |
| PATCH | /api/dattabi/dashboards/{id} | Partial update (merge of non-null fields: title, description, layouts, model, filters, pages, theme); used by auto-save |
| GET | /api/dattabi/dashboards/{id}/versions | Lists dashboard versions |
| POST | /api/dattabi/dashboards/{id}/restore | Restores the latest version |
| GET | /api/dattabi/dashboards/{id}/export.pdf | Exports the dashboard (also .png, .csv, .svg) |
| POST | /api/dattabi/dashboards/{id}/share | Creates a share link |
| GET | /api/dattabi/shares/public | Consumes a share link (?t=<token>&p=) |
| DELETE | /api/dattabi/shares/{id} | Revokes a share link |
| GET | /api/dattabi/dashboards/{id}/thumbnail.png | Dashboard thumbnail (header `X-Thumb-Source: snapshot\ |
| PUT | /api/dattabi/dashboards/{id}/thumbnail | Publishes the real thumbnail screenshot |
| POST | /api/dattabi/dashboards/{id}/render | Re-renders the dashboard with overrides (cross-filter) |
| POST | /api/dattabi/charts/{id}/render-drilled | Renders a chart with drill ({overrides, bindingsOverride}) |
| POST | /api/dattabi/copilot/chat | Editor copilot (SSE) |
| POST | /api/dattabi/dashboards/{id}/copilot/ask | Published-dashboard copilot (SSE) |
| POST | /api/dattabi/dashboards/{id}/copilot/narrative | Generates the dashboard's executive narrative |
| GET | /api/dattabi/dashboards/{id}/copilot/suggestions | Copilot question suggestions |
| POST | /api/dattabi/copilot/quick-dashboard | Quick creation (precedence customQuery > sources[] > legacy single source) |
| POST | /api/dattabi/copilot/generate-dashboard | Generates a dashboard from natural language ({prompt, datasetIds?, persist?, workspaceId?}) |
| GET | /api/dattabi/datasets | Lists workspace datasets (?workspaceId=; permission-filtered) |
| GET | /api/dattabi/datasets/{id} | Reads a dataset (loadMode field: IMPORT \ |
| POST | /api/dattabi/datasets | Creates a dataset (also used by DATTA Prep to persist each query) |
| POST | /api/dattabi/models | Creates a semantic model grouping queries |
| POST | /api/dattabi/models/{modelId}/datasets/{datasetId} | Links a dataset to the model |
| POST | /api/dattabi/prep/profile | Per-column statistical profile ({datasetRef, steps, sample?}) |
| POST | /api/dattabi/copilot/r/suggest | Generates an R script from natural language |
| GET | /api/dattabi/copilot/r/packages | Lists enabled R packages |
| POST | /api/dattabi/r/execute | Runs an R script on a dataset sample |
| POST | /api/dattabi/dattax/validate | Validates DATTAX syntax (Custom query tab) |
| POST | /api/dattabi/refresh-jobs/{id}/run-now | Triggers an immediate refresh of a materialized dataset |
| GET | /api/config/maps-api-key | Maps key for geo visuals (shared by BI, Chat and Investigate) |
curl -X POST "$BASE/api/dattabi/copilot/generate-dashboard" \
-H "Authorization: Bearer $TOKEN" \
-H "X-Requested-With: XMLHttpRequest" \
-H "Content-Type: application/json" \
-d '{"prompt": "Painel de processos por classe e por mês", "persist": true}'Pipelines & Executions
Run DATTAX scripts, subscribe to real-time streams, control pipeline lifecycles and track any background execution.
| Method | Endpoint | What it does |
|---|---|---|
| POST | /api/dattax/execute | Runs a standalone DATTAX script (progress via SSE on the same call) |
| GET | /api/dattax/stdlib | DATTAX standard library catalog (feeds the editor autocomplete) |
| POST | /api/dattax/stream/subscribe | Creates a DATTAX stream subscription; returns {subscriptionId, feasibility, sseUrl, wsUrl} |
| GET | /api/dattax/stream | Lists active stream subscriptions |
| GET | /api/dattax/stream/{id}/events | Subscription events via SSE (WebSocket fallback) |
| GET | /api/dattax/stream/{id}/lag | Stream subscription lag metrics |
| DELETE | /api/dattax/stream/{id} | Cancels the stream subscription |
| WS | /ws/dattax/stream/{id} | Primary (WebSocket) channel of stream events |
| GET | /api/pipelines/summary | Paginated list of extraction packages (24 per page) with source, status and integration facets |
| GET | /api/pipelines/stats | Aggregate indicators for the package gallery (total, running, scheduled, run today, success rate) |
| GET | /api/pipelines/quick/capabilities | Source-and-target combinations Quick Extract can run directly |
| POST | /api/pipelines/quick/preview | Turns the quick wizard's choices into the pipeline design, without saving or running it |
| GET | /api/pipelines/{id}/dattax | Converts the pipeline's visual definition into a DATTAX script |
| POST | /api/pipelines/{id}/{acao} | Pipeline lifecycle (acao: pause, resume, archive, activate) |
| GET | /api/etl/jobs | DATTA Extract / ETL loads (running and finished) |
| GET | /api/tasks | Running executions from the task hub (ingestions, uploads) |
| GET | /api/tasks/all | History of the latest finished tasks (?limit=10) |
| GET | /api/tasks/stream | Live execution state via SSE (updates every 5 s) |
| POST | /api/search/executions | Writes a terminal execution record (server-to-server) |
| GET | /api/search/executions/history | Reads the durable execution history (?from=&to= in epoch ms, limit up to 1000) |
BPM Processes
Publish process models, create instances and correlate messages to BPMN events from your own systems.
Managing models requires the BPMN_DEPLOY permission (or an administrator profile). A published model is immutable: to change it, open a new version.
| Method | Endpoint | What it does |
|---|---|---|
| POST | /api/bpmn/modelos | Creates/imports a BPMN model from XML |
| PUT | /api/bpmn/modelos/{id} | Edits the model while it has not been published |
| DELETE | /api/bpmn/modelos/{id} | Removes the model |
| POST | /api/bpmn/modelos/{id}/publicar | Publishes the model, making it executable and immutable |
| POST | /api/bpmn/modelos/{id}/nova-versao | Opens a new editable version from the published model |
| POST | /api/bpmn/modelos/{id}/auto-iniciar | Configures automatic instance start for the model |
| GET | /api/bpmn/modelos/{id}/contexto/previa | Preview of the context change (destino=): counts (including instanciasSeguindoContextoAtivo, which are never migrated) plus the database/label/property pairs of both sides; writes nothing |
| PUT | /api/bpmn/modelos/{id}/contexto | Repoints the model context and, with migrarInstancias, that of its instances ({contexto, migrarInstancias, motivo}; reason is mandatory) |
| POST | /api/bpmn/instancias | Creates a BPM process instance ({modeloId, chaveNegocio, titulo, variaveis}) |
| POST | /api/bpmn/mensagens | Publishes a correlated message for BPMN message events ({nome, correlacao, variaveis} → {entregues}) |
| DELETE | /api/bpmn/instancias/por-contexto | Deletes the BPM instances of a purged context (cancels active ones) |
| GET | /api/bpmn/instancias | Lists instances; accepts modeloId, status, chaveNegocio, responsavel (use __sem__ for the ones without an owner), pagina, tamanho |
| PUT | /api/bpmn/instancias/{id}/responsavel | Sets or changes the instance owner ({responsavel}; empty releases it). Requires BPMN_EXECUTE |
| PUT | /api/bpmn/instancias/responsavel-por-chave | Propagates the owner to every instance of a business key (?chave=, body {responsavel}) |
| POST | /api/bpmn/instancias/backfill-responsaveis | Fills in the owner of older instances from the current assignments (idempotent) |
| GET | `/api/bpmn/relatorios/{resumo\ | fases\ |
curl -X POST "$BASE/api/bpmn/instancias" \
-H "Authorization: Bearer $TOKEN" \
-H "X-Requested-With: XMLHttpRequest" \
-H "Content-Type: application/json" \
-d '{"modeloId": "triagem-processo", "chaveNegocio": "0001234-56.2024.8.26.0100", "titulo": "Triagem do processo", "variaveis": {}}'Users, Permissions & Contexts
Provision accounts, assign roles and permissions, manage domain contexts and run controlled cleanups.
| Method | Endpoint | What it does |
|---|---|---|
| POST | /api/auth/register | Local user registration (login required, with field validation) |
| POST | /api/auth/login | Authenticates by e-mail OR login in the same field |
| GET | /api/auth/users/{email} | Reads the account (e-mail is the canonical key) |
| PUT | /api/auth/users/{email} | Updates the account |
| DELETE | /api/auth/users/{email} | Removes the account |
| PUT | /api/auth/users/{email}/role | Sets the user's role |
| PUT | /api/auth/users/{email}/permissions | Grants direct permissions to the user |
| POST | /api/auth/jupyter-cookie | Issues an HttpOnly session cookie for the Notebook environment |
| POST | /api/users/atribuir/{processoNumero} | Assigns the case to a user ({email}, optional contexto). The write happens in the context where the case exists; 404 names the searched context and 409 asks for the context when the number exists in more than one. Requires USERS_EDIT |
| GET | /api/contextos | Lists the registered contexts (lean form: key and label); used by installers and integrations to discover what exists |
| GET | /api/contextos/list | Lists the contexts with each one's full details |
| GET | /api/contextos/active | The currently active context |
| GET | /api/contextos/{nome} | Details of a specific context |
| GET | /api/config/domain/list | Lists configured contexts (key, label, type, data sources) |
| GET | /api/config/domain/{nome} | Context + data sources + procedural-code base (when set) |
| PUT | /api/config/domain/{nome} | Updates the context (data sources, flag for chat consumption of knowledge assets; empty field clears, absent preserves) |
| GET | /api/config/rule-contexts-merged | Rule contexts + labels {contexts, labels}, already filtered by visibility |
| GET | /api/prompts/domains/active | The platform's active context (frontend fallback to resolve domain) |
| GET | /api/config/feature-visible-contexts | Full feature → visible contexts map |
| GET | /api/config/feature-visible-contexts/{feature} | Visible contexts of a feature (allowlist: dattabi, extract, ontology) |
| POST | /api/config/feature-visible-contexts/{feature} | Writes the feature's context list (empty list = all visible) |
| GET/POST | /api/config/rules-visible-contexts | Context visibility on the Rules panel (legacy) |
| GET/POST | /api/config/upload-pdf-visible-contexts | Context visibility on PDF Upload (legacy) |
| GET/POST | /api/config/upload-url-visible-contexts | Context visibility on URL Upload (legacy) |
| POST | /api/documents/context/purge | Orchestrates the full context purge (?domain=&reason=; sensitive permission) |
| POST | /api/graph/context/purge | Purges the context's graph (?domain=; validates the target against system bases; cascades to BPM) |
| POST | /api/search/admin/context/purge | Deletes the context's search indexes (?domain=) |
MCP & External Integrations
Connect external AI agents to DATTA's tools via the MCP protocol (JSON-RPC 2.0 + SSE), with observability over invocations.
| Method | Endpoint | What it does |
|---|---|---|
| GET | /api/mcp/tools | Lists registered MCP tools (name, schema, permission) |
| GET | /api/mcp/sessions | Active SSE sessions |
| GET | /api/mcp/invocations | Recent invocations (?limit=200; user, tool, duration, outcome) |
| GET | /api/mcp/info | MCP server information (server-to-server use) |
| POST | /mcp/rpc | MCP JSON-RPC 2.0 channel (Authorization: Bearer) |
| GET | /mcp/sse | MCP SSE channel; the endpoint event returns the session's message URL (/mcp/sse/messages?sessionId=...) |
curl -X POST "$BASE/mcp/rpc" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "id": 1, "method": "tools/list"}'Knowledge Export & Service Accounts
Take DATTA's curated knowledge to external systems — your own assistants, portals or search engines — through a channel with its own identity, separate from people's accounts.
Service accounts
Integrations do not use a person's account: you create a service account scoped to contexts and exchange its credentials for an access token. The secret is shown only once, at creation — store it in your vault.
| Method | Endpoint | What it does |
|---|---|---|
| POST | /api/auth/service-accounts | Creates the account scoped to contexts ({nome, descricao, dominios[]}); returns the identifier and the secret, the latter shown only now |
| GET | /api/auth/service-accounts | Lists the existing service accounts |
| DELETE | /api/auth/service-accounts/{id} | Revokes the account; body {reason} required, idempotent, effect propagated within 60 s |
| POST | /api/auth/service-accounts/token | Exchanges identifier + secret for a token carrying the account's scope; limited to 10 calls/minute per identifier and origin |
| GET | /api/auth/service-accounts/{id}/status | Checks the account's situation (server-to-server revocation check) |
An invalid credential and a revoked account return the same error on the token request — the difference is withheld on purpose. To find out whether an account was revoked, check the listing.
Export by context
Base: /api/knowledge/export/{context}/.... Only approved content is exported. Start with the manifest: it carries the per-collection inventory and a snapshot version that works as a cache validator — repeating the call with that validator returns "nothing new" instead of the whole content.
| Method | Endpoint | What it does |
|---|---|---|
| GET | /api/knowledge/export/{context}/manifest | Per-collection inventory + snapshot version; returns "not modified" when you supply the version you already hold |
| GET | /api/knowledge/export/{context}/documentos | Approved optimized documents (`?format=json\ |
| GET | /api/knowledge/export/{context}/faq | Approved question-and-answer pairs (?since=) |
| GET | /api/knowledge/export/{context}/glossario | Approved glossary terms (?since=) |
| GET | /api/knowledge/export/{context}/chunks | Current excerpts as a continuous stream, paged by cursor (?includeEmbeddings=) |
| GET | /api/knowledge/export/{context}/bundle | Zip package with manifest, documents, questions and glossary at once |
For incremental synchronization, keep the timestamp of your last export and pass it in since: the collections return only what changed since then.
TOKEN=$(curl -s -X POST "$BASE/api/auth/service-accounts/token" \
-H "Content-Type: application/json" \
-d '{"clientId": "'"$CLIENT_ID"'", "clientSecret": "'"$CLIENT_SECRET"'"}' | jq -r .accessToken)
curl -s "$BASE/api/knowledge/export/MEC/manifest" \
-H "Authorization: Bearer $TOKEN"Configuration & Utilities
Platform settings consumable via API: AI models, external-source keys, restricted documentation and object-storage browsing.
| Method | Endpoint | What it does |
|---|---|---|
| POST | /api/config/thinking-model | Sets the reasoning model of the chat's tool-selection step (platform-wide choice, applies to all contexts) |
| GET/POST | /api/config/datajud-url | Reads/writes the DataJud base URL (dynamic, no redeploy) |
| GET/POST | /api/config/datajud-key | Reads/writes the public CNJ key (masked after saving) |
| GET | /api/config/internal/datajud-key | Server-to-server read of the DataJud key |
| GET | /api/docs/{caminho} | Serves the manifest + content of the Documentation Portal's restricted section (authenticated) |
| GET | /api/platform/minio/browser/buckets | Lists object-storage buckets ([{name, creationDate}]) |
| GET | /api/platform/minio/browser/objects | Lists objects/folders (?bucket=&prefix=&recursive=&max=&startAfter= → {objects[], truncated, nextToken}) |
| GET | /api/platform/minio/browser/object | Object detail (?bucket=&key=; size, type, last modified, etag, metadata) |
| GET | /api/platform/minio/browser/summary | Bucket summary (?bucket=; count and total size, cap of 50,000 objects) |
| GET/PUT | /api/platform/minio/config | Reads/writes the object-storage configuration (secret key masked; administrative write) |
| POST | /api/platform/minio/test | Tests object-storage connectivity ({ok, message}) |
Endpoints evolve with the platform — new routes appear and parameters are refined in every release; when in doubt, the behavior observed in your installed version prevails. Every execution triggered via API (screenings, ingestions, generations, syncs) shows up in the Executions area of the interface, with the same audit trail as actions performed on screen.