Skip to end of metadata
Go to start of metadata

Goals

The goals of this API are:

  • Enable the creation of different types ROs (Live, Snapshot, Archived)
  • Mechanism to "clone" an RO from an internal RO, external RO resource, external non-RO content.
  • Retrieve the evolution provenance of an RO, including the direct evolution (e.g., priorVersion) and contributions (e.g., derivedFrom, originalSource, etc.) 
  • Retrieve list of snapshots, archived ROs.

Requirements

This API should:

  • Vocabulary for describing RO evolution, including RO types and relations: roevo
  • Special creation operation of an RO, which makes a copy from another resource 
  • Handle different types of ROs, representing different stages in its lifecycle
  • Handle RO versions
  • Handle relations with other resources (e.g., contributions)
  • Prevent modification of snapshots and archived ROs

API function overview

The goals of this API are to enable transformation of the research objects based on their lifecycle and to facilitate retrieving the evolution history of the research objects.

The lifecycle transformation of research objects is achieved by providing a service that performs a copy of a research object and saves the copy as a live, snapshot or archived research object. The client needs to make two requests to complete the copying:

  • Copy a research object. The new research object is in a transient state and is available only to the creator. It can still be modified before reaching the target evolution state.
  • Finalize the state transformation. The service validates that the transient research object meets the requirements for being in the target evolution state and performs the state transition. For evolution states such as a snapshot or archived research object, that means that the research object becomes immutable.

The first and second requests can be combined into one if the client does not intend to modify the copy before finalizing the transformation.

The second API functionality is a facility for retrieving the evolution provenance. The client may send a request with a research object URI as a query parameter and the service will return an RDF graph with selected information about the research object in question, its copies and the research object that it itself was copied from. Note that typically this information can equally be achieved with a series of SPARQL queries to the ROSR service hosting the research object.

The service is based on the research object evolution model.

API Usage

Icon

URIs here are all examples - not fixed by API

Piotr

Icon

At this moment I would suggest that the URIs for all types of ROs have the same format and leave introducing special URI forms for a second step.

If a client wants to create a copy of an RO (i.e. a snapshot), the steps are:

  1. Retrieve the evolution service document and find the links to copy and finalize resources
  2. Create a new copy job and wait until it finishes
  3. Modify the copy in any way, i.e. delete temporary or private resources.
  4. Create a new finalize job and wait until it finishes

To check the evolution provenance of an RO, the steps are:

  1. Perform a GET or HEAD operation to the RO to find the link to evolution information resource
  2. Retrieve the evolution provenance information using the link provided

Retrieve the service document

The client retrieves the service document to learn the URI templates for the resources.

Create an RO copy

This operation creates a copy of a research object. The new research object is in a transient state unless the operation is immediately finalized. Transient state means it is only available to the creator. The type of the copy has to be defined because it influences the new research object URI form.

A "Slug" HTTP header may be used to indicate the requested RO id.

Creating and finalizing a copy may be presented to the user as one operation, only the client application will use a one step or two step process.

Copyfrom URI may be a research object in the same ROSR service, a research object in another ROSR service, or even an external non-RO content. It is more an implementation detail how the copy will be made in each of these cases.

The copy operation may take a considerable amount of time because it may involve copying resource contents. For that reason it is realized in a form of a job that can be created and monitored by the client.

Define the copy manifest changes

Icon

We should define which fields from the manifest are copied and which are added. For example, the dcterms:creator will probably be copied but evo:asSnapshotedBy or similar will be used for the person who made the copy.

Initiate a copy job.

Get a copy job status (running).

Get a copy job status (finished).

The copy job may get deleted by the service after any time after completion but it is recommended to keep it for enough time for the client to check back.

Finalize a copy operation

Finalize a copy operation. Can only be executed on research objects in transient state, created as a result of a (not finalized) copy operation.

The finalization operation may take a considerable amount of time because it may involve verifying the research object quality. For that reason it is realized in a form of a job that can be created and monitored by the client.

Getting a status of a successfully finished finalization.

The finalization may perform additional verification of the research object depending on the intended status. If the verification fails, the service will answer with a status failed and an explanation in reason.

Cancel a copy operation

In order to cancel the copy operation after the copying finished but before it was finalized, the client must simply delete the transient research object.

Get evolution information of RO

A separate but linked resource can be used to query for evolution information of a research object. The resource URI is obtained via a link relation returned when querying the RO itself.

@@ Option to include this link in the RO manifest?

An example for a Live RO.

An example for a Snapshot RO.

Notes:

Icon
  • Getting evolution information of an RO in transient state is not allowed? 
  • Copies are not having all the evolution information, such as previousVersion. Only a link to the RO from which it was copied, is kept.

Link relations

From the service description, the client may use the following links to find the service resources:

The URI template is is used to construct a resource URI by:

  • applying the URI template expansion procedures with caller-supplied RO URI (for the evolution information resource)
  • resolving the resulting URI-reference to an absolute URI using normal URI resolution rules (e.g. typically, using the service document URI as a base URI)

See also:

Resources and formats

Service description

The evolution service description is an RDF file that contains URI templates for accessing RO evolution related services. The RDF syntax used may be content negotiated. In the absence of content negotiation, RDF/XML should be returned.

Copy resource

The commands to copy a research object use a JSON object to store the operation parameters. JSON schema:

  • copyfrom: URI of the research object that will be copied. 
  • type: Type of the new research object. Allowed values are "live", "SNAPSHOT", "ARCHIVE".
  • deepcopy: aggregated resources that should be copied with their content. Default is "uri-prefix": ["ro_URI"], where ro_URI is the URI of the copyfrom research object, which resolves to all resources that have the RO URI as their prefix.
    • uri-list: a list of URIs of aggregated resources
    • uri-prefix: a list of URI prefixes of aggregated resources
  • finalize: True if the service should perform a finalization of the copy operation, false otherwise. The default value is false.
  • target: The URI of the new research object.
  • status: Copy job status. Allowed values are "running", "done", "failed" or "service_error".
  • reason: Reason for the job status.

The copyfrom and type MUST be provided by the client, and deepcopy and finalize MAY be provided by the client. target, status and reason are provided by the service.

Finalize resource

The commands to copy a research object use a JSON object to store the operation parameters. JSON schema:

  • target: URI of the transient research object that will be finalized.
  • status: Finalize job status. Allowed values are "running", "done", "failed" or "service_error".
  • reason: Reason for the job status.

The target MUST be provided by the client. status and reason are provided by the service.

Evolution information resource

The evolution information is an RDF graph using the ?RO evolution ontology.

Security considerations

It is assumed that the service implementing this API will share the authorization mechanism with the ROSR Service in which the copies are created.

References

?RO evolution - RO evolution model

To Be discussed

From the identification & Versioning page, would it be sensible the following approach for identification of ROs:

So, for instance, the following URIs would be used for the MetabolicRO:

http://sandbox.wf4ever-project.org/rosrs5/ROs/MetabolicRO/ (points  to the Live RO) - That is, by default, we work with a live RO (as it is now, so it is compatible with the existing ROSR API)

Live RO

http://sandbox.wf4ever-project.org/rosrs5/ROs/MetabolicRO/Live/

Snapshot ROs 

http://sandbox.wf4ever-project.org/rosrs5/ROs/MetabolicRO/Snapshot/1.0/       (first version)

http://sandbox.wf4ever-project.org/rosrs5/ROs/MetabolicRO/Snapshot/1.2/       (minor change)

http://sandbox.wf4ever-project.org/rosrs5/ROs/MetabolicRO/Snapshot/1.5/       (minor change)      

http://sandbox.wf4ever-project.org/rosrs5/ROs/MetabolicRO/Snapshot/2.0/       (major change & current version)

http://sandbox.wf4ever-project.org/rosrs5/ROs/MetabolicRO/Snapshot/             (research object snapshot series; point the same as previous)

Archived RO

http://sandbox.wf4ever-project.org/rosrs5/ROs/MetabolicRO/Archived/

  • No labels