Apache Jena Fuseki SPARQL API
Jena Fuseki provides a SPARQL server with REST API endpoints for SPARQL 1.1 Query, SPARQL 1.1 Update, and the SPARQL Graph Store HTTP Protocol. It supports dataset management, authentication, and monitoring.
Jena Fuseki provides a SPARQL server with REST API endpoints for SPARQL 1.1 Query, SPARQL 1.1 Update, and the SPARQL Graph Store HTTP Protocol. It supports dataset management, authentication, and monitoring.
openapi: 3.0.3
info:
title: Apache Jena Fuseki SPARQL API
description: REST API for Apache Jena Fuseki SPARQL server providing SPARQL Query, SPARQL Update, and Graph Store Protocol (GSP) operations for managing RDF datasets.
version: 5.0.0
license:
name: Apache 2.0
url: https://www.apache.org/licenses/LICENSE-2.0
contact:
email: users@jena.apache.org
servers:
- url: http://localhost:3030
description: Apache Jena Fuseki server
tags:
- name: SPARQL Query
description: SPARQL 1.1 Query operations
- name: SPARQL Update
description: SPARQL 1.1 Update operations
- name: Graph Store Protocol
description: SPARQL Graph Store HTTP Protocol operations
- name: Dataset Management
description: Dataset administration
paths:
/{dataset}/sparql:
get:
operationId: sparqlQueryGet
summary: Apache jena Apache Jena Fuseki SPARQL Query via GET
description: Execute a SPARQL SELECT, CONSTRUCT, ASK, or DESCRIBE query using HTTP GET.
tags: [SPARQL Query]
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
parameters:
- name: dataset
in: path
required: true
schema:
type: string
example: ds
description: Dataset name
- name: query
in: query
required: true
schema:
type: string
example: SELECT * WHERE { ?s ?p ?o } LIMIT 10
description: SPARQL query string
- name: default-graph-uri
in: query
schema:
type: string
description: Default graph URI
example: https://example.com
- name: named-graph-uri
in: query
schema:
type: string
description: Named graph URI
example: example-name
responses:
'200':
description: SPARQL query results
content:
application/sparql-results+json:
schema:
$ref: '#/components/schemas/SparqlResults'
application/sparql-results+xml:
schema:
type: string
text/turtle:
schema:
type: string
'400':
description: Invalid SPARQL query
post:
operationId: sparqlQueryPost
summary: Apache jena Apache Jena Fuseki SPARQL Query via POST
description: Execute a SPARQL query using HTTP POST for longer queries.
tags: [SPARQL Query]
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
parameters:
- name: dataset
in: path
required: true
schema:
type: string
example: ds
requestBody:
required: true
content:
application/sparql-query:
schema:
type: string
example: SELECT * WHERE { ?s ?p ?o } LIMIT 10
responses:
'200':
description: SPARQL query results
content:
application/sparql-results+json:
schema:
$ref: '#/components/schemas/SparqlResults'
/{dataset}/update:
post:
operationId: sparqlUpdate
summary: Apache jena Apache Jena Fuseki SPARQL Update
description: Execute a SPARQL 1.1 Update operation to modify RDF data.
tags: [SPARQL Update]
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
parameters:
- name: dataset
in: path
required: true
schema:
type: string
example: ds
requestBody:
required: true
content:
application/sparql-update:
schema:
type: string
example: "INSERT DATA { <http://example.org/s> <http://example.org/p> <http://example.org/o> }"
responses:
'200':
description: Update executed successfully
'400':
description: Invalid SPARQL update
/{dataset}/data:
get:
operationId: getGraph
summary: Apache jena Apache Jena Fuseki Get Graph
description: Retrieve an RDF graph from the dataset using the Graph Store Protocol.
tags: [Graph Store Protocol]
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
parameters:
- name: dataset
in: path
required: true
schema:
type: string
example: ds
- name: graph
in: query
schema:
type: string
example: http://example.org/graph
description: Named graph URI (omit for default graph)
responses:
'200':
description: RDF graph content
content:
text/turtle:
schema:
type: string
application/ld+json:
schema:
type: string
application/rdf+xml:
schema:
type: string
'404':
description: Graph not found
put:
operationId: replaceGraph
summary: Apache jena Apache Jena Fuseki Replace Graph
description: Replace an RDF graph in the dataset.
tags: [Graph Store Protocol]
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
parameters:
- name: dataset
in: path
required: true
schema:
type: string
example: ds
- name: graph
in: query
schema:
type: string
example: http://example.org/graph
requestBody:
required: true
content:
text/turtle:
schema:
type: string
responses:
'200':
description: Graph replaced
'201':
description: Graph created
post:
operationId: addToGraph
summary: Apache jena Apache Jena Fuseki Add to Graph
description: Add RDF triples to an existing graph.
tags: [Graph Store Protocol]
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
parameters:
- name: dataset
in: path
required: true
schema:
type: string
example: ds
- name: graph
in: query
schema:
type: string
example: example-value
requestBody:
required: true
content:
text/turtle:
schema:
type: string
responses:
'200':
description: Triples added
delete:
operationId: deleteGraph
summary: Apache jena Apache Jena Fuseki Delete Graph
description: Delete a named graph from the dataset.
tags: [Graph Store Protocol]
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
parameters:
- name: dataset
in: path
required: true
schema:
type: string
example: ds
- name: graph
in: query
schema:
type: string
example: http://example.org/graph
responses:
'200':
description: Graph deleted
/$/datasets:
get:
operationId: listDatasets
summary: Apache jena Apache Jena Fuseki List Datasets
description: List all datasets on the Fuseki server.
tags: [Dataset Management]
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
responses:
'200':
description: List of datasets
content:
application/json:
schema:
$ref: '#/components/schemas/DatasetList'
examples:
listDatasets200Example:
summary: Default listDatasets 200 response
x-microcks-default: true
value:
datasets: []
post:
operationId: createDataset
summary: Apache jena Apache Jena Fuseki Create Dataset
description: Create a new RDF dataset on the Fuseki server.
tags: [Dataset Management]
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/DatasetRequest'
examples:
createDatasetRequestExample:
summary: Default createDataset request
x-microcks-default: true
value:
dbName: ds
dbType: tdb2
responses:
'200':
description: Dataset created
/$/datasets/{dataset}:
get:
operationId: getDataset
summary: Apache jena Apache Jena Fuseki Get Dataset
description: Get information about a specific dataset.
tags: [Dataset Management]
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
parameters:
- name: dataset
in: path
required: true
schema:
type: string
example: ds
responses:
'200':
description: Dataset information
content:
application/json:
schema:
$ref: '#/components/schemas/Dataset'
examples:
getDataset200Example:
summary: Default getDataset 200 response
x-microcks-default: true
value:
ds.name: /ds
ds.state: true
ds.services: []
delete:
operationId: deleteDataset
summary: Apache jena Apache Jena Fuseki Delete Dataset
description: Delete a dataset from the Fuseki server.
tags: [Dataset Management]
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
parameters:
- name: dataset
in: path
required: true
schema:
type: string
example: ds
responses:
'200':
description: Dataset deleted
components:
schemas:
SparqlResults:
type: object
description: SPARQL query results in JSON format
properties:
head:
type: object
description: Result metadata including variable names
properties:
vars:
type: array
items:
type: string
example: ["s", "p", "o"]
results:
type: object
description: Query result bindings
properties:
bindings:
type: array
items:
$ref: '#/components/schemas/Binding'
boolean:
type: boolean
description: Result for ASK queries
Binding:
type: object
description: A single result binding
properties:
s:
$ref: '#/components/schemas/RDFTerm'
p:
$ref: '#/components/schemas/RDFTerm'
o:
$ref: '#/components/schemas/RDFTerm'
RDFTerm:
type: object
description: An RDF term (URI, literal, or blank node)
properties:
type:
type: string
enum: [uri, literal, bnode]
example: uri
value:
type: string
example: http://example.org/subject
datatype:
type: string
description: Datatype URI for typed literals
xml:lang:
type: string
description: Language tag for language-tagged literals
DatasetList:
type: object
description: List of Fuseki datasets
properties:
datasets:
type: array
items:
$ref: '#/components/schemas/Dataset'
Dataset:
type: object
description: A Fuseki dataset
properties:
ds.name:
type: string
description: Dataset name
example: /ds
ds.state:
type: boolean
description: Whether the dataset is active
example: true
ds.services:
type: array
description: Available services for this dataset
items:
type: object
DatasetRequest:
type: object
description: Request to create a dataset
required: [dbName, dbType]
properties:
dbName:
type: string
description: Dataset name
example: ds
dbType:
type: string
description: Dataset type
enum: [tdb, tdb2, mem]
example: tdb2