Enhancement: Web API for archive date of revision regardless of origin
Apologies if this is the wrong place to post this (2nd) proposal.
I currently query the web API to extract an "archive date" for a revision SWHID. However, I am currently limited to extracting this date for a specific origin. What would be ideal is to get the archive date regardless of origin. This ideal archive date would be the first date that the revision is archived in Software Heritage Archive, regardless of origin.
The high-level user scenario for this is the "Archive Date" that is printed for a Baseprint document edition. For example, this Baseprint document edition [1] has an "Author date" of 2024-02-11 decided by the author and an "Archive date" of 2024-02-20 determined by Software Heritage Archive.
The "Archive date" in the current implementation is extracted by using this code [2] which only queries a known origin to get the visits, then SWH snapshots, and then revisions within the snapshots. This is less than ideal because it only works with the origin provided. It does not get the date the revision was first seen from visits to ANY origin. What is most relevant is when the edition was archived, not from which repository origin it happens to be stored by someone.
I suspect the current implementation also suffers from not finding a date if the visits have "skipped" some revisions.
The primary proposal here is to have any way in the web API to get this true ideal "archive date" for a revision. It would also be nice if there was a way to get this ideal archive date in just one query given a revision SWHID.