curl --request POST \
--url https://api.example.com/v1/knowledge/source-types/{name} \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"duckdb_table": "<string>",
"display_name": "",
"label": "",
"id_field": "id",
"sla_minutes": 60,
"preprocessors": [
"<string>"
],
"text_fields": [
{
"field": "<string>",
"format": "plain",
"item_field": "<string>",
"chunking_strategy": "semantic",
"max_tokens": 1024,
"overlap_tokens": 100
}
],
"structured_fields": [
"<string>"
],
"payload_fields": [
"<string>"
],
"filter_fields": [
"<string>"
],
"entity_links": [
{
"source_field": "<string>",
"entity_type": "<string>",
"relationship": "RELATED_TO"
}
]
}
'import requests
url = "https://api.example.com/v1/knowledge/source-types/{name}"
payload = {
"name": "<string>",
"duckdb_table": "<string>",
"display_name": "",
"label": "",
"id_field": "id",
"sla_minutes": 60,
"preprocessors": ["<string>"],
"text_fields": [
{
"field": "<string>",
"format": "plain",
"item_field": "<string>",
"chunking_strategy": "semantic",
"max_tokens": 1024,
"overlap_tokens": 100
}
],
"structured_fields": ["<string>"],
"payload_fields": ["<string>"],
"filter_fields": ["<string>"],
"entity_links": [
{
"source_field": "<string>",
"entity_type": "<string>",
"relationship": "RELATED_TO"
}
]
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
duckdb_table: '<string>',
display_name: '',
label: '',
id_field: 'id',
sla_minutes: 60,
preprocessors: ['<string>'],
text_fields: [
{
field: '<string>',
format: 'plain',
item_field: '<string>',
chunking_strategy: 'semantic',
max_tokens: 1024,
overlap_tokens: 100
}
],
structured_fields: ['<string>'],
payload_fields: ['<string>'],
filter_fields: ['<string>'],
entity_links: [
{source_field: '<string>', entity_type: '<string>', relationship: 'RELATED_TO'}
]
})
};
fetch('https://api.example.com/v1/knowledge/source-types/{name}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/v1/knowledge/source-types/{name}",
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([
'name' => '<string>',
'duckdb_table' => '<string>',
'display_name' => '',
'label' => '',
'id_field' => 'id',
'sla_minutes' => 60,
'preprocessors' => [
'<string>'
],
'text_fields' => [
[
'field' => '<string>',
'format' => 'plain',
'item_field' => '<string>',
'chunking_strategy' => 'semantic',
'max_tokens' => 1024,
'overlap_tokens' => 100
]
],
'structured_fields' => [
'<string>'
],
'payload_fields' => [
'<string>'
],
'filter_fields' => [
'<string>'
],
'entity_links' => [
[
'source_field' => '<string>',
'entity_type' => '<string>',
'relationship' => 'RELATED_TO'
]
]
]),
CURLOPT_HTTPHEADER => [
"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 := "https://api.example.com/v1/knowledge/source-types/{name}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"duckdb_table\": \"<string>\",\n \"display_name\": \"\",\n \"label\": \"\",\n \"id_field\": \"id\",\n \"sla_minutes\": 60,\n \"preprocessors\": [\n \"<string>\"\n ],\n \"text_fields\": [\n {\n \"field\": \"<string>\",\n \"format\": \"plain\",\n \"item_field\": \"<string>\",\n \"chunking_strategy\": \"semantic\",\n \"max_tokens\": 1024,\n \"overlap_tokens\": 100\n }\n ],\n \"structured_fields\": [\n \"<string>\"\n ],\n \"payload_fields\": [\n \"<string>\"\n ],\n \"filter_fields\": [\n \"<string>\"\n ],\n \"entity_links\": [\n {\n \"source_field\": \"<string>\",\n \"entity_type\": \"<string>\",\n \"relationship\": \"RELATED_TO\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
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("https://api.example.com/v1/knowledge/source-types/{name}")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"duckdb_table\": \"<string>\",\n \"display_name\": \"\",\n \"label\": \"\",\n \"id_field\": \"id\",\n \"sla_minutes\": 60,\n \"preprocessors\": [\n \"<string>\"\n ],\n \"text_fields\": [\n {\n \"field\": \"<string>\",\n \"format\": \"plain\",\n \"item_field\": \"<string>\",\n \"chunking_strategy\": \"semantic\",\n \"max_tokens\": 1024,\n \"overlap_tokens\": 100\n }\n ],\n \"structured_fields\": [\n \"<string>\"\n ],\n \"payload_fields\": [\n \"<string>\"\n ],\n \"filter_fields\": [\n \"<string>\"\n ],\n \"entity_links\": [\n {\n \"source_field\": \"<string>\",\n \"entity_type\": \"<string>\",\n \"relationship\": \"RELATED_TO\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/knowledge/source-types/{name}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"duckdb_table\": \"<string>\",\n \"display_name\": \"\",\n \"label\": \"\",\n \"id_field\": \"id\",\n \"sla_minutes\": 60,\n \"preprocessors\": [\n \"<string>\"\n ],\n \"text_fields\": [\n {\n \"field\": \"<string>\",\n \"format\": \"plain\",\n \"item_field\": \"<string>\",\n \"chunking_strategy\": \"semantic\",\n \"max_tokens\": 1024,\n \"overlap_tokens\": 100\n }\n ],\n \"structured_fields\": [\n \"<string>\"\n ],\n \"payload_fields\": [\n \"<string>\"\n ],\n \"filter_fields\": [\n \"<string>\"\n ],\n \"entity_links\": [\n {\n \"source_field\": \"<string>\",\n \"entity_type\": \"<string>\",\n \"relationship\": \"RELATED_TO\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"name": "<string>",
"path": "<string>",
"created": true
}Save (create or update) a source type definition
Write a source type definition YAML file to the workspace.
Creates or overwrites {WORKSPACE_PATH}/source_types/{name}.yaml.
The Knowledge Worker picks up this file on its next scheduled run and
begins indexing the configured DuckDB table.
Request body is validated against SourceTypeDef from strattum_core —
the same model used by the knowledge-worker to parse the YAML.
Used by the Console UI “Configurar indexação” / “Editar” drawer (PRD-008 section 10.9).
curl --request POST \
--url https://api.example.com/v1/knowledge/source-types/{name} \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"duckdb_table": "<string>",
"display_name": "",
"label": "",
"id_field": "id",
"sla_minutes": 60,
"preprocessors": [
"<string>"
],
"text_fields": [
{
"field": "<string>",
"format": "plain",
"item_field": "<string>",
"chunking_strategy": "semantic",
"max_tokens": 1024,
"overlap_tokens": 100
}
],
"structured_fields": [
"<string>"
],
"payload_fields": [
"<string>"
],
"filter_fields": [
"<string>"
],
"entity_links": [
{
"source_field": "<string>",
"entity_type": "<string>",
"relationship": "RELATED_TO"
}
]
}
'import requests
url = "https://api.example.com/v1/knowledge/source-types/{name}"
payload = {
"name": "<string>",
"duckdb_table": "<string>",
"display_name": "",
"label": "",
"id_field": "id",
"sla_minutes": 60,
"preprocessors": ["<string>"],
"text_fields": [
{
"field": "<string>",
"format": "plain",
"item_field": "<string>",
"chunking_strategy": "semantic",
"max_tokens": 1024,
"overlap_tokens": 100
}
],
"structured_fields": ["<string>"],
"payload_fields": ["<string>"],
"filter_fields": ["<string>"],
"entity_links": [
{
"source_field": "<string>",
"entity_type": "<string>",
"relationship": "RELATED_TO"
}
]
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
duckdb_table: '<string>',
display_name: '',
label: '',
id_field: 'id',
sla_minutes: 60,
preprocessors: ['<string>'],
text_fields: [
{
field: '<string>',
format: 'plain',
item_field: '<string>',
chunking_strategy: 'semantic',
max_tokens: 1024,
overlap_tokens: 100
}
],
structured_fields: ['<string>'],
payload_fields: ['<string>'],
filter_fields: ['<string>'],
entity_links: [
{source_field: '<string>', entity_type: '<string>', relationship: 'RELATED_TO'}
]
})
};
fetch('https://api.example.com/v1/knowledge/source-types/{name}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/v1/knowledge/source-types/{name}",
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([
'name' => '<string>',
'duckdb_table' => '<string>',
'display_name' => '',
'label' => '',
'id_field' => 'id',
'sla_minutes' => 60,
'preprocessors' => [
'<string>'
],
'text_fields' => [
[
'field' => '<string>',
'format' => 'plain',
'item_field' => '<string>',
'chunking_strategy' => 'semantic',
'max_tokens' => 1024,
'overlap_tokens' => 100
]
],
'structured_fields' => [
'<string>'
],
'payload_fields' => [
'<string>'
],
'filter_fields' => [
'<string>'
],
'entity_links' => [
[
'source_field' => '<string>',
'entity_type' => '<string>',
'relationship' => 'RELATED_TO'
]
]
]),
CURLOPT_HTTPHEADER => [
"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 := "https://api.example.com/v1/knowledge/source-types/{name}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"duckdb_table\": \"<string>\",\n \"display_name\": \"\",\n \"label\": \"\",\n \"id_field\": \"id\",\n \"sla_minutes\": 60,\n \"preprocessors\": [\n \"<string>\"\n ],\n \"text_fields\": [\n {\n \"field\": \"<string>\",\n \"format\": \"plain\",\n \"item_field\": \"<string>\",\n \"chunking_strategy\": \"semantic\",\n \"max_tokens\": 1024,\n \"overlap_tokens\": 100\n }\n ],\n \"structured_fields\": [\n \"<string>\"\n ],\n \"payload_fields\": [\n \"<string>\"\n ],\n \"filter_fields\": [\n \"<string>\"\n ],\n \"entity_links\": [\n {\n \"source_field\": \"<string>\",\n \"entity_type\": \"<string>\",\n \"relationship\": \"RELATED_TO\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
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("https://api.example.com/v1/knowledge/source-types/{name}")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"duckdb_table\": \"<string>\",\n \"display_name\": \"\",\n \"label\": \"\",\n \"id_field\": \"id\",\n \"sla_minutes\": 60,\n \"preprocessors\": [\n \"<string>\"\n ],\n \"text_fields\": [\n {\n \"field\": \"<string>\",\n \"format\": \"plain\",\n \"item_field\": \"<string>\",\n \"chunking_strategy\": \"semantic\",\n \"max_tokens\": 1024,\n \"overlap_tokens\": 100\n }\n ],\n \"structured_fields\": [\n \"<string>\"\n ],\n \"payload_fields\": [\n \"<string>\"\n ],\n \"filter_fields\": [\n \"<string>\"\n ],\n \"entity_links\": [\n {\n \"source_field\": \"<string>\",\n \"entity_type\": \"<string>\",\n \"relationship\": \"RELATED_TO\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/knowledge/source-types/{name}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"duckdb_table\": \"<string>\",\n \"display_name\": \"\",\n \"label\": \"\",\n \"id_field\": \"id\",\n \"sla_minutes\": 60,\n \"preprocessors\": [\n \"<string>\"\n ],\n \"text_fields\": [\n {\n \"field\": \"<string>\",\n \"format\": \"plain\",\n \"item_field\": \"<string>\",\n \"chunking_strategy\": \"semantic\",\n \"max_tokens\": 1024,\n \"overlap_tokens\": 100\n }\n ],\n \"structured_fields\": [\n \"<string>\"\n ],\n \"payload_fields\": [\n \"<string>\"\n ],\n \"filter_fields\": [\n \"<string>\"\n ],\n \"entity_links\": [\n {\n \"source_field\": \"<string>\",\n \"entity_type\": \"<string>\",\n \"relationship\": \"RELATED_TO\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"name": "<string>",
"path": "<string>",
"created": true
}Path Parameters
^[a-z][a-z0-9_-]*$Body
Complete definition of an operational Source Type.
Read from /workspace/source_types/{name}.yaml by the knowledge-worker
and written by the knowledge-api via POST /v1/knowledge/source_types/{name}.
Minimum required fields: name, duckdb_table, text_fields.
Unique source type identifier (slug, no spaces).
DuckDB table name that contains the operational records.
Human-readable label shown in the Console UI.
Alternative label used by the API (alias for display_name).
Column used as unique record identifier.
Maximum lag (in minutes) before the worker flags a delay.
x >= 1List of preprocessors applied before chunking.
Text fields to be chunked and indexed in Qdrant.
1Show child attributes
Show child attributes
Columns stored as structured metadata (for filtering).
Columns included in the chunk payload (not indexed).
Columns available as filters in search queries.
Field-to-entity mappings for memory graph propagation.
Show child attributes
Show child attributes