SPARQL interface
The platform supports data access via the standard SPARQL 1.1. Protocol . The API only accept SPARQL SELECT, ASK and CONSTRUCT queries and does not support SPARQL update queries.
One can use the
- HTTP GET operation with the SPARQL query url encoded in the query parameter query or the a
- HTTP POST request if the SPARQL query is large (which could exceed the maximum length of a URL)
Below is an example request with the following SPARQL query
SELECT *
WHERE{
?s ?p ?o .
} LIMIT 1
and the respective API call asking for the results in the SPARQL json format.
curl --location --request GET 'https://proxy.opendatagermany.io/api/ts/v1/kg/sparql&query=SELECT%20*%20WHERE%20%7B%20%3Fs%20%3Fp%20%3Fo%20.%7D%20LIMIT%201' \
--header 'Accept: application/sparql-results+json'\
--header 'x-api-key: $API_KEY'
Updated 6 months ago