All Versions
Fedora 3.8.0 (Current Release)
Fedora 3.7.x
Fedora 3.6.x
Fedora 3.5.x
More..
...
For examples of how to use the REST API programmatically, please refer to the TestRESTAPI test class (http://fedora-commons.svn.sourceforge.net/viewvc/*checkout*/fedora-commons/fedora/tags/release-3.0/src/test/junit/fedora/test/api/TestRESTAPI.java).
Warning | ||
---|---|---|
| ||
Due to an outstanding bug FCREPO-849, if you use Managed Content for DC, RELS-EXT or RELS-INT then please make sure these datastreams are versionable (the default setting for versionable is "true", so if you haven't specified this datastream property then you are safe). Ensure that you don't inadvertently set this property to "false" for these datastreams when using the API methods. |
...
Panel | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
URL Syntax
HTTP Method GET HTTP Response 200 Parameters
Examples /objects?terms=demo&pid=true&subject=true&label=true&resultFormat=xml /objects?query=title%7Erome%20creator%7Estaples&pid=true&title=true&creator=true /objects?query=pid%7E*1&maxResults=50&format=true&pid=true&title=true |
...
Panel | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||
URL Syntax URL Syntax unmigrated-wiki-markup /objects/\{pid\}/datastreams/\{dsID\}/content ? \ [asOfDateTime\] \ [download\] HTTP Method GET HTTP Response 200 Parameters
Examples /objects/demo:29/datastreams/DC/content /objects/demo:29/datastreams/DC/content?asOfDateTime=2008-01-01 |
...
Panel | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||
URL Syntaxunmigrated-wiki-markup /objects/\{pid\}/methods/\{sdefPid\}/\{method} ? \ [method parameters\] HTTP Method GET HTTP Response 200 Parameters
Examples /objects/demo:29/methods/demo:27/resizeImage?width=100 /objects/demo:SmileyEarring/methods/demo:DualResolution/fullSize |
...
Panel | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||
URL Syntaxunmigrated-wiki-markup /objects/\{pid\}/versions ? \ [format\] HTTP Method GET HTTP Response 200 Parameters
Examples /objects/demo:29/versions /objects/demo:29/versions?format=xml |
...
Panel | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||
URL Syntax
HTTP Method GET HTTP Response 200 Parameters
Examples /objects/demo:29 /objects/demo:29?format=xml /objects/demo:29?asOfDateTime=2008-01-01 |
...
Panel | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||
URL Syntaxunmigrated-wiki-markup /objects/\{pid\}/datastreams ? \ [format\] \ [asOfDateTime\] HTTP Method GET HTTP Response 200 Parameters
Examples /objects/demo:35/datastreams /objects/demo:35/datastreams?format=xml&asOfDateTime=2008-01-01T05:15:00Z |
...
Panel | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||
URL Syntax unmigrated-wiki-markup
HTTP Method GET HTTP Response 200 Parameters
Examples /objects/demo:29/methods /objects/demo:29/methods?format=xml&asOfDateTime=2008-01-01T05:15:00Z /objects/demo:29/methods/demo:27 /objects/demo:29/methods/demo:27?format=xml&asOfDateTime=2008-01-01T05:15:00Z |
...
Panel | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||
URL Syntax
HTTP Method GET HTTP Response 200 Parameters
Examples /objects?terms=*&format=xml&pid=true&subject=true&label=true&sessionToken=xyz\\\\ |
...
Panel | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
URL Syntax
HTTP Method POST HTTP Response 201 Parameters
Examples POST: /objects/demo:29/datastreams/NEWDS?controlGroup=X&dsLabel=New (with Multipart file) POST: /objects/demo:29/datastreams/NEWDS?controlGroup=M&dsLocation=http://example:80/newds&dsLabel=New |
...
Panel | ||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||||
URL Syntaxunmigrated-wiki-markup /objects/\{pid\}/relationships/new ? \ [subject\] \ [predicate\] \ [object\] \ [isLiteral\] \ [datatype\] HTTP Method POST HTTP Response 200 Parameters
Examples POST /objects/demo:29/relationships/new?subject=info%3afedora%2fdemo%3a29%2fDC&predicate=http%3a%2f%2fwww.example.org%2frels%2fname&object=dublin%20core&isLiteral=true |
...
Panel | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||
URL Syntax URL Syntax unmigrated-wiki-markup /objects/\{pid\}/export ? \ [format\] \ [context\] \ [encoding\] HTTP Method GET HTTP Response 200 Parameters
Examples /objects/demo:29/export /objects/demo:29/export?context=migrate |
...
Panel | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||
URL Syntaxunmigrated-wiki-markup /objects/\{pid\}/datastreams/\{dsID\} ? \ [asOfDateTime\] \ [format\] \ [validateChecksum\] HTTP Method GET HTTP Response 200 Parameters
Examples /objects/demo:29/datastreams/DC /objects/demo:29/datastreams/DC?format=xml /objects/demo:29/datastreams/DC?format=xml&validateChecksum=true |
...
Panel | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
URL Syntaxunmigrated-wiki-markup /objects/\{pid\}/datastreams/\{dsid\}/versions ? \ [format\] HTTP Method GET HTTP Response 200 Parameters
Examples GET: /objects/changeme:1/datastreams/DC/versions GET: /objects/changeme:1/datastreams/DC/versions?format=xml |
...
Panel | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||
URL Syntaxunmigrated-wiki-markup /objects/nextPID ? \ [numPIDs\] \ [namespace\] \ [format\] HTTP Method POST HTTP Response 200 Parameters
Examples POST: /objects/nextPID POST: /objects/nextPID?numPIDs=5&namespace=test&format=xml |
...
Panel | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||
URL Syntaxunmigrated-wiki-markup /objects/\{pid\}/relationships ? \ [subject\] \ [predicate\] \ [format\] HTTP Method GET HTTP Response 200 Parameters
Examples /objects/demo:29/relationships /objects/demo:29/relationships?subject=info%3afedora%2fdemo%3a29%2fDC |
...
Panel | ||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||||||||||||||||||||
URL Syntaxunmigrated-wiki-markup /objects/ \ [\{pid\}\| new\] ? \ [label\] \ [format\] \ [encoding\] \ [namespace\] \ [ownerId\] \ [logMessage\] \ [ignoreMime\] HTTP Method POST HTTP Response 201 Request Content text/xml Parameters
Notes Executing this request with no request content will result in the creation of a new, empty object (with either the specified PID or a system-assigned PID). The new object will contain only a minimal DC datastream specifying the dc:identifier of the object. Examples POST: /objects/new POST: /objects POST: /objects/new?namespace=demo POST: /objects/test:100?label=Test |
...
Panel | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
URL Syntaxunmigrated-wiki-markup /objects/\{pid\}/datastreams/\{dsID\} ? \ [dsLocation\] \ [altIDs\] \ [dsLabel\] \ [versionable\] \ [dsState\] \ [formatURI\] \ [checksumType\] \ [checksum\] \ [mimeType\] \ [logMessage\] \ [ignoreContent\] \ [lastModifiedDate\] HTTP Method PUT HTTP Response 200 Parameters
Examples PUT: /objects/demo:35/datastreams/HIGH (with Multipart file) PUT: /objects/demo:35/datastreams/HIGH?dsLocation=http://example:80/highDS?logMessage=Update |
...
Panel | ||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||||
URL Syntaxunmigrated-wiki-markup /objects/\{pid\} ? \ [label\] \ [ownerId\] \ [state\] \ [logMessage\] \ [\lastModifiedDate\] HTTP Method PUT HTTP Response 200 Parameters
Examples PUT: /objects/demo:29?label=Updated PUT: /objects/demo:29?state=D?logMessage=Deleted |
...
Panel | |||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||||||||||
URL Syntax
HTTP Method DELETE HTTP Response 200 with a string array of the date-time stamps of the versions purged Parameters
Examples DELETE: /objects/demo:35/datastreams/HIGH |
...
Panel | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||
URL Syntax
HTTP Method DELETE HTTP Response 204 Parameters
Examples DELETE: /objects/demo:29 |
...
Panel | ||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||||
URL Syntaxunmigrated-wiki-markup /objects/\{pid\}/relationships ? \ [subject\] \ [predicate\] \ [object\] \ [isLiteral\] \ [datatype\] HTTP Method DELETE HTTP Response 200 Return body Text indicating if the relationship was successfully purged: Parameters
Examples DELETE /objects/demo:29/relationships?subject=info%3afedora%2fdemo%3a29%2fDC&predicate=http%3a%2f%2fwww.example.org%2frels%2fname&object=dublin%20core&isLiteral=true |
...
Panel | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||
URL Syntaxunmigrated-wiki-markup /objects/\{pid\}/datastreams/\{dsID\} ? \ [dsState\] HTTP Method PUT HTTP Response 200 Parameters
Examples PUT: /objects/demo:35/datastreams/HIGH?dsState=D |
...
Panel | |||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||||||||||||||||||||||||||
URL Syntaxunmigrated-wiki-markup /objects/\{pid\}/datastreams/\{dsID\} ? \ [versionable\] HTTP Method PUT HTTP Response 200 Parameters
Examples PUT: /objects/demo:35/datastreams/HIGH?versionable=false Validate
URL Syntaxunmigrated-wiki-markup /objects/\{pid\}/validate ? \ [asOfDateTime\] HTTP Method GET HTTP Response 200 (OK) if the validation could be carried out (even if the object is not valid) 404 If some object or datastream could not be carried out 401 If the user credentials was insufficient 400 If the parameters are misformed 409 If one of the relevant objects were locked 500 If something else failed on the server Return Body XML, adhering to this schema
Parameters
Examples GET /objects/validate/demo:29?asOfDateTime=2008-01-01
GET /objects/validate/demo:fail
|
...