Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: a0714fdb07

Fetching latest commit…

Cannot retrieve the latest commit at this time

..
Failed to load latest commit information.
doc/images
src
README.textile
pom.xml

README.textile

The SPARQL Kibble provides a means to execute SPARQL queries against Sail graph implementations.

REST API

GET Operations

returns uri description
map of vertices http://base/graphs/graph/tp/sparql?query=some-sparql executes a SPARQL query (denoted by some-sparql)

It is important to remember that the SPARQL query for the query parameter must be URL encoded. For example this SPARQL query:

SELECT ?x ?y WHERE { ?x <http://tinkerpop.com#knows> ?y }

needs to be encoded to:

http://localhost:8182/graphs/sailgraph/tp/sparql?query=SELECT%20%3Fx%20%3Fy%20WHERE%20{%20%3Fx%20%3Chttp%3A%2F%2Ftinkerpop.com%23knows%3E%20%3Fy%20}

It is also possible to POST JSON or form data to this URI. For example:

curl -v -X POST -H "Content-Type:application/json" -d '{"query":"SELECT ?x ?y WHERE { ?x <http://tinkerpop.com#knows> ?y }"}' http://localhost:8182/graphs/sailgraph/tp/sparql

will return:

{
  "results":[
    {"y":{"_id":"http:\/\/tinkerpop.com#2","_type":"vertex","kind":"uri"},
     "x":{"_id":"http:\/\/tinkerpop.com#1","_type":"vertex","kind":"uri"}},
    {"y":{"_id":"http:\/\/tinkerpop.com#4","_type":"vertex","kind":"uri"},
     "x":{"_id":"http:\/\/tinkerpop.com#1","_type":"vertex","kind":"uri"}}
    ],
  "success":true,
  "version":"0.4",
  "queryTime":90.959991
}
Something went wrong with that request. Please try again.