Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Overview

Excerpt

Identifiers can either be specified in REST API calls , and generated either automatically -generated using the internal PID minter , or generated using via an external PID minterREST service.

Specifying Identifiers in REST API Calls

If an identifier has already been generated by an application, it you can specify the identifier it when creating new objects and datastreams resources using the PUT method in the REST API:

Code Block
PUT /rest/abc123

...

 

Code Block
Status: 201 Created
 
Headers:
Location: http://localhost:8080/rest/abc123
 

Internal PID Minter

To have identifiers automatically generated using the internal PID minter, an application can use the POST method in the REST API:

Code Block
POST /rest

Response:

...

Fedora 4 can also be configured to use retrieve identifiers from an external PID minter via a REST APIHTTP minter service.  When a new object or datastream is created using the POST method, a new an identifier will be created using the external PID minter.  See Configuring an External PID Minter.

Custom PID Minters

To use a different identifier generation process, you can create a custom PID minter implementation, which can be configured in the same way as the external PID minter.  If your identifiers are generated from an HTTP service, then you should consider extending (or improving) HttpPidMinter.java to meet your needs.  Implementing PidMinter is another option.