-
Notifications
You must be signed in to change notification settings - Fork 6
REST API
SPARQLed can be configured using only a REST API. This HTML page presents a way how to use the REST calls in order to create and organize a list of summaries. It is available in http://localhost:8080/sparqled/manager.
Below is the list of available REST calls (each method returns a response in the JSON format. it can be wrapped using a callback). The HTTP method is defined in the brackets, e.g., [GET].
Below, Proxy endpoint refers to the SPARQL endpoint defined in config.xml under the tag proxy. Recommender endpoint is the SPARQL endpoint defined under the tag recommender.
-
[POST] /rest/summaries/create
This method computes the summary taking data from the Proxy endpoint. The result is stored in the Recommender endpoint. The available query parameters are the following:
- input-graph: the graph name of the dataset. By default, all the Proxy endpoint graphs are considered;
- output-graph: the graph name of the dataset's summary. By default, it is http://sindice.com/analytics. The summary is registered into a graph named http://sindice.com/analytics/summaries into the Recommender endpoint.
-
[GET] /rest/summaries/list
This method gives a list of available summaries registered in the Recommender endpoint.
-
[DELETE] /rest/summaries/delete
This method deletes a specified summary graph in the Recommender endpoint. The query parameter is the following; it is mandatory:
- graph: the graph name of the dataset summary to delete. This graph is deleted from the Recommender endpoint, as well as the entry in the http://sindice.com/analytics/summaries named graph.
-
[POST] /rest/summaries/update
This method updates a specified summary graph in the Recommender endpoint. The query parameter is the following; it is mandatory:
- graph: the graph name of the dataset summary to update. This graph is deleted from the Recommender endpoint, as well as the entry in the http://sindice.com/analytics/summaries named graph. Then, a new summary is computed from the same input graph as that was used to compute the previous summary.
-
[GET] /rest/summaries/peek
This method retrieves triples from the given graph. The endpoint used is the Recommender endpoint. The query parameters are the following:
- input-graph: the graph to pull RDF data from;
- limit: the maximum number of triples to retrieve. By default, it is set to 10.
You can also set from which computed summary you want to use to provide recommendations:
-
[PUT] /AssistedSparqlEditorServlet
This method set the GRAPH name of a summary. It is used for computing recommendations. The available query parameter is the following:
- dg: the graph name of the dataset's summary. By default, it is set to http://sindice.com/analytics.