Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Request URI: /fcr:sparql

Methods: GET, POST

 

Status
titlePOSTGET
HTML form for submitting SPARQL queries

Request Headers:

Status
subtletrue
titleAccept
text/html

 

...

 

Status
titlePOST
sparql query to execute

Request Headers:

Status
subtletrue
titleAccept
text/tab-separated-values, text/csv, text/sse, text/plain, application/sparql-results+json, application/sparql-results+xml, application/sparql-results+bio, text/turtle, text/rdf+n3, application/n-triples, application/rdf+xml 

Example:

Code Block
curl -X POST -H "Accept:text/csv" -H "Content-Type:application/sparql-query" -d "@sparql-query.txt" http://localhost:8080/rest/fcr:sparql

sparql-query.txt

SELECT ?x ?uuid
WHERE { ?x <http://fedora.info/definitions/v4/repository#uuid> ?uuid }

 

Response: 

Code Block
languagetext
POST /rest/fcr:sparql HTTP/1.1
> Accept: */*
> Content-Type:application/sparql-query
> Content-Length: 85
> 
* upload completely sent off: 85 out of 85 bytes
< HTTP/1.1 200 OK
< Status: 200

Headers:
Content-Type: text/tab-separated-values

Body:
?x
<http://localhost:8080/rest/07/e4/22/ef/07e422ef-8561-4300-91a4-fff4086c8be0>
<http://localhost:8080/rest/f3/e2/41/f8/f3e241f8-b0b0-4274-95e7-4d58a7af9dca>

...