CSS Stylesheet |
---|
h3 { background-color: #eee; padding: 0.6em; }
#content .code { margin-left: 2.5em!important; background-color: #fafafa!important; }
.pdl .syntaxhighlighter table td.code .container, .syntaxhighlighter .line.alt2, .syntaxhighlighter .line.alt1 { background-color: #fafafa!important; } |
Table of Contents
Expand | |
---|---|
|
Overview
Introduction
Excerpt |
---|
The Fedora 4 HTTP API is generally a RESTful API. HTTP methods like GET, PUT, POST and DELETE are implemented on most resource paths. The API also relies heavily on content negotiation to deliver context-appropriate responses, and a HATEOAS-driven text/html response (providing a decent GUI experience on top of the repository). |
The Fedora 4 RDF-based responses may be serialized as:
- application/ld+json
- application/n-triples
- application/rdf+xml
- text/n3 (or text/rdf+n3)
- text/plain
- text/turtle (or application/x-turtle)
The text/html response also includes embedded RDFa markup.
Fedora 4 implements the Linked Data Platform 1.0 Architecture, which:
[...] describes the use of HTTP for accessing, updating, creating and deleting resources from servers that expose their resources as Linked Data. It provides clarifications and extensions of the rules of Linked Data [LINKED-DATA]:
- Use URIs as names for things
- Use HTTP URIs so that people can look up those names
- When someone looks up a URI, provide useful information, using the standards (RDF*, SPARQL)
- Include links to other URIs, so that they can discover more things
Endpoints
Resources
Repository objects can be loosely divided into two classes of resources:
- Containers ("fedora:Container"), containing RDF properties and 0 or more child resources
- Binaries, containing any binary payload (roughly corresponding to Fedora 3 datastreams)
Containers
Excerpt Include | ||||||
---|---|---|---|---|---|---|
|
Export and Import
Excerpt Include | ||||||
---|---|---|---|---|---|---|
|
Versioning
Excerpt Include | ||||||
---|---|---|---|---|---|---|
|
Services
Access Roles
Excerpt Include | ||||||
---|---|---|---|---|---|---|
|
Backup and Restore
Excerpt Include | ||||||
---|---|---|---|---|---|---|
|
Fixity
Excerpt Include | ||||||
---|---|---|---|---|---|---|
|
Node Types
Excerpt Include | ||||||
---|---|---|---|---|---|---|
|
Transactions
Excerpt Include | ||||||
---|---|---|---|---|---|---|
|
Transform
Excerpt Include | ||||||
---|---|---|---|---|---|---|
|
/rest/fcr:sitemap
/rest/fcr:search
/rest/fcr:namespaces
/rest/fcr:nextPID
- POST mints an ID
/rest/{path}
- GET lists children, with optional filter by mixin
- POST create a new node of QueryParam "mixin" at {path}
- PUT mutate the object at {path}
- DELETE remove the object at {path}
/rest/{path}/fcr:new
- POST create a new child of QueryParam "mixin" under {path}
/rest/{path}/fcr:new/fcr:content
- POST create a new nt:file under {path} with a binary value of the request entity
/rest/{path}/fcr:describe
- GET profile or description [repo describe at root, profiles by type]
- POST unsupported?
- PUT unsupported?
- DELETE unsupported?
/rest/{path}/fcr:content
- GET the bytes from {path}/jcr:content/jcr:data
- POST create a new nt:file at {path} with a binary value of the request entity
- PUT mutate the binary value of the nt:file at {path}
- DELETE remove the jcr:content child from the node at {path}
/rest/{path}/fcr:datastreams is batch DS operations
- GET
- POST
- DELETE
/rest/{path}/fcr:fixity
- GET get the fixity report for the nt:file at {path}
/rest/{path}/fcr:versions
- GET the version history of the nt:file or the nt:folder (as appropriate) at {path}