Request URI: /fcr:transform/{program} Methods: GET, POST get a resource transformed with the default transformRequest 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" |
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: Status |
---|
subtle | true |
---|
colour | Green |
---|
title | 200 |
---|
| OK: if the transform is applied successfully Status |
---|
subtle | true |
---|
colour | Red |
---|
title | 400 |
---|
| Bad Request: if the program doesn't exist Status |
---|
| |
---|
subtle | true |
---|
colour | Red |
---|
title | 404 |
---|
| Not Found: if the resource doesn't exist To reference a stored "program" in the GET form of the fcr:transform service, the LDPath transformation directive must be stored at the following path: Code Block |
---|
http://localhost:8080/rest/fedora:system/fedora:transform/fedora:ldpath/<program-name>/<resource-type> |
Where <program-name> can be any name, and <resource-type> is the type of Fedora resource on which the transform will be applied: - "fedora:Container"
- "fedora:nonRdfSourceDescription"
- "fedora:Resource"
get a resource transformed with the supplied 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: Code Block |
---|
curl -X POST -H "Content-Type: application/rdf+ldpath" --data-binary "@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 |
---|
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: Status |
---|
subtle | true |
---|
colour | Green |
---|
title | 200 |
---|
| OK: if the transform is applied successfully Status |
---|
subtle | true |
---|
colour | Red |
---|
title | 400 |
---|
| Bad Request: if there was an error parsing or processing the transform Status |
---|
| |
---|
subtle | true |
---|
colour | Red |
---|
title | 404 |
---|
| Not Found: if the resources doesn't exist |