Dimension: Version

Description
A resource could have different representations of the state that it went through in time, [52] introduced a framework to negotiate the resource states through datetime negotiation, by adding the headers Accept-Datetime. The workflow could be summarized in these steps:
  • Step 1: The user agent sends an HTTP HEAD/GET against URI-R (URI of an Original Resource) that has an "Accept-Datetime" HTTP header with a value of the datetime of the desired state.
  • Step 2: The response from URI-R includes an HTTP "Link" header with a Relation Type of timegate pointing at a URI-G (URI of a TimeGate) for the Original Resource.
  • Step 3: The user agent sends an HTTP GET request against URI-G that has an "Accept-Datetime" HTTP header with a value of the desired datetime.
  • Step 4: The response from URI-G includes a "Location" header pointing at a Memento URI-M (URI of a Memento) for the Original Resource.
  • Step 5: The user agent sends an HTTP GET request against URI-M.
  • Step 6: The response from URI-M includes a "Memento-Datetime" HTTP header with a value of the archival datetime of the Memento.
This diagram illustrates the steps: Version Diagram

Use cases

Examples
As an example the use case Archiving versions, the user agent sends the initial request:
curl --location --request GET 'www.archive.example.com/file/45' \ --header 'Accept-Datetime: Tue, 20 Mar 2001 20:35:00 GMT'
And the final URI-M answers with the response:
HTTP/1.1 200 OK
Date: Thu, 25 Oct 2021 12:06:51 GMT
Memento-Datetime: Tue, 20 Mar 2001 13:36:10 GMT
Link: ; rel="original timegate", ; rel="timemap"; type="application/link-format" ; from="Tue, 15 Sep 2011 11:28:26 GMT" ; until="Wed, 20 Jan 2021 09:34:33 GMT"
Content-Length: 23364
Content-Type: text/html
...
Other organization such as OCF (Open Connectivity Foundation) states in its specification that the client and server must negotiate in the beginning payload version to understand each other, and it defines the headers OCF-Accept-Content-FormatVersion and OCF-Content-Format-Version, in the OCFCore Specification [56].

References
  • [52]: HTTP framework for time-based access to resource states - memento.
  • [56]: Open Connectivity Foundation (OCF) specification.