PT EN
Back to site

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.

MethodEndpointWhat it does
POST/api/search/hybridHybrid text search (lexical + vector + graph, with rank fusion)
POST/api/chat/streamStreaming AI answer (SSE) for Search/Chat
GET/api/users/me/promptReads the logged-in user's custom prompt (resolved from the token, never from a parameter); no prompt → {"customPrompt":""}
PUT/api/users/me/promptSaves the custom prompt ({"customPrompt":"..."}; trimmed and truncated at 8000 characters)
POST/api/captain/sessoes/{id}/anexosAttaches 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}/arquivoDownloads an attachment's original file, as uploaded. 404 once the retention has expired
POST/api/captain/sessoes/{id}/objetivoBuilds the Captain plan from a natural-language goal; progress via SSE. Executes nothing
POST/api/captain/sessoes/{id}/confirmarExecutes the confirmed plan (SSE, step by step). The only place a write is born; requires CAPTAIN_EXECUTE
POST/api/llm/chat/syncSynchronous call to the language model; header X-LLM-Lane: batch selects the low-priority lane (no header = interactive)
POST/api/embeddings/batchGenerates embeddings in batch (server-to-server; used e.g. for semantic deduplication of rules)
POST/api/siql/semantic/nl-to-sqlConverts a Portuguese question into SQL ({question, workspace?, modelId?}); limit of 30 calls/hour
POST/api/siql/events/ingestReceives query events from the analytics engine through the fallback path, when publishing to the event stream fails (server-to-server)
GET/api/search/node-textResolves the full text of an indexed item from a pointer (?index=&id=); server-to-server, restricted to platform indexes
bash
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.

MethodEndpointWhat it does
POST/api/upload/extrair-textoReturns 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/startStarts 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}/executeTriggers 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-processoRemoves the case's indexed excerpts from the search store (?processoNumero=&domain=; optional body {documentCodes[]}; idempotent)
GET/api/documents/dossie/{cnpj}/pdfs.zipDownloads 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.

MethodEndpointWhat it does
POST/api/audit/batch/startStarts the batch screening ({reprocess, apenasRegrasNovas, domain}{taskId, total, ...})
GET/api/audit/batch/streamPer-case progress via SSE (consume with fetch + Bearer, not EventSource; 15 s heartbeat)
GET/api/audit/batch/statusStatus/reconciliation of the batch screening (same source as the executions panel)
POST/api/audit/batch/cancelCancels the batch screening in progress
POST/api/audit/singleReprocesses the screening of a single case
GET/api/audit/detailsAudit detail + case summary (?numero=&domain= — the number goes in the query because it contains /)
GET/api/alertsLists 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}/statusMoves the alert state ({status, justificativa}; discarding requires a justification, and every transition is recorded)
GET/api/alerts/acoesHistory of the alert transitions in the context (who moved it, when and why)
POST/api/alerts/backfillReprojects already-finished screenings of the context as alerts (?context=; idempotent, no LLM — the analysis is already stored)
GET/api/rulesLists screening rules (?contexto= filters)
POST/api/rulesCreates a rule
PUT/api/rules/{numero}Updates/moves a rule
DELETE/api/rules/{numero}Deletes a rule
PATCH/api/rules/{numero}/toggleEnables/disables a rule
GET/api/rules/{numero}/versoesVersion history of the rule or criterion (author, date and reason for each change)
GET/api/rules/{numero}/interpretacaoLLM reading of the rule: intent, criteria, paraphrases and expected evidence
POST/api/rules/{numero}/interpretacaoRegenerates the reading on demand (best-effort, in the background)
GET/api/rules/niveis-anomaliaAnomaly levels with nested types (?contexto= filters the types)
GET/api/rules/niveis-anomalia/tiposNames of a context's active types (?contexto= required)
POST/api/rules/niveis-anomaliaCreates 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}/tiposCreates 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-referencesTests a rule's normative references ({regraTexto, regraContexto[]}{references[], total_found, total_missing})
POST/api/rules/delete-allDeletes ALL rules of a context ({contexto, motivo}; dedicated administrative permission)
POST/api/rules/generateGenerates 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/activeRule generations in progress
GET/api/rules/generate/recentLatest finished rule generations
bash
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}'

Generate AI-grounded appeal drafts and convert the result into an editable document.

MethodEndpointWhat it does
POST/api/chat/recursoGenerates the appeal draft (processoNumero, tipoRecurso, fundamentacao, chatContext, model, provider, domain); limit ~20 calls/hour
POST/api/chat/recurso/docxConverts the already generated draft into .docx (content, tipoRecurso, processoNumero); does not call the AI again
bash
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.

MethodEndpointWhat it does
POST/api/catalog/datasets/upsertRegisters/updates a dataset in the Knowledge Catalog (statistics + per-column semantics; also called by automatic cataloging)
GET/api/catalog/lineage/graphLineage graph (dashboard, chart, dataset, process, column)
POST/api/catalog/lineage/edges/by-nameWrites lineage edges idempotently
GET/api/catalog/classificationsLists the 5 data classification levels
GET/api/catalog/datasets/{id}/ownershipReads current ownership (owner, steward, classification)
PUT/api/catalog/datasets/{id}/ownershipAssigns/replaces ownership ({ownerId, stewardId, classification})
DELETE/api/catalog/datasets/{id}/ownershipRemoves ownership (back to the INTERNAL default)
POST/api/catalog/datasets/{id}/classifyAutomatic classification (PII heuristics + AI), preserving owner/steward
GET/api/catalog/datasets/by-classificationLists datasets by level (?level=PII; LGPD reports)
GET/api/catalog/sources/groupedAggregate of the data sources available across all engines (?type=all)
POST/api/catalog/sources/invalidateForces a refresh of the source aggregator
GET/api/knowledge/assetsLists 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/generateTriggers 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}/regenerateOne-off regeneration (new version of the same document/type); 202 + {taskId}
PUT/api/knowledge/assets/{id}/statusStatus transition (`{status: "APPROVED"\
PUT/api/knowledge/assets/{id}/conteudoPersists a human edit of the content (keeps DRAFT, flags human edit; validates citations)
GET/api/knowledge/assets/{id}/fonteAsset + cited source excerpts, for side-by-side review
GET/api/knowledge/assets/{id}/diffDifference between the current version and the last approved one
PUT/api/knowledge/assets/status-loteBatch 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/fontesDocuments outside the expected origin awaiting human decision (?dominio=)
GET/api/knowledge/metrics/overviewKnowledge-base indicators (funnel, backlog, generation quality, latest batches)
GET/api/catalog/glossary/termsLists 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-loteBatch 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}/resetRestores the domain's default prompt (?domain=)
bash
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.

MethodEndpointWhat it does
POST/api/connectionsCreates a connection explicitly (no deduplication)
POST/api/connections/ensureCreates or reuses a connection idempotently (deduplication by fingerprint of type+host+port+database+user, without credentials)
GET/api/connectionsLists connections visible to the user (?orphan=true lists orphans; admin)
GET/api/connections/{id}Connection detail
POST/api/connections/test-without-saveTests the configuration before persisting
POST/api/connections/{id}/testTests an existing connection
POST/api/connections/{id}/scanManual re-cataloging — queues a new cataloging scan (admin)
GET/api/connections/{id}/scan/statusState of the cataloging scan in progress
GET/api/connections/{id}/scan/eventsCataloging progress via SSE
POST/api/connections/{id}/bindingsReassigns credential/binding to a user (orphan connection)
GET/api/connections/{id}/monitoringReads the monitored source's schedule, window and policy
PUT/api/connections/{id}/monitoringWrites the monitored source's schedule, window and policy
POST/api/connections/{id}/check-nowTriggers an immediate check; 202 + {syncId, status, historyUrl}; 409 if a sync is already running; limit 10/hour per user
GET/api/connections/{id}/sync-historyPaginated sync history (?page=&size=, size 1–100)
DELETE/api/connections/{id}Revokes the connection (already cataloged datasets remain)
GET/api/driversLists installed drivers (?status= filters)
GET/api/drivers/catalogOfficial catalog of approved drivers
POST/api/drivers/uploadDriver upload + metadata; goes through a validation pipeline (bytecode, vulnerabilities, signature, load test)
POST/api/drivers/bootstrapBatch-installs the official auto-download drivers
GET/api/drivers/{id}/usagesConnections using the driver
POST/api/drivers/{id}/fetch-docsRe-ingests the vendor documentation (202; background task)
GET/api/drivers/{id}/docs-statusDocumentation 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.

MethodEndpointWhat it does
GET/api/config/panelsFlattened catalog of platform panels (native, canvas and BI dashboards) — scoped to the user's workspace visibility
GET/api/config/workspacesLists 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-refsSets the panels linked by reference ({"panelRefs":[{"workspaceId","panelId"}]}; validates and deduplicates; invalid reference → 400)
POST/api/config/workspaces/{id}/panelsCreates 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}/datasourcesSources available in the context (panel builder)
POST/api/config/panel/{domain}/fieldsFields of the selected source (_all_ as domain in quick creation)
POST/api/config/panel/{domain}/tablesTables of the selected source
POST/api/config/panel/{domain}/aggregateAggregated data for panel rendering (read via POST — parameters in the body)
POST/api/config/panel/{domain}/previewPreview of real data for tables
GET/api/datalayer-admin/kafka/topicsLists available streaming topics (quick creation)
GET/api/dattabi/workspacesLists DATTA BI workspaces
GET/api/dattabi/workspaces/{id}/sharesLists 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}/themesLists workspace themes
GET/api/dattabi/dashboardsLists dashboards (?workspaceId=&includeArchived=; empty workspaceId[])
POST/api/dattabi/dashboardsCreates 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}/versionsLists dashboard versions
POST/api/dattabi/dashboards/{id}/restoreRestores the latest version
GET/api/dattabi/dashboards/{id}/export.pdfExports the dashboard (also .png, .csv, .svg)
POST/api/dattabi/dashboards/{id}/shareCreates a share link
GET/api/dattabi/shares/publicConsumes a share link (?t=<token>&p=)
DELETE/api/dattabi/shares/{id}Revokes a share link
GET/api/dattabi/dashboards/{id}/thumbnail.pngDashboard thumbnail (header `X-Thumb-Source: snapshot\
PUT/api/dattabi/dashboards/{id}/thumbnailPublishes the real thumbnail screenshot
POST/api/dattabi/dashboards/{id}/renderRe-renders the dashboard with overrides (cross-filter)
POST/api/dattabi/charts/{id}/render-drilledRenders a chart with drill ({overrides, bindingsOverride})
POST/api/dattabi/copilot/chatEditor copilot (SSE)
POST/api/dattabi/dashboards/{id}/copilot/askPublished-dashboard copilot (SSE)
POST/api/dattabi/dashboards/{id}/copilot/narrativeGenerates the dashboard's executive narrative
GET/api/dattabi/dashboards/{id}/copilot/suggestionsCopilot question suggestions
POST/api/dattabi/copilot/quick-dashboardQuick creation (precedence customQuery > sources[] > legacy single source)
POST/api/dattabi/copilot/generate-dashboardGenerates a dashboard from natural language ({prompt, datasetIds?, persist?, workspaceId?})
GET/api/dattabi/datasetsLists workspace datasets (?workspaceId=; permission-filtered)
GET/api/dattabi/datasets/{id}Reads a dataset (loadMode field: IMPORT \
POST/api/dattabi/datasetsCreates a dataset (also used by DATTA Prep to persist each query)
POST/api/dattabi/modelsCreates a semantic model grouping queries
POST/api/dattabi/models/{modelId}/datasets/{datasetId}Links a dataset to the model
POST/api/dattabi/prep/profilePer-column statistical profile ({datasetRef, steps, sample?})
POST/api/dattabi/copilot/r/suggestGenerates an R script from natural language
GET/api/dattabi/copilot/r/packagesLists enabled R packages
POST/api/dattabi/r/executeRuns an R script on a dataset sample
POST/api/dattabi/dattax/validateValidates DATTAX syntax (Custom query tab)
POST/api/dattabi/refresh-jobs/{id}/run-nowTriggers an immediate refresh of a materialized dataset
GET/api/config/maps-api-keyMaps key for geo visuals (shared by BI, Chat and Investigate)
bash
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.

MethodEndpointWhat it does
POST/api/dattax/executeRuns a standalone DATTAX script (progress via SSE on the same call)
GET/api/dattax/stdlibDATTAX standard library catalog (feeds the editor autocomplete)
POST/api/dattax/stream/subscribeCreates a DATTAX stream subscription; returns {subscriptionId, feasibility, sseUrl, wsUrl}
GET/api/dattax/streamLists active stream subscriptions
GET/api/dattax/stream/{id}/eventsSubscription events via SSE (WebSocket fallback)
GET/api/dattax/stream/{id}/lagStream 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/summaryPaginated list of extraction packages (24 per page) with source, status and integration facets
GET/api/pipelines/statsAggregate indicators for the package gallery (total, running, scheduled, run today, success rate)
GET/api/pipelines/quick/capabilitiesSource-and-target combinations Quick Extract can run directly
POST/api/pipelines/quick/previewTurns the quick wizard's choices into the pipeline design, without saving or running it
GET/api/pipelines/{id}/dattaxConverts the pipeline's visual definition into a DATTAX script
POST/api/pipelines/{id}/{acao}Pipeline lifecycle (acao: pause, resume, archive, activate)
GET/api/etl/jobsDATTA Extract / ETL loads (running and finished)
GET/api/tasksRunning executions from the task hub (ingestions, uploads)
GET/api/tasks/allHistory of the latest finished tasks (?limit=10)
GET/api/tasks/streamLive execution state via SSE (updates every 5 s)
POST/api/search/executionsWrites a terminal execution record (server-to-server)
GET/api/search/executions/historyReads 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.

MethodEndpointWhat it does
POST/api/bpmn/modelosCreates/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}/publicarPublishes the model, making it executable and immutable
POST/api/bpmn/modelos/{id}/nova-versaoOpens a new editable version from the published model
POST/api/bpmn/modelos/{id}/auto-iniciarConfigures automatic instance start for the model
GET/api/bpmn/modelos/{id}/contexto/previaPreview 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}/contextoRepoints the model context and, with migrarInstancias, that of its instances ({contexto, migrarInstancias, motivo}; reason is mandatory)
POST/api/bpmn/instanciasCreates a BPM process instance ({modeloId, chaveNegocio, titulo, variaveis})
POST/api/bpmn/mensagensPublishes a correlated message for BPMN message events ({nome, correlacao, variaveis}{entregues})
DELETE/api/bpmn/instancias/por-contextoDeletes the BPM instances of a purged context (cancels active ones)
GET/api/bpmn/instanciasLists instances; accepts modeloId, status, chaveNegocio, responsavel (use __sem__ for the ones without an owner), pagina, tamanho
PUT/api/bpmn/instancias/{id}/responsavelSets or changes the instance owner ({responsavel}; empty releases it). Requires BPMN_EXECUTE
PUT/api/bpmn/instancias/responsavel-por-chavePropagates the owner to every instance of a business key (?chave=, body {responsavel})
POST/api/bpmn/instancias/backfill-responsaveisFills in the owner of older instances from the current assignments (idempotent)
GET`/api/bpmn/relatorios/{resumo\fases\
bash
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.

MethodEndpointWhat it does
POST/api/auth/registerLocal user registration (login required, with field validation)
POST/api/auth/loginAuthenticates 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}/roleSets the user's role
PUT/api/auth/users/{email}/permissionsGrants direct permissions to the user
POST/api/auth/jupyter-cookieIssues 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/contextosLists the registered contexts (lean form: key and label); used by installers and integrations to discover what exists
GET/api/contextos/listLists the contexts with each one's full details
GET/api/contextos/activeThe currently active context
GET/api/contextos/{nome}Details of a specific context
GET/api/config/domain/listLists 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-mergedRule contexts + labels {contexts, labels}, already filtered by visibility
GET/api/prompts/domains/activeThe platform's active context (frontend fallback to resolve domain)
GET/api/config/feature-visible-contextsFull 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-contextsContext visibility on the Rules panel (legacy)
GET/POST/api/config/upload-pdf-visible-contextsContext visibility on PDF Upload (legacy)
GET/POST/api/config/upload-url-visible-contextsContext visibility on URL Upload (legacy)
POST/api/documents/context/purgeOrchestrates the full context purge (?domain=&reason=; sensitive permission)
POST/api/graph/context/purgePurges the context's graph (?domain=; validates the target against system bases; cascades to BPM)
POST/api/search/admin/context/purgeDeletes 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.

MethodEndpointWhat it does
GET/api/mcp/toolsLists registered MCP tools (name, schema, permission)
GET/api/mcp/sessionsActive SSE sessions
GET/api/mcp/invocationsRecent invocations (?limit=200; user, tool, duration, outcome)
GET/api/mcp/infoMCP server information (server-to-server use)
POST/mcp/rpcMCP JSON-RPC 2.0 channel (Authorization: Bearer)
GET/mcp/sseMCP SSE channel; the endpoint event returns the session's message URL (/mcp/sse/messages?sessionId=...)
bash
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.

MethodEndpointWhat it does
POST/api/auth/service-accountsCreates the account scoped to contexts ({nome, descricao, dominios[]}); returns the identifier and the secret, the latter shown only now
GET/api/auth/service-accountsLists 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/tokenExchanges 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}/statusChecks 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.

MethodEndpointWhat it does
GET/api/knowledge/export/{context}/manifestPer-collection inventory + snapshot version; returns "not modified" when you supply the version you already hold
GET/api/knowledge/export/{context}/documentosApproved optimized documents (`?format=json\
GET/api/knowledge/export/{context}/faqApproved question-and-answer pairs (?since=)
GET/api/knowledge/export/{context}/glossarioApproved glossary terms (?since=)
GET/api/knowledge/export/{context}/chunksCurrent excerpts as a continuous stream, paged by cursor (?includeEmbeddings=)
GET/api/knowledge/export/{context}/bundleZip 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.

bash
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.

MethodEndpointWhat it does
POST/api/config/thinking-modelSets the reasoning model of the chat's tool-selection step (platform-wide choice, applies to all contexts)
GET/POST/api/config/datajud-urlReads/writes the DataJud base URL (dynamic, no redeploy)
GET/POST/api/config/datajud-keyReads/writes the public CNJ key (masked after saving)
GET/api/config/internal/datajud-keyServer-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/bucketsLists object-storage buckets ([{name, creationDate}])
GET/api/platform/minio/browser/objectsLists objects/folders (?bucket=&prefix=&recursive=&max=&startAfter={objects[], truncated, nextToken})
GET/api/platform/minio/browser/objectObject detail (?bucket=&key=; size, type, last modified, etag, metadata)
GET/api/platform/minio/browser/summaryBucket summary (?bucket=; count and total size, cap of 50,000 objects)
GET/PUT/api/platform/minio/configReads/writes the object-storage configuration (secret key masked; administrative write)
POST/api/platform/minio/testTests 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.