In this section we show how to use PoolParty's SPARQL endpoint as http web service. You should read the section about the SPARQL endpoint before you read this chapter.
Thesaurus data can be accessed via the SPARQL endpoint by simply posting queries to the endpoint URL via a HTTP POST or HTTP GET.
These are the steps necessary to retrieve the data:
- Formulate a SPARQL query
- Execute an HTTP GET request with request parameters:
query: your SPARQL query (UTF-8) URL-encoded
format: your desired return format e.g.: application/xml, application/json
- Describe the format of the mime type of the body of the request: content-type: application/x-www-form-urlencoded
- Provide Authentication information when needed.
- Parse the SPARQL results in your application code using one of the Available SPARQL Clients
Screenshot of a query performed via browser based REST Console:
In the chapter Examples for Thesaurus Services you can find several query templates which can be used and adapted to fit your needs.