SPARQL API

SPARQL (SPARQL Protocol and RDF Query Language) is a query language specifically designed for querying and manipulating data stored in the RDF (Resource Description Framework) format. It allows users to write complex queries to extract structured information from RDF graphs using patterns of triples (subject–predicate–object).
Execute a SPARQL Query
  GET /{dataset}/query 
 Submit a SPARQL query against a dataset.
Note: Depending on configuration there can be equivalent /get, /read, or /sparql endpoints with identical functionality.
Parameters
- dataset(string, required, in path): The underlying dataset (i.e. Graph) to apply requests against.
- query(string, required): The SPARQL query string.
Responses
- 200 OK: Query executed successfully.
- 400 Bad Request: Invalid query or bad request.
- 401 Unauthorized: Unauthorised query.
- 404 Not Found: Endpoint not found i.e. incorrect dataset.
- 500 Internal Server Error: Internal Server Error i.e. the server failed to process the request.
- 503 Service Unavailable: Service Unavailable, i.e. the server is still in the process of starting.
Execute a SPARQL Update
  POST /{dataset}/update 
 Submit a SPARQL update against a dataset and, by means of the RDF Patches generated, also update the other Smart Caches.
Parameters
- dataset(string, required, in path): The underlying dataset (i.e. Graph) to apply requests against.
  Request Body (application/sparql-update) 
 - SPARQL Update query string.
Responses
- 200 OK: Update executed successfully.
- 400 Bad Request: Invalid query or bad request.
- 401 Unauthorized: Unauthorised query.
- 404 Not Found: Endpoint not found i.e. incorrect dataset.
- 500 Internal Server Error: Internal Server Error i.e. the server failed to process the request.
- 503 Service Unavailable: Service Unavailable, i.e. the server is still in the process of starting.
Validate RDF data against SHACL shapes
  POST /{dataset}/shacl 
 Submit RDF data and SHACL shapes to validate the data. The server processes the request and returns a SHACL validation report.
Parameters
- dataset(string, required, in path): The underlying dataset (i.e. Graph) to apply requests against.
- graph(string, optional, in query)
- target(string, optional, in query)
  Request Body (text/turtle) 
 - RDF data and SHACL shapes to validate.
Responses
- 200 OK: Validation report generated successfully. - text/turtleor- application/ld+json: Validation report returned in RDF form, serialized as a string in Turtle format.
 
- 400 Bad Request: Invalid input data or SHACL shapes.
- 500 Internal Server Error: Internal Server Error.