openapi: 3.2.0 info: title: SPARQL Protocol Sparql Graph API description: OpenAPI specification for the SPARQL 1.1 Protocol, a W3C Recommendation that defines HTTP operations for executing SPARQL queries and updates against an RDF dataset. The protocol supports both query operations (SELECT, ASK, CONSTRUCT, DESCRIBE) and update operations (INSERT, DELETE, LOAD, CLEAR) via standard HTTP methods. version: '1.1' contact: name: W3C SPARQL Working Group url: https://www.w3.org/2009/sparql/wiki/Main_Page license: name: W3C Software and Document License url: https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document servers: - url: '{sparqlEndpoint}' description: SPARQL Protocol Endpoint variables: sparqlEndpoint: default: https://dbpedia.org/sparql description: The URL of the SPARQL endpoint tags: - name: Sparql Graph paths: /sparql-graph: get: operationId: graphStoreGet summary: SPARQL Retrieve Graph (Graph Store Protocol) description: Retrieves an RDF graph from the SPARQL Graph Store using HTTP GET. Part of the SPARQL 1.1 Graph Store HTTP Protocol for managing named graphs and the default graph. parameters: - name: graph in: query description: URI of the named graph to retrieve. If omitted, the default graph is returned. schema: type: string format: uri - name: default in: query description: Set to empty string to request the default graph schema: type: string - name: Accept in: header schema: type: string enum: - text/turtle - application/rdf+xml - application/ld+json - application/n-triples - application/n-quads default: text/turtle responses: '200': description: Graph returned successfully content: text/turtle: schema: type: string application/rdf+xml: schema: type: string application/ld+json: schema: type: object '404': description: Named graph not found tags: - Sparql Graph put: operationId: graphStorePut summary: SPARQL Replace Graph (Graph Store Protocol) description: Replaces the contents of a graph with the provided RDF data. Creates the graph if it does not exist. parameters: - name: graph in: query description: URI of the named graph to replace schema: type: string format: uri - name: default in: query description: Set to empty string to target the default graph schema: type: string requestBody: required: true content: text/turtle: schema: type: string application/rdf+xml: schema: type: string application/ld+json: schema: type: object responses: '200': description: Graph replaced successfully '201': description: Graph created successfully '204': description: Graph replaced successfully (no content) '400': description: Malformed RDF payload tags: - Sparql Graph post: operationId: graphStorePost summary: SPARQL Merge into Graph (Graph Store Protocol) description: Merges the provided RDF data into the specified graph, adding triples without removing existing ones. parameters: - name: graph in: query description: URI of the named graph to merge into schema: type: string format: uri - name: default in: query description: Set to empty string to target the default graph schema: type: string requestBody: required: true content: text/turtle: schema: type: string application/rdf+xml: schema: type: string application/ld+json: schema: type: object responses: '200': description: Triples merged successfully '204': description: Triples merged successfully (no content) '400': description: Malformed RDF payload tags: - Sparql Graph delete: operationId: graphStoreDelete summary: SPARQL Delete Graph (Graph Store Protocol) description: Deletes a named graph or clears the default graph. parameters: - name: graph in: query description: URI of the named graph to delete schema: type: string format: uri - name: default in: query description: Set to empty string to clear the default graph schema: type: string responses: '200': description: Graph deleted successfully '204': description: Graph deleted successfully (no content) '404': description: Named graph not found tags: - Sparql Graph externalDocs: description: SPARQL 1.1 Protocol - W3C Recommendation url: https://www.w3.org/TR/sparql11-protocol/