Versions Compared

Key

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

...

We should strongly consider deprecating these calls in favor of the new API, below

URL
HTTP Type
Description
Response ObjectNotes
/entity/{id}/doiPUTCreates a DOI for the specified entity. The DOI will associated with the most recent version where applicable.DoiDeprecate in favor of corresponding POST
/entity/{id}/version/{versionNumber}/doiPUTCreates a new DOI for the specified entity version.DoiDeprecate, ditto
/entity/{id}/doiGETGets the DOI status for the specified entity.DoiMaintain, as this will not require a call to another service and should be relatively quick
/entity/{id}/version/{versionNumber}/doiGETGets the DOI status for the specified entity version.DoiMaintain, ditto

Proposed Changes

Object changes:
  • Creation of DoiV2 new Doi (v2) object that implements new interfaces DataciteDoi DataciteMetadata and DoiAssociation
    • DataciteDoiDataciteMetadata
      • Separates DOI metadata (that is stored by DataCite) from Synapse-associated metadata
      • The client never uses this object, but it clearly delineates metadata that DataCite stores from metadata Synapse stores
    • DoiAssociation
      • Stores Synapse-associated metadata of a DOI object (like the object ID, etag, etc.)
      • Client can request this object to quickly get a DOI without relying on DataCite service availability to supply collect additional metadata.
      By using DoiV2
      • We can return the DOI URI and URL to the client (currently, the URI is "guessed" by the client)
    • By using Doi (v2):
      • The client can supply and update metadata
      • We have the option to extend support to additional metadata fields
      • We decouple our API URI from /entity/{id}
      • We have the option to extend support to mint DOIs for non-entity objects in Synapse
  • Creation of DoiRequest object to retrieve a DOI and all of its metadata

The new fields in object is a direct mapping of the most recent version (v4.1) of DataCite's metadata schema, simplified to contain only required fields and a small amount of optional fields that we curate. This ensures that we don't need to deprecate our API if we wish to support more of their optional metadata fields. If we do wish to support new optional metadata fields, we can easily extend our object.

Similarly, this is likely to simplify future transitions if DataCite deprecates the schema that we configure to use.

Existing fields in italics

Image RemovedImage Added

DataCite-imposed constraints for implementing clients to consider:

  • There cannot be more than 8000-10000 creators
  • Publication year must be in 'YYYY' format (regex: /[\d]{4}/)
  • There must be at least one creator
    • Each creator must have a creatorName that is at least 1 character long
    • nameIdentifier is not required, but if an identifier is provided, the scheme must also be provided
  • There must be at least one title
    • The title should be at least one character long
  • There must be a resourceTypeGeneral

...

URLHTTP VerbDescriptionRequest ObjectResponse ObjectNotes
/doi/async/startPOST

Asynchronously create or update a DOI. If the DOI does not exist, start a DOI creation job that will attempt to register a DOI with the DOI provider with the supplied metadata. If the DOI does exist, then it will simply update the DOI with the supplied metadata.

Note: The caller must have the ACCESS_TYPE.UPDATE permission on the Entity to make this call.

Doi 

(application/json)

AsyncJobId

Shift the work to an asynchronous worker queue (as we have been doing with other asynchronous services).

We combine the create and update calls because they require the same information and are both idempotent.

The Doi object must contain all fields required to mint or update a DOI with DataCite.

/doi/async/get/{asyncToken}GET

Asynchronously get the results of a DOI transaction started with POST /entity/{id}/doi/async/start

Note: When the result is not ready yet, this method will return a status code of 202 (ACCEPTED) and the response body will be a AsynchronousJobStatus object.

None

AsynchronousJobStatus

Doi

Get the status of the asynchronous job. If complete, returns the Doi object created by the job.
/doiGET

Get a Doi object (including associated metadata) for the object referred to in DoiRequest, if the Doi object exists.

DoiRequest


Doi

This call relies on availability of DataCite's API to return the metadata, as we do not store it.

/doi/idGETGet a DoiId DoiAssociation object that contains the DOI of an object referred to in DOI.DoiRequestDoiAssociation

By making this call, a client can get the DOI of an object without relying on certain metadata that relies on availability of DataCite's API.

Internal design notes

...