[Paper Review] Simplified SPARQL REST API - CRUD on JSON Object Graphs via URI Paths
This paper proposes a zero-configuration REST API that maps SPARQL endpoints to a simple, path-based JSON interface, enabling developers to perform CRUD operations on RDF graphs using intuitive URI paths. By translating SPARQL queries into nested JSON objects and supporting wildcards, property paths, and RQL extensions, the approach lowers the barrier to entry for Semantic Web newcomers while maintaining full expressivity for complex graph navigation.
Within the Semantic Web community, SPARQL is one of the predominant languages to query and update RDF knowledge. However, the complexity of SPARQL, the underlying graph structure and various encodings are common sources of confusion for Semantic Web novices. In this paper we present a general purpose approach to convert any given SPARQL endpoint into a simple to use REST API. To lower the initial hurdle, we represent the underlying graph as an interlinked view of nested JSON objects that can be traversed by the API path.
Motivation & Objective
- To reduce the learning barrier for Semantic Web newcomers who struggle with RDF, SPARQL, and triplestore complexities.
- To provide a generic, zero-configuration interface that maps any SPARQL endpoint to a simple JSON-based REST API.
- To enable intuitive CRUD workflows through a path-based metaphor that mirrors object-oriented navigation of linked data.
- To abstract away low-level SPARQL syntax and triple-based representations while preserving expressivity via wildcards, property paths, and RQL extensions.
- To support seamless round-trip operations between JSON payloads and SPARQL updates, including batch processing and BNode handling.
Proposed method
- The API uses two primary entry points: /class for browsing instances of a class and /resource for accessing a specific resource by its CURIE.
- It translates HTTP requests into SPARQL queries using a path grammar that supports arbitrary traversal via alternating resource and property segments.
- Results are serialized as nested JSON objects with fields for ids (resources), values (literals), and id-map/value-map for complex structures, ensuring consistency and round-tripping.
- The system supports standard HTTP methods: GET for retrieval, POST for creating new resources (with random IDs), PUT for updates, and DELETE with depth-aware semantics.
- It extends expressivity using wildcards (*) for partial views, SPARQL-style property paths in brackets (e.g., /:x/(foaf:name|rdfs:label)/), and RQL extensions like sort, limit, and aggregations.
- Batch operations are supported via JSON-RPC to avoid URI length limits, and BNodes are handled via fixed skolemized URIs for seamless integration.
Experimental results
Research questions
- RQ1Can a generic, zero-configuration REST API be built to abstract away SPARQL complexity while enabling intuitive CRUD operations on RDF graphs?
- RQ2How can a path-based metaphor be used to enable developers to navigate linked data through nested JSON objects without prior knowledge of RDF or SPARQL?
- RQ3To what extent can wildcards, property paths, and RQL extensions be integrated into a RESTful interface to maintain expressivity while preserving simplicity?
- RQ4How can SPARQL update operations be mapped to standard HTTP methods with consistent, round-trip JSON payloads?
- RQ5Can BNode handling be made seamless in a REST API without exposing their internal representation?
Key findings
- The proposed REST API successfully abstracts SPARQL endpoints into a simple, path-based JSON interface that supports full CRUD operations without requiring users to learn SPARQL or RDF syntax.
- The use of wildcards and property paths in the URI path enables dynamic, nested views of the graph, with each * introducing a new level of nesting in the JSON response.
- The system supports transparent round-trip operations: POST creates new resources with random IDs, PUT updates existing ones, and DELETE removes resources, properties, or triples based on path depth.
- The integration of SPARQL property paths (e.g., /:x/(foaf:name|rdfs:label)/) into the path metaphor allows complex graph traversals while collapsing the path expression in the result for clarity.
- The inclusion of RQL extensions such as sort, limit, and aggregations like count and avg enables powerful filtering and transformation directly in the API path.
- The live demo at http://purl.com/sparql-rest-api demonstrates the full stack, including generated SPARQL queries, source code, and comprehensive API documentation.
Better researchstarts right now
From reading papers to final review, dramatically reduce your research time.
No credit card · Free plan available
This review was created by AI and reviewed by human editors.