Management REST API
The management REST API lets scripts, CI pipelines and other services do what the web UI does for resources: create, read, update, start, stop and delete RAG Topics, GraphRAG Topics and Agents (with existing pipelines attached), and look up the AI servers, Docling servers, vector databases and graph databases they are built on. Pipelines themselves are built in the Pipeline Designer and cannot be created or modified through the API.
|
This is a different API from the one in RAG Topics → REST API. That page covers chatting with and uploading to a running topic container. This page covers managing the resources themselves, on the management app. |
The interactive reference — every endpoint, every field, with a Try it out button — is at
/swagger-ui.html on your installation (the raw OpenAPI document is /v3/api-docs).
1 · Get a token
The API is authenticated with personal access tokens.
-
Your user needs the
API_ACCESSpermission (Admin → Roles). Without it the API Tokens section does not appear, and existing tokens stop working. -
Open Profile → API Tokens → Create Token, give it a name and pick an expiry.
-
Copy the token (it starts with
kfp_). It is shown once — only a fingerprint is stored, so a lost token cannot be recovered; revoke it and create a new one.
Send it on every request:
curl -H "Authorization: Bearer kfp_…" https://fabric.example.com/api/v1/topics
A token acts as you, with your current roles: removing a role or disabling your account takes
effect on the next request. Revoke tokens you no longer need from the same Profile section.
Administrators with USER_MANAGE can see and revoke any user’s tokens under Admin → Users → Edit.
Resetting your password through Forgot password revokes all of your tokens, since a reset often follows a suspected compromise. Create new ones afterwards. Changing your password on the Profile page does not revoke them.
Tokens work the same for local and SSO (OIDC) users.
2 · Permissions
The API reuses the existing permissions — there are no API-specific ones beyond API_ACCESS:
| Operation | Permission |
|---|---|
Any |
|
List / get topics · GraphRAG topics · agents · pipelines |
|
Create |
|
Update ( |
|
Start and stop |
|
Delete |
|
Assign / remove an agent’s pipelines |
|
AI servers, Docling servers, vector and graph databases (read-only) |
any of |
Prompt templates (read-only) |
any of |
On top of the permission, you only see resources granted to one of your roles — the same rule as
the lists in the UI. A resource you were not granted answers 404, exactly like one that does not exist.
A resource you create is always granted to ADMIN and to every role you hold, plus any role names you
list in the request.
3 · Typical flow
T="Authorization: Bearer kfp_…"
API=https://fabric.example.com/api/v1
# Find the building blocks
curl -H "$T" $API/ai-servers
curl -H "$T" $API/ai-servers/<server-id>/models
curl -H "$T" $API/vector-databases
# Create a topic (only the required fields — everything else takes the wizard's defaults)
curl -H "$T" -H "Content-Type: application/json" $API/topics -d '{
"basics": { "name": "product_docs", "description": "Product manuals", "port": 8101, "roles": ["USER"] },
"models": {
"embedding": { "serverId": "<server-id>", "modelId": "nomic-embed-text" },
"llm": { "serverId": "<server-id>", "modelId": "qwen3:latest" }
},
"vectorDatabaseId": "<vector-database-id>"
}'
# Start it, then poll until it reports RUNNING
curl -H "$T" -X POST $API/topics/<topic-id>/start
curl -H "$T" $API/topics/<topic-id>
Notes:
-
Start, stop and delete are asynchronous. They answer
202 Acceptedright away; poll the resource’sGETfor itsstatus(STARTING→RUNNING, orERROR). A deleted resource answers404once removal is finished. -
Create requests are validated by the same rules as the creation wizards. The request body is grouped like the wizard’s steps (
basics,models,ingestion, … for a topic;basics,ingestion,vectorSettings,retrievalfor a GraphRAG topic). -
Every topic needs a registered vector database. Take its id from
GET /api/v1/vector-databasesand send it asvectorDatabaseId(RAG topic) orbasics.vectorDatabaseId(GraphRAG topic). There is no built-in store, so a create request without it is rejected. -
Prompt templates: the quick-fill templates an admin manages under Admin → Prompt Templates are listed at
GET /api/v1/prompt-templates. Either copy a template’scontentintobasics.userSystemPrompt(and adapt it), or pass its id asbasics.userSystemPromptTemplateIdto use it as-is — for Topics and GraphRAG Topics alike. The content is copied at creation, so editing the template later does not change existing topics. Give one of the two fields, not both. -
Embedding dimension: omit it and it is probed from the model; if the model cannot be reached the request fails and asks you to specify it.
-
GraphRAG model roles: extraction, dedup, community report, router and follow-up each need either a model (
{"serverId": …, "modelId": …}) or{"inheritLanguageModel": true}— the same explicit choice the wizard asks for. -
Agents: pass existing pipeline ids in
pipelineIds. Pipelines they call are assigned too.GET /api/v1/pipelinesshows whether each pipeline isdeployableand, if not, why. Pipelines themselves are built in the Pipeline Designer, not through the API. -
Credentials are never returned. Infrastructure responses say
hasApiKey/hasCredentialsinstead.
3a · Updating a resource
PATCH /api/v1/topics/{id}, /graphrag-topics/{id} and /agents/{id} take a
JSON Merge Patch (Content-Type: application/merge-patch+json;
plain application/json works the same way). Use the same groups and field names as the create request:
# Change two settings, clear the minimum score, leave everything else as it is
curl -X PATCH -H "$T" -H "Content-Type: application/merge-patch+json" $API/topics/<topic-id> -d '{
"basics": { "description": "Product manuals, 2026 edition" },
"retrieval": { "topK": 5, "minSimilarityScore": null }
}'
-
Send only what changes. An omitted field keeps its value, and
nullclears an optional setting. -
A model object is replaced as a whole. Send
{"serverId": …, "modelId": …}complete, or{"inheritLanguageModel": true}. -
Restarts. A running resource only picks up a change to its container configuration after a restart. The response carries
restartRequired. Add?restart=trueto have the API stop and start the resource for you; this also needs the resource’s START permission and a valid license (without one the patch is refused before anything is saved or stopped). The response’srestartingthen says a restart was triggered, and you pollGETfor the status. -
RAG Topics: the embedding model, the vector database and the chunk size/overlap are fixed at creation. A patch touching one is rejected with a message saying so. The chunking strategy and the upload types (
ingestion.uploadTypes) can change and apply to the next upload without a restart; documents already ingested are kept. The topic’s LLM overrides (memory and timeouts) are inllmOverrides. Its Prompts tab isprompts:systemPrompt,contextTemplate(must contain{context}),noAnswerResponse, and the container prompts underprompts.overridesby name (e.g.ROUTER); mapping one tonull, or to its default text, removes the override. Routing (retrieval.routing) and keyword enrichment (retrieval.keywordEnrichment, HYBRID only) are underretrieval. -
GraphRAG Topics: every setting is editable, as in the wizard’s edit mode. Each group you send (
basics,ingestion,vectorSettings,retrieval,prompts) is validated in full, like a wizard step you visit. Changing the embedding model or the chunk size/overlap of a topic that already holds data leaves old and new vectors inconsistent. Prompt overrides go underprompts.overrides(by prompt name, e.g.EXTRACTION); mapping a prompt tonull, or to its default text, removes the override. -
Docling options (both topic kinds):
ingestion.docling.optionsholds the topic’s Docling conversion settings as one JSON text, the same text as the Docling Options editor in the UI. Comments (//,/* */) are allowed and kept. The settings are sent with every upload, so a change applies to the next upload without a restart.nulluses the Docling server’s defaults. Settings this application sets itself (for exampleto_formatsorinclude_images) are refused. Without a Docling server the topic keeps no options. Because the value is a JSON text inside JSON, escape its quotes:{"ingestion":{"docling":{"options":"{\"do_ocr\": true}"}}}. -
Agents: name, description, port, roles, chat attachment types and Kubernetes resources. Pipelines are (un)assigned with
PUT/DELETE /api/v1/agents/{id}/pipelines/{pipelineId}. A removed pipeline is deleted from a running agent at once; a stopped or unreachable agent deletes it on its next start. TheDELETEresponse’srunningAgentsays which:REMOVED,NOT_RUNNINGorUNREACHABLE. -
Roles:
ADMINis always kept. For GraphRAG Topics your own roles are kept too, as in the wizard.
4 · Errors
Errors are JSON problem documents with a stable code:
| Status | code |
Meaning |
|---|---|---|
400 |
|
See |
400 |
|
Unreadable JSON, unknown enum value or malformed id — or an unknown field, reported as |
401 |
— |
Missing, unknown, revoked or expired token |
403 |
|
You lack |
404 |
|
Unknown id, or not granted to you |
409 |
|
E.g. starting something that is already running |
409 |
|
Your license allows no further resource of this kind ( |
409 |
|
There is no valid license. Creating and starting are refused until an administrator enters a key under Admin → License |
415 |
|
The body was not sent as JSON ( |
502 |
|
A running agent rejected a pipeline being assigned to it |
{
"status": 400,
"code": "VALIDATION_FAILED",
"detail": "The request failed validation — see 'violations'.",
"violations": [
{ "field": "basics.name", "message": "A topic with this name already exists" }
]
}