Page MenuHomeSoftware Heritage

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

Description

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

Event Timeline

moranegg triaged this task as Normal priority.Sep 3 2020, 3:52 PM
moranegg created this task.

Here is the document on which we based this summary

The [1] part has landed within the deposit (server side).
So it's now possible to update the associated metadata to a deposit which is done.

[1] https://hackmd.io/yUZAp78KTdSvE4drf0_MqQ#21-Modifier-m%C3%A9tadonn%C3%A9es-d%E2%80%99un-d%C3%A9p%C3%B4t-existant

moranegg renamed this task from Extend update deposit endpoint to enable new/modified metadata from client to Extend **update** deposit endpoint to enable new/modified metadata from client on an exiting deposit.Sep 30 2020, 12:09 PM
moranegg renamed this task from Extend **update** deposit endpoint to enable new/modified metadata from client on an exiting deposit to Extend **update** deposit endpoint to enable new/modified metadata from client on an existing deposit.Nov 3 2020, 10:17 AM