Domain Knowledge API
Domain Knowledge exposes a REST surface for concepts, semantic layer, ontology, and AI suggestion review.
For the functional product view, journeys, and positioning, see Domain Knowledge.
Authentication and Scope
- all routes require JWT;
- the effective scope is always the authenticated token
company; teamis not the primary knowledge partition today.
Permissions
concepts:list/get/create/update/deletesemantic:list/create/update/deleteontology:list/create/update/deleteknowledge_reviews:listknowledge_reviews:generateknowledge_reviews:review
Resource Shapes
Concept
namedescriptionstatus:draft | active | archivedtype:term | rule | entity_hint | metric_hint | policy_hintaliases[]tags[]sourceconfidencerelated_catalog_assets[]
Semantic Item
kind:entity | metric | dimension | mappingnamedescriptionstatusformulagrainfilters[]aggregationmapped_tables[]mapped_columns[]mapped_relations[]source_concept_ids[]depends_on_concepts[]depends_on_metrics[]depends_on_entities[]validation_errors[]
Ontology Node
namedescriptionnode_type:class | role | event | object | statestatusparent_node_idaliases[]attributes[]constraints[]source_concepts[]mapped_semantic_entities[]mapped_catalog_assets[]
Ontology Relation
subject_node_idpredicateobject_node_iddescriptioncardinalityrelation_typeconfidenceevidence[]status
Suggestion
target_typetarget_idtarget_nameconcept_idconcept_namesuggested_payloadexplanationevidence[]confidencemodelprompt_versionstatusrequest_idjob_idreview_note
Current status values:
pendingacceptedrejectedsuperseded
Job
target_type:concept | semantic | ontology_node | ontology_relationtarget_ids[]status:queued | running | succeeded | failed | cancelledprocessed_counttotal_countlast_errorrequest_id
Endpoints
Concepts
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/v1/domain-knowledge/concepts | List concepts with pagination and filters |
| GET | /api/v1/domain-knowledge/concepts/:id | Fetch one concept |
| POST | /api/v1/domain-knowledge/concepts | Create concept |
| PATCH | /api/v1/domain-knowledge/concepts/:id | Update concept |
| DELETE | /api/v1/domain-knowledge/concepts/:id | Archive concept |
Supported query params:
pageper_pagesearchstatustype
Suggestions
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/v1/domain-knowledge/suggestions | List pending suggestions |
| POST | /api/v1/domain-knowledge/suggestions/concepts/:id/generate | Generate concept suggestion |
| POST | /api/v1/domain-knowledge/suggestions/concepts/:id/promote-semantic | Suggest promotion to semantic layer |
| POST | /api/v1/domain-knowledge/suggestions/concepts/:id/promote-ontology | Suggest promotion to ontology |
| POST | /api/v1/domain-knowledge/suggestions/semantic/:id/generate | Generate semantic suggestion |
| POST | /api/v1/domain-knowledge/suggestions/ontology/nodes/:id/generate | Generate node suggestion |
| POST | /api/v1/domain-knowledge/suggestions/ontology/relations/:id/generate | Generate relation suggestion |
| POST | /api/v1/domain-knowledge/suggestions/:id/accept | Accept suggestion |
| POST | /api/v1/domain-knowledge/suggestions/:id/reject | Reject suggestion |
Current target_type values:
conceptsemanticsemantic_createontology_nodeontology_node_createontology_relation
Semantic Layer
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/v1/domain-knowledge/semantic | List semantic items |
| POST | /api/v1/domain-knowledge/semantic | Create semantic item |
| PATCH | /api/v1/domain-knowledge/semantic/:id | Update semantic item |
| DELETE | /api/v1/domain-knowledge/semantic/:id | Archive semantic item |
Ontology
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/v1/domain-knowledge/ontology/nodes | List nodes |
| POST | /api/v1/domain-knowledge/ontology/nodes | Create node |
| PATCH | /api/v1/domain-knowledge/ontology/nodes/:id | Update node |
| DELETE | /api/v1/domain-knowledge/ontology/nodes/:id | Archive node |
| GET | /api/v1/domain-knowledge/ontology/relations | List relations |
| POST | /api/v1/domain-knowledge/ontology/relations | Create relation |
| PATCH | /api/v1/domain-knowledge/ontology/relations/:id | Update relation |
| DELETE | /api/v1/domain-knowledge/ontology/relations/:id | Archive relation |
Jobs
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/v1/domain-knowledge/jobs | List enrichment jobs |
| GET | /api/v1/domain-knowledge/jobs/:id | Get job status |
| POST | /api/v1/domain-knowledge/jobs/enrich | Create async enrichment job |
Validation Rules
nameanddescriptionare required when creating the main resourcesdescriptionaccepts up to4096charactersaliases[],tags[],related_catalog_assets[], andsource_concept_ids[]have a maximum of20items- create
statusacceptsdraftoractive predicateis required for ontology relationsentity,metric, anddimensionrequire at least onesource_concept_id- jobs require at least one
target_id
AI configuration
Suggestion generation routes return 503 when OPENROUTER_API_KEY is not configured.
Examples
Create a concept:
curl -X POST https://api.console.solucao42.com.br/api/v1/domain-knowledge/concepts \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "Net revenue",
"description": "Revenue after discounts and refunds",
"status": "active",
"type": "metric_hint",
"aliases": ["net sales"],
"tags": ["finance"]
}'
Reject a suggestion:
curl -X POST https://api.console.solucao42.com.br/api/v1/domain-knowledge/suggestions/SUGGESTION_ID/reject \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"review_note": "This does not reflect the company official rule"
}'