...
Request URI: /fcr:sparql
Methods: GET
Warning |
---|
SPARQL query functionality is experimental and is not yet in any fcrepo4 release. |
HTML form for submitting SPARQL queries
...
text/html
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
Status |
---|
colour | Blue |
---|
title | POST |
execute a query using a subset of SPARQLExample: Code Block |
---|
curl -X POST -H "Accept:text/csv" -H "Content-Type: application/sparql-query" -d @sparqlQuery"@sparql-query.txt -H "Accept: " "http://localhost:8080/rest/fcr:sparql"
Body:
sparql-query.txt
SELECT ?subject FROM <> x ?uuid
WHERE { ?subjectx dc:title<http://fedora.info/definitions/v4/repository#uuid> ?titleuuid }
|
Response:
Code Block |
---|
Status: 200
Headers:
Content-Type: text/turtle
Body:
|
Status:
|
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
< Content-Type: text/tab-separated-values
?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 |
---|
Status |
---|
subtle | true |
---|
colour | Green |
---|
title | 200 |
---|
|
OK
Status |
---|
subtle | true |
---|
colour | Red |
---|
title | 400 |
---|
|
Bad RequestTransform
Request URI: /fcr:transform/{program}
Methods: GET, POST
get a resource transformed with the default transform Unsupported Media Type
...
execute a query using a subset of SPARQLRequest Headers:
Example:
Code Block |
---|
|
@prefix fcrepo : <http://fedora.info/definitions/v4/repository#>
id = . :: xsd:string ;
title = dc:title :: xsd:string;
uuid = fcrepo:uuid :: xsd:string ; |
Code Block |
---|
curl http://localhost:8080/rest/49/3d/24/41/493d2441-0541-41c7-a23b-09d1f17d4a0f/fcr:transform/default |
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:
Code Block |
---|
Status: 200 OK
Headers:
Content-Type: applicationtext/json
Transfer-Encoding: chunked
Server: Jetty(8.1.11.v20130520)
Body:
[{"id":["http://localhost:8080/rest/49/3d/24/41/493d2441-0541-41c7-a23b-09d1f17d4a0f"],"title":[],"uuid":["07630a24-5a0b-4ba7-80ab-0691f68667ce"]}]turtle
Body:
|
Status:
Status |
---|
subtle | true |
---|
colour | Green |
---|
title | 200 |
---|
|
OK
Status |
---|
subtle | true |
---|
colour | Red |
---|
title | 400 |
---|
|
Bad Request
Transform
Request URI: /fcr:transform/{program}
Methods: GET, POST
colour | Blue |
POST get a resource transformed with the
supplied default transform
Output formats: application/json,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:
Request Headers:
Example:
Code Block |
---|
|
Code Block |
---|
curl -X POST -H "Content-Type: application/rdf+ldpath" -d "@post.txt" "http://localhost:8080/rest/49/3d/24/41/493d2441-0541-41c7-a23b-09d1f17d4a0f/fcr:transform"
Body:
@prefix fcrepo : <http://fedora.info/definitions/v4/repository#>
id = . :: xsd:string ;
title = dc:title :: xsd:string;
uuid = fcrepo:uuid :: xsd:string ; |
Response:
Code Block |
---|
curl http://localhost:8080/rest/49/3d/24/41/493d2441-0541-41c7-a23b-09d1f17d4a0f/fcr:transform/default |
Response:
Code Block |
---|
Status: 200 OK
Headers:
Content-Type: application/json
Transfer-Encoding: chunked
Server: Jetty(8.1.11.v20130520)
Body:
[{"id":["http://localhost:8080/rest/49/3d/24/41/493d2441-0541-41c7-a23b-09d1f17d4a0f"],"title":[],"uuid":["07630a24-5a0b-4ba7-80ab-0691f68667ce"]}]
|
...
Status |
---|
subtle | true |
---|
colour | Red |
---|
title | 400 |
---|
|
Bad Request
...
...
Request URI: /path/to/some/resource/fcr:accessroles
Methods: GET, POST, DELETE
Warning |
---|
Arbitrary access roles may be set through this API. However, they are only enforced when paired with a Policy Enforcement Point that is aware of access roles. |
get a resource transformed with the supplied transform Get a list of all the roles assigned to principals on this resource
Output formats: application/json
Query Parameters:
When supplied, gets the list of effective roles for this resource, including those inherited from the parent,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_xmlExample:
Code Block |
---|
curl -X POST -H "Content-Type: application/rdf+ldpath" -d "@post.txt" "http://localhost:8080/rest/49/3d/24/41/493d2441-0541-41c7-a23b-09d1f17d4a0f/fcr:accessrolestransform"
|
Response:
Body:
@prefix fcrepo : <http://fedora.info/definitions/v4/repository#>
id = . :: xsd:string ;
title = dc:title :: xsd:string;
uuid = fcrepo:uuid :: xsd:string ; |
Response:
Code Block |
---|
Status: 200 OK
Headers:
Content-Type: application/json
|
Code Block |
---|
Status: 200 OK
Headers:
Content-Type: application/json
Transfer-Encoding: chunked
Server: Jetty(8.1.11.v20130520)
Body:
[{"principal name 3id":["adminhttp://localhost:8080/rest/49/3d/24/41/493d2441-0541-41c7-a23b-09d1f17d4a0f"],"principal name 1title":["reader"],"principal name 2uuid":["writer07630a24-5a0b-4ba7-80ab-0691f68667ce"]}]
|
Status:
Status |
---|
subtle | true |
---|
colour | Green |
---|
title | 200 |
---|
|
OK
Status |
---|
subtle | true |
---|
colour | GreenRed |
---|
title | 204 |
---|
|
No Content
Bad RequestAccess Roles
Request URI: /path/to/some/resource/fcr:accessroles
Methods: GET, POST, DELETE
Warning |
---|
Arbitrary access roles may be set through this API. However, they are only enforced when paired with a Policy Enforcement Point that is aware of access roles. |
Get a list of all the roles assigned to principals on this resource
Output formats: application/json
Query Parameters Status |
---|
colour | Blue |
---|
title | POST |
Set the roles assigned on this resourceRequest Headers: Status |
---|
subtle | true |
---|
title | Content-Type |
---|
|
application/json When supplied, gets the list of effective roles for this resource, including those inherited from the parentExample:
Code Block |
---|
curl -X POST -H "Content-Type: application/json" -d "@post.txt" "http://"http://localhost:8080/rest/49/3d/24/41/493d2441-0541-41c7-a23b-09d1f17d4a0f/fcr:accessroles"
Body:
{
|
Response:
Code Block |
---|
Status: 200 OK
Headers:
Content-Type: application/json
Transfer-Encoding: chunked
Server: Jetty(8.1.11.v20130520)
Body:
{"principal name 13" : [ "readeradmin" ],
"principal name 21" : [ "writerreader" ],
"principal name 32" : [ "adminwriter" ]}
} |
Response:
Code Block |
---|
Status: 201 Created
Headers:
Location: http://localhost:8080/rest/49/3d/24/41/493d2441-0541-41c7-a23b-09d1f17d4a0f/fcr:accessroles
Content-Length: 0
Server: Jetty(8.1.11.v20130520)
|
Status:
Status:
Status |
---|
| |
---|
subtle | true |
---|
colour | Green |
---|
title | 200 |
---|
|
OK Status |
---|
Status |
---|
|
subtle | true |
---|
colour | Green |
---|
title | 204201 |
---|
|
No Content Created...
subtle | trueRed400 | Bad RequestSet the roles assigned on this resourceRequest Headers:
colourRedDELETE | application/json Clear all roles assignments from this resourceExample:
Code Block |
---|
curl -X DELETE POST -H "Content-Type: application/json" -d "@post.txt" "http://localhost:8080/rest/49/3d/24/41/493d2441-0541-41c7-a23b-09d1f17d4a0f/fcr:accessroles"
|
Response:
Body:
{
"principal name 1" : [ "reader" ],
"principal name 2" : [ "writer" ],
"principal name 3" : [ "admin" ]
} |
Response:
Code Block |
---|
Status: 204201 No ContentCreated
Headers:
Location: http://localhost:8080/rest/49/3d/24/41/493d2441-0541-41c7-a23b-09d1f17d4a0f/fcr:accessroles
Content-Length: 0
Server: Jetty(8.1.11.v20130520)
|
...
Status |
---|
| |
---|
subtle | true |
---|
colour | Green |
---|
title | 201 |
---|
|
Created Status |
---|
subtle | true |
---|
colour | Red |
---|
title | 204 |
---|
|
No Content Bad Request...
Clear all roles assignments from this resource
Example:
Code Block |
---|
curl -X DELETE "http://localhost:8080/rest/49/3d/24/41/493d2441-0541-41c7-a23b-09d1f17d4a0f/fcr:accessroles"
|
Response:
Code Block |
---|
Status: 204 No Content
Headers:
Server: Jetty(8.1.11.v20130520)
|
Status:
Status |
---|
| |
---|
subtle | true |
---|
colour | Green |
---|
title | 204 |
---|
|
No Content?x
<http://localhost:8080/rest/pid:1/pid:2>
<http://localhost:8080/rest/pid:1>
<http://localhost:8080/rest/TEST>
<http://localhost:8080/rest/TEST/testds>
<http://localhost:8080/rest/test3>
<http://localhost:8080/rest/test3/n1>
<http://localhost:8080/rest/test5/00/f6/00/80/00f60080-e42e-4ccd-b06d-db565b997b3e>
<http://localhost:8080/rest/test5>
<http://localhost:8080/rest/test6/07/e4/22/ef/07e422ef-8561-4300-91a4-fff4086c8be0>
<http://localhost:8080/rest/test6/f3/e2/41/f8/f3e241f8-b0b0-4274-95e7-4d58a7af9dca>
<http://localhost:8080/rest/test6>
<http://localhost:8080/rest/2c/42/54/8a/2c42548a-0d00-4663-b103-21d0077e27b3>
<http://localhost:8080/rest/2c/42/54/8a/2c42548a-0d00-4663-b103-21d0077e27b3/ds1>
<http://localhost:8080/rest/withMixin>