Skip to main content

Knowledge Graph Manager API

info

Read this page in wide view mode from here

KGM API (1.0.0)

Search

Trigger a full reindex of all sources

Responses

Response samples

Content type
application/json
{
  • "type": "ERROR_CODE",
  • "title": "Invalid operation.",
  • "status": 400,
  • "detail": "string",
  • "instance": "/v1/graph/sparql",
  • "details": {
    }
}

Search across all sources

query Parameters
term
required
string <= 256 characters
Example: term=knowledge graph

Search term (maximum 256 characters, longer queries will be truncated)

offset
integer
Default: 0

Number of results to skip for pagination

limit
integer <= 100
Default: 10

Maximum number of results to return (capped at 100, larger values will be automatically reduced)

Responses

Response samples

Content type
application/json
{}

Search across all sources, optionally filtering by predicate values

Text search with optional graph filters. Values within one filter clause are OR alternatives; all clauses must match. The only supported predicate is http://www.w3.org/1999/02/22-rdf-syntax-ns#type and the only supported operator is in. The term is normalized and truncated to 256 characters; limits above 100 are capped at 100. Without filters, the result matches GET for common valid inputs: a nonblank term of at most 256 characters, a nonnegative offset, and a limit from 1 to 100. POST rejects blank terms and invalid paging; longer terms are truncated and positive limits above 100 are capped.

Request Body schema: application/json
required
term
required
string

Search term; normalized and truncated to 256 characters.

offset
integer or null >= 0
Default: 0

Zero-based page number. Null is equivalent to omission.

limit
integer or null >= 1
Default: 10

Page size; values above 100 are capped at 100. Null is equivalent to omission.

object or null

Prefix to absolute-IRI namespace declarations used to expand filter predicates (at most 20 entries). Prefixes must be nonblank, contain no colon, and differ from http and https. Values are never expanded.

Array of objects or null (SearchFilterClause)

Filter clauses, at most 20. Omission, null, or an empty array means no filtering.

Responses

Request samples

Content type
application/json
{}

Response samples

Content type
application/json
{}

Get all search predicates

Returns both locked predicates, managed by the kgm.search.predicates configuration, and unlocked predicates, registered via API.

Responses

Response samples

Content type
application/json

Replace the search predicates registered via API

Replaces the full set of unlocked predicates; locked predicates are unaffected. Any IRI in the request that matches a locked predicate is ignored and left as-is. A full reindex is scheduled asynchronously only if the set of unlocked predicates changes.

Request Body schema: application/json
required
predicates
required
Array of strings

The complete desired list of predicate IRIs registered via API. An empty array removes all of them. IRIs matching predicates managed by configuration are ignored.

Responses

Request samples

Content type
application/json

Response samples

Content type
application/json

Passthrough search to a specific source's native API

path Parameters
sourceId
required
string
Example: source-1

Source identifier

query Parameters
term
required
string <= 256 characters
Example: term=knowledge graph

Search term (maximum 256 characters, longer queries will be truncated)

offset
integer
Default: 0

Number of results to skip for pagination

limit
integer <= 100
Default: 10

Maximum number of results to return (capped at 100, larger values will be automatically reduced)

Responses

Response samples

Content type
application/json
{}

Graph

Passthrough SPARQL query to a specific source's native endpoint

path Parameters
sourceId
required
string
Example: source-1

Source identifier

Request Body schema: application/sparql-query
required
string

Responses

Response samples

Content type
application/sparql-results+json
{ }

Query the Knowledge Graph with SPARQL

Request Body schema: application/sparql-query
required
string

Responses

Response samples

Content type
application/sparql-results+json
{}

Sources

Trigger scheduled ingestion job for a specific source

path Parameters
sourceId
required
string
Example: source-1

Source identifier

Responses

Response samples

Content type
application/json
{
  • "type": "ERROR_CODE",
  • "title": "Invalid operation.",
  • "status": 400,
  • "detail": "string",
  • "instance": "/v1/graph/sparql",
  • "details": {
    }
}