Page MenuHomeSoftware Heritage

Extend new deposit endpoint to support metadata-only deposits
Open, NormalPublic

Description

Extend same deposit endpoint

Depositing metadata is SWORD compliant - see http://swordapp.github.io/SWORDv2-Profile/SWORDProfile.html#protocoloperations_creatingresource_entry)

It is required to use the same endpoint as the regular deposit.

Although, it might be challenging to do so, since the metadata deposit requires a SWHID and the process that follows is quite different from the deposit.

Event Timeline

moranegg triaged this task as Normal priority.Wed, Aug 26, 5:22 PM
moranegg created this task.

Although, it might be challenging to do so, since the metadata deposit requires a SWHID and the process that follows is quite different from the deposit.

Maybe not so much in the end, we could use the slug ("suggested identifier").

Quoting the linked page:

The client MAY supply a Slug header providing a suggested identifier for the deposited content

If that slug is a SWHID (and it exists), then we infer the deposit client wants a metadata only deposit and progress as such.

After a talk with Bruno and Yannick on HAL, they say that depositing metadata is: 6.5.2. Replacing the Metadata of a Resource
because the resource already exists on SWH and this should be a PUT of new (maybe new from scratch) metadata on an existing identifier (SWHID).

That's true if you consider the graph sub-dag to be the Resource. I assumed at Resource to be the deposit itself; but re-reading the SWORDv2 spec, it's not obvious which one is the right interpretation.

zack renamed this task from Extend software deposit endpoint to enable only metadata deposits to Extend software deposit endpoint to support metadata-only deposits.Tue, Sep 1, 6:49 PM
moranegg renamed this task from Extend software deposit endpoint to support metadata-only deposits to Extend new deposit endpoint to support metadata-only deposits.Thu, Sep 3, 3:56 PM

After this morning's meeting with @vlorentz and @ardumont:
We will keep the metadata-only deposit specs with the idea of a separate namespace swh for which we need to write the schema (not sure we have that).

This way, the xml with metadata has a section where the identified artifact is mentioned:

Reference a snapshot, revision or release:

With ${type} in {snp (snapshot), rev (revision), rel (release) }:
<swh:deposit>
  <swh:reference>
    <swh:object id="swh:1:${type}:aaaaaaaaaaaaaa..."/>
  </swh:reference>
</swh:deposit>

We need to add to the list of types: directory and content

The possibility to deposit metadata on an origin should be implemented as well, but is not suited for institutional repositories (e.g HAL).
Reference an origin:

<swh:deposit>
  <swh:reference>
    <swh:origin url="https://github.com/user/repo"/>
  </swh:reference>
</swh:deposit>

This specs fits the POST of a new deposit in SWORD and is described in the SWORD v2 documentation (6.3.3. Creating a Resource with an Atom Entry)

The sequence here is:

  1. The client sends (POST) new metadata (without content)
  2. In the xml a reference to the object or origin MUST be provided in a deposittag
  3. The status of the deposit is verified
  4. The metadata is injected into the MetaData Storage in its raw form
  5. The status of the deposit is done