Latest 3.x Release

This documentation covers the latest release of the legacy 3.x Fedora. Looking for another version? See all documentation.

Fedora 4 Development

Looking for Fedora's currently active development?

Unable to render {include} The included page could not be found.

Deprecation of "LITE" APIs

As of release 3.4-RC1 of Fedora, the "LITE" APIs are deprecated. You are encouraged to migrate any existing code to use the new REST API. The "LITE" APIs will be removed in a future release of Fedora.

Introduction

The Fedora API-M-Lite interface is implemented as an HTTP service that provides a simple URI-oriented definition for the Management service of a Fedora repository. It is intended to support a REST-like style of access to the Fedora Management web service (in contrast to a traditional SOAP web service definition). This means that we define a simple URL syntax that can be used to issue management service requests. API-M-LITE does not provide service bindings for all of the operations defined in Fedora's full Management service (API-M). Currently, API-M-LITE only provides bindings for the method listed below. Additional methods will be implemented for API-M-Lite in future releases of Fedora.

  • getNextPID - gets a list of the requested next available PIDs.

For more information on the method definitions, refer to the API descriptions located at http://www.fedora.info/definitions/1/0/api/

Client Syntax

getNextPID

Syntax:

http://hostname:port/fedora/management/getNextPID? [numPIDs=NUMPIDS&] [namespace=NAMESPACE&] [xml=BOOLEAN&]

This syntax requests a list of the next available PIDs. The result is returned as a MIME-typed stream. Items enclosed in square brackets are optional.

  • hostname – required hostname of the Fedora server.
  • port – required port number on which the Fedora server is running.
  • fedora – a required parameter specifying the Fedora servlet path.
  • management – a required parameter specifying the Fedora management servlet path.
  • numPIDs – a optional parameter specifying the number of PIDs to generate. If omitted, the value defaults to one.
  • namespace – an optional parameter specifying the namespace to be used in generating the PIDs. If omitted, the value defaults to the value of the pidNamespace parameter in the fedora.fcfg configuration file.
  • xml – an optional parameter indicating the format of the response. A value of "false" indicates the response format is HTML. A value of "true" indicates the response format is XML. If omitted, the value defaults to a value of "false".

Examples:

Generate a single PID using the default namespace configured in the fedora.fcfg file and return the results as HTML:

http://localhost:8080/fedora/management/getNextPID?

Generate five PIDs using the default namespace configured in the fedora.fcfg file and return the results as HTML:

http://localhost:8080/fedora/management/getNextPID?numPIDs=5

Generate 5 PIDs using a namespace value of "my-namespace" and return the results as HTML:

http://localhost:8080/fedora/management/getNextPID?numPIDs=5&namespace=my-namespace

Generate 5 PIDs using the namespace value of "my-namespace" and return the results as XML:

http://localhost:8080/fedora/management/getNextPID?numPIDs=5&namespace=my-namespace&xml=true

upload

Syntax:

http://hostname:port/fedora/management/upload?file=(file)

This syntax requests an upload of a file to the Fedora server. The result is a temporary plain text URI which can be used to reference the uploaded file within subsequent API-M method calls, in which case Fedora will resolve the URI to the uploade file.

An upload request must use HTTP POST for submission.

The uploaded file will only be available on the server for a short time, the default timeout being five minutes. You can set a higher value by adding the "uploadStorageMinutes" parameter to your fedora.fcfg. This parameter goes in the Management module's configuration section, and specifies the number of minutes after which uploaded content will be automatically deleted if not used.

  • hostname – required hostname of the Fedora server.
  • port – required port number on which the Fedora server is running.
  • fedora – a required parameter specifying the Fedora servlet path.
  • management – a required parameter specifying the Fedora management servlet path.
  • file – a multipart encoded file

Example:

To perform an upload using an HTML form:

<form method="post" action="http://localhost:8080/fedora/management/upload" enctype="multipart/form-data">
  File to upload: <input type="file" name="file" size="50">
  <input type="submit">
</form>

WSDL

When running your own Fedora server, the API-M-LITE WSDL is available at /wsdl?api=API-M-LITE.

Example:

Unable to render {include} The included page could not be found.