Page MenuHomeSoftware Heritage

Add grouped properties for SWHID target in ERMDS API endpoint
Open, NormalPublic

Description

The origin property is misleading in the ERMDS endpoint, because it seems it is the origin of the metadata (which is false, this is the origin of the content that is described, taken from a full SWHID).
We wish to group all SWHID info under a higher level property target-details or target-info or other.

Here is the result at the moment:

[
    {
        "authority": {
            "type": "deposit_client",
            "url": "https://inria.halpreprod.archives-ouvertes.fr/"
        },
        "discovery_date": "2021-10-20T14:22:49+00:00",
        "fetcher": {
            "name": "swh-deposit",
            "version": "0.14.3"
        },
        "format": "sword-v2-atom-codemeta",
        "metadata_url": "https://webapp.staging.swh.network/api/1/raw-extrinsic-metadata/get/303a4b7518c573acde54cdb0b35603a340e33316/?filename=swh:1:dir:bc14367a8c9b7f70c49fa6a75244cef19db28ada_metadata",
        "origin": "https://github.com/moranegg/AffectationRO",
        "revision": "swh:1:rev:e3b5164418d287dc8760c40a00751dc19673b3e1",
        "snapshot": "swh:1:snp:3d73c454047658280dbbf7a5fbc3c25f788d4a37",
        "target": "swh:1:dir:bc14367a8c9b7f70c49fa6a75244cef19db28ada"
    }
]

We wish to have:

[
    {
        "authority": {
            "type": "deposit_client",
            "url": "https://inria.halpreprod.archives-ouvertes.fr/"
        },
        "discovery_date": "2021-10-20T14:22:49+00:00",
        "fetcher": {
            "name": "swh-deposit",
            "version": "0.14.3"
        },
        "format": "sword-v2-atom-codemeta",
        "metadata_url": "https://webapp.staging.swh.network/api/1/raw-extrinsic-metadata/get/303a4b7518c573acde54cdb0b35603a340e33316/?filename=swh:1:dir:bc14367a8c9b7f70c49fa6a75244cef19db28ada_metadata",
        "target-details":  {
             "origin": "https://github.com/moranegg/AffectationRO",
             "revision": "swh:1:rev:e3b5164418d287dc8760c40a00751dc19673b3e1",
             "snapshot": "swh:1:snp:3d73c454047658280dbbf7a5fbc3c25f788d4a37",
             "target": "swh:1:dir:bc14367a8c9b7f70c49fa6a75244cef19db28ada"
       }
    }
]

Example taken from:
https://webapp.staging.swh.network/api/1/raw-extrinsic-metadata/swhid/swh:1:dir:bc14367a8c9b7f70c49fa6a75244cef19db28ada/?authority=deposit_client%20https://inria.halpreprod.archives-ouvertes.fr/

Event Timeline

moranegg triaged this task as Normal priority.Oct 21 2021, 10:58 AM
moranegg created this task.

I'd rather call it "context" than "target-details", as this clearer (IMO), and consistent with the original terminology in https://docs.softwareheritage.org/devel/swh-storage/extrinsic-metadata-specification.html

Yes context is a better option.
Then target is not in the grouped context.