Skip to content

REST API

Stéphane Campinas edited this page May 6, 2014 · 7 revisions

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:

  • [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:

Clone this wiki locally