Named queries
This page is deprecated and no longer maintained.
We offer the use of named queries, that is, a SPARQL query that can be registered in the platform under a unique name and then called and executed in a short URL.
For example, one could register the following query under the name sameAs.
PREFIX schema: <https://schema.org/>
SELECT DISTINCT ?internalId
WHERE{
?internalId schema:sameAs ?externalUri
}
and then later call the query with a simple API call which does not require the SPARQL query in the query parameter or body.
curl --location --request GET 'https://proxy.opendatagermany.io/api/ts/v1/kg/sparql/sameAs' \
--header 'Accept: application/sparql-results+json' \
--header 'x-api-key: $API_KEY'
In addition, one could also register the same query as a parameterised query, such as the following
PREFIX schema: <https://schema.org/>
SELECT DISTINCT ?internalId
WHERE{
?internalId schema:sameAs <$uri>
}
and then later call the query with parameter:
curl --location --request GET 'https://proxy.opendatagermany.io/api/ts/v1/kg/sparql/sameAs&uri=http://...' \
--header 'Accept: application/sparql-results+json' \
--header 'x-api-key: $API_KEY'
Restricted access to create, update or delete named queries
Please contact the Onlim support or dev team if you want to register a query.
Updated 2 months ago
What’s Next