Skip to content

Extend **update** deposit endpoint to enable new/modified metadata from client on an existing deposit

Currently, updates or the usage of PUT in the SWORD protocol isn't possible when the deposit_status is done.

In the SWORD documentation this modification should be possible. 6.5.2. Replacing the Metadata of a Resource swordapp.github.io/SWORDv2-Profile/SWORDProfile.html

In SWH documentation https://docs.softwareheritage.org/devel/swh-deposit/spec-api.html#put--1--collection-name---deposit-id--metadata-

Change the endpoint to accept deposit when status is done if X-Check-SWHID (optional) is given.

  1. The client sends (PUT) new/modified metadata on an already injected content.
  2. SWH checks that the SWHID in the deposit storage for the deposit_id is compatible with the X-Check-SWHID` HEADER.
  3. The metadata is injected to the metadata storage for the given SWHID

Remarks: Q: Why do we need a SWHID from the client, since we have the SWHID attached to the deposit_id (for a done deposit)? A: because we want to make sure that the information stored in the MetaData Storage is correct there is no way to certify that the client has kept the right deposit_id except believing he did and the fact matching the scenario without the SWHID is:

The client X has said Y on this deposit_id we want to be sure that the fact is: The client X has said Y on this SWHID


Migrated from T2560 (view on Phabricator)