-
Notifications
You must be signed in to change notification settings - Fork 2
API Documentation
Aljosha Koecher edited this page Mar 10, 2022
·
1 revision
Every API route that retrieves some information from the knowledge graph shall return a full SparqlResponse objec
export interface SparqlResponse {
head: {
vars: Array<string>
},
results: {
bindings:[
Record<string, {type: string, value:string | number}>
]
}
}
Mapping into a list or table structure is done in the frontend using one of the two pipeable custom RxJs operators toSparqlVariableList
and toSparqlTable
, respectively.
- toSparqlList(variableName) -> get only the bindings of the given variable
- toSparqlTable -> get all variables in a table-like structure filling empty slots