openapi: 3.1.0
info:
title: SPARQL 1.1 Protocol Query Sparql Update API
description: 'SPARQL 1.1 Protocol is a W3C Recommendation that defines how to convey
SPARQL queries and updates between clients and SPARQL processors over
HTTP. It defines two operations — `query` and `update` — each of which
can be invoked over HTTP with several encodings of the SPARQL string.
This OpenAPI description models only the protocol operations explicitly
defined in https://www.w3.org/TR/sparql11-protocol/. It does not model
any vendor-specific authentication scheme; the spec leaves authentication
to implementations ("implementations may choose to use HTTP authentication
mechanisms or other implementation-defined mechanisms"). The example
server is the public DBpedia SPARQL endpoint which accepts query
requests without authentication.
The Graph Store HTTP Protocol (a sibling specification at
https://www.w3.org/TR/sparql11-http-rdf-update/) is not modeled here.
'
version: '1.1'
contact:
name: W3C SPARQL Working Group
url: https://www.w3.org/TR/sparql11-protocol/
license:
name: W3C Document License
url: https://www.w3.org/Consortium/Legal/2015/doc-license
servers:
- url: https://dbpedia.org
description: Public DBpedia SPARQL endpoint (no auth)
- url: https://{host}
description: Generic SPARQL 1.1 endpoint
variables:
host:
default: example.org
description: Hostname of a SPARQL 1.1 endpoint
tags:
- name: Sparql Update
paths:
/sparql-update:
post:
operationId: sparqlUpdate
summary: Execute SPARQL Update
description: Executes a SPARQL 1.1 Update operation against the RDF dataset. Supports INSERT DATA, DELETE DATA, INSERT/DELETE (with WHERE), LOAD, CLEAR, CREATE, DROP, COPY, MOVE, and ADD operations.
parameters:
- name: using-graph-uri
in: query
description: Default graph URI for the update operation. Multiple values allowed to specify the dataset for the WHERE clause.
schema:
type: string
style: form
explode: true
- name: using-named-graph-uri
in: query
description: Named graph URI for the update operation. Multiple values allowed to specify named graphs for the WHERE clause.
schema:
type: string
style: form
explode: true
requestBody:
required: true
content:
application/x-www-form-urlencoded:
schema:
type: object
required:
- update
properties:
update:
type: string
description: The SPARQL Update string
using-graph-uri:
type: string
description: Default graph URI for the update
using-named-graph-uri:
type: string
description: Named graph URI for the update
application/sparql-update:
schema:
type: string
description: The SPARQL Update string sent directly as the request body with Content-Type application/sparql-update.
responses:
'200':
description: Update executed successfully
'204':
description: Update executed successfully (no content)
'400':
$ref: '#/components/responses/MalformedQuery'
'500':
$ref: '#/components/responses/QueryExecutionFailure'
tags:
- Sparql Update
components:
responses:
MalformedQuery:
description: The SPARQL query or update string is syntactically invalid or malformed.
content:
text/plain:
schema:
type: string
description: Error message describing the syntax issue
QueryExecutionFailure:
description: The server encountered an error while executing the query or update operation.
content:
text/plain:
schema:
type: string
description: Error message describing the execution failure