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 REST service. |
...
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 retrieve identifiers from an external HTTP 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.
...
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 improving or extending extending (or improving) HttpPidMinter.java to provide the needed functionality. Otherwise, you can create a new implementation of the PidMinter interfacemeet your needs. Implementing PidMinter is another option.