SPARQL Plugin

In order to user this plugin with the Neo4j Server, follow the Instructions on http://github.com/neo4j/sparql-plugin.

REST - API

Insert quads

This endpoint enables the insertion of quads into the Neo4j Server.

Final-Graph-insert-quads.svg
Figure 1. Final Graph

Example request

  • POST http://localhost:7474/db/data/ext/SPARQLPlugin/graphdb/insert_quad

  • Accept: application/json

  • Content-Type: application/json

{
  "s" : "http://neo4j.org#joe",
  "p" : "http://neo4j.org#knows",
  "o" : "http://neo4j.org#sara",
  "c" : "http://neo4j.org"
}

Example response

  • 204: No Content

Querying sparql

This is the default endpoint for SPARQL queries.

Final-Graph-querying-sparql.svg
Figure 2. Final Graph

Example request

  • POST http://localhost:7474/db/data/ext/SPARQLPlugin/graphdb/execute_sparql

  • Accept: application/json

  • Content-Type: application/json

{
  "query" : "SELECT ?x ?y WHERE { ?x <http://neo4j.org#knows> ?y . }"
}

Example response

  • 200: OK

  • Content-Type: application/json

[ {
  "y" : "http://neo4j.org#sara",
  "x" : "http://neo4j.org#joe"
} ]