...
POST /objects/{pid} - ingest or create new object
Wiki Markup |
---|
POST /objects/ \[\{pid\}\| new\] ? \[label\] \[format\] \[encoding\] \[namespace\] \[ownerId\]\[logMessage\] \[ignoreMime\] |
Return code | Meaning |
---|---|
201 | OK, purging the object, no return body |
404 | Object not found in repository. Body is exception as text/plain |
401 | Unauthorized, the security policy forbade this operation with the supplied user credentials. Body as exception as text/plain |
400 | Wrong syntax in request. Exception as body, text/plain |
500 | Other, unknown error encountered |
Parameter | Format | Meaning | Default | Example |
---|
logMessage | String | The message to store in the log | Empty string | "Log message about the ingest" |
{pid} | pid format | persistent identifier of the object to be created |
new | indicator that either a new PID should be created for this object or that the PID to be used is encoded in the XML included as the body of the request
| | |
label | String | the label of the new object | Empty string |
|
format | one of info:fedora/fedora-system:FOXML-1.1, info:fedora/fedora-system:FOXML-1.0, info:fedora/fedora-system:METSFedoraExt-1.1, info:fedora/fedora-system:METSFedoraExt-1.0, info:fedora/fedora-system:ATOM-1.1 or info:fedora/fedora-system:ATOMZip-1.1 | the XML format of the object to be ingested | info:fedora/fedora-system:FOXML-1.1 |
|
encoding | The encoding names known by the JVM | the encoding of the XML to be ingested | UTF-8 |
|
namespace | the namespace to be used to create a PID for a new empty object; if object XML is included with the request, the namespace parameter is ignored | the default namespace of the repository |
|
ownerId | the id of the user to be listed at the object owner |
|
|
logMessage | a message describing the activity being performed |
|
|
ignoreMime | indicates that the request should not be checked to ensure that the content is XML prior to attempting an ingest. This is provided to allow for client applications which do not indicate the correct Content-Type when submitting a request. | false | true, false |
XML file as request content | file to be ingested as a new object |
|
|
Examples
POST: /objects/new
POST: /objects/new?namespace=demo
POST: /objects/test:100?label=Test
PUT /objects/{pid} - modify object
...