Versions Compared

Key

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

...

Status
subtletrue
titleAccept
text/html

 

...

 

Status
colourBlue
titlePOST
sparql query to execute execute a query using a subset of SPARQL

 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 (1):

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
Body:
SELECT ?x ?uuid
WHERE { ?x <http://fedora.info/definitions/v4/repository#uuid> ?uuid }

 

Response (1):

Code Block
languagetext
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>

 

Status:

Status
subtletrue
colourGreen
title200
 OK

Status
subtletrue
colourRed
title415
Unsupported Media Type

 

 

...

colourBluetitlePOST execute a query using a subset of SPARQL

Example (2):

Code Block
curl -H "Content-Type: application/sparql-query" -d @sparqlQuery.txt -H "Accept: " "http://localhost:8080/rest/fcr:sparql"
 
Body:
SELECT ?subject FROM <> WHERE { ?subject dc:title ?title }

Response (2):

Code Block
Status: 200
 
Headers:
Content-Type: text/turtle
 
Body:

...