Skip to content

Commit

Permalink
added the FDP sparql endpopint
Browse files Browse the repository at this point in the history
  • Loading branch information
markwilkinson committed Dec 27, 2023
1 parent 78de3b9 commit 64b5250
Show file tree
Hide file tree
Showing 2 changed files with 150 additions and 0 deletions.
149 changes: 149 additions & 0 deletions VP/interfaces/fdp-sparql.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,149 @@
openapi: "3.0.1"
info:
title: SPARQL OpenAPI
version: "10"
description: |
This is a heavily trimmed copy of the RDF4J REST API that includes only the SPARQL endpoint GET and POST definitions
externalDocs:
url: https://rdf4j.org/documentation/reference/rest-api/

servers:
- url: https://bgv.cbgp.upm.es
description: SPARQL server for BGV Location information

tags:
- name: SPARQL
description: SPARQL Query execution

components:
requestBodies:
RdfData:
description: RDF data payload
content:
application/rdf+xml:
schema:
type: object
xml:
name: RDF
namespace: http://www.w3.org/1999/02/22-rdf-syntax-ns#
text/plain:
schema:
type: string
text/turtle:
schema:
type: string
text/rdf+n3:
schema:
type: string
text/x-nquads:
schema:
type: string
application/ld+json:
schema:
type: object
format: json
application/rdf+json:
schema:
type: object
format: json
application/trix:
schema:
type: object
xml:
name: TriX
application/x-trig:
schema:
type: string
application/x-binary-rdf:
schema:
type: string
format: binary
responses:
200SparqlResult:
description: SPARQL query result
content:
application/sparql-results+json:
examples:
SelectQueryResult:
$ref: "#/components/examples/SparqlJsonBindings"
AskQueryResult:
$ref: "#/components/examples/SparqlJsonBoolean"
examples:
SparqlJsonBindings:
value:
head:
vars: [ "s", "p", "o" ]
results:
bindings:
- s:
type: "uri"
value: "http://example.org/s1"
- p:
type: "uri"
value: "http://example.org/p1"
- o:
type: "literal"
value: "foo"
paths:
/repositories/bgv-fdp:
get:
tags:
- SPARQL
summary: Execute SPARQL query
description: |
Execute a SPARQL query on the repository. The result format is based on the type of result (boolean, variable bindings, or RDF data) and the negotiated acceptable content-type. Note that RDF4J supports executing SPARQL queries with either a GET or a POST request. POST is supported for queries that are too large to be encoded as a query parameter.
parameters:
- name: repositoryID
in: path
description: The repository ID
required: true
schema:
type: string
- name: query
in: query
description: The query to evaluate
required: true
schema:
type: string
example: select * where {?s ?p ?o} limit 10
- name: $<varname>
in: query
required: false
description: Specifies variable bindings. Variables appearing in the query can be bound to a specific value outside the actual query using this option. The value should be an N-Triples encoded RDF value.
schema:
type: string
responses:
'200':
$ref: "#/components/responses/200SparqlResult"
post:
tags:
- SPARQL
summary: Execute SPARQL query
description: |
Execute a SPARQL query on the repository. The result format is based on the type of result (boolean, variable bindings, or RDF data) and the negotiated acceptable content-type. Note that RDF4J supports executing SPARQL queries with either a GET or a POST request. POST is supported for queries that are too large to be encoded as a query parameter.
parameters:
- name: repositoryID
in: path
description: The repository ID
required: true
schema:
type: string
requestBody:
description: the SPARQL query to execute
required: true
content:
application/sparql-query:
schema:
type: string
example:
"SELECT * WHERE {?S ?P ?O } LIMIT 10"
application/x-www-form-urlencoded:
schema:
type: string
example:
query=SELECT%20%2A%20WHERE%20%7B%3FS%20%3FP%20%3FO%20%7D%20LIMIT%2010
responses:
'200':
$ref: "#/components/responses/200SparqlResult"

1 change: 1 addition & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ <h3>General Documentation</h3>
<h3>OpenAPI YAML Interfaces for BGV services</h3>
<a href="./VP/interfaces/administrative-sparql.yaml">Administrative SPARQL endpoint descriptor</a>
<a href="./VP/interfaces/location-sparql.yaml">Location SPARQL endpoint descriptor</a>
<a href="./VP/interfaces/fdp-sparql.yaml">Location SPARQL endpoint descriptor</a>

0 comments on commit 64b5250

Please sign in to comment.