Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Expand
4 Resource Versioning

4.1 Versioned Resources

  • MUST provide TimeGate interaction model, detailed below

4.1.1 HTTP GET (LDPRv)

4.1.2 HTTP PUT (LDPRv) (Danny Bernstein)

  • (tick) An implementation must support PUT, as is the case for any LDPR.
4.2 Version Resources (LDPRm)
  • (tick) An  LDPRm   may  be deleted
  • (tick) An  LDPRm  must not  be modified once created.

4.2.1 HTTP GET (LDPRm)

  • (tick) An implementation must support GET, as is the case for any LDPR (LDP-RS memento)
  • (tick) An implementation must support GET, as is the case for any LDPR (LDP-NR memento)
  • (tick) The headers for  GET  requests and responses on this resource  must  conform to [ RFC7089section 2.1 . Particularly it should be noted that the relevant  TimeGate  for an  LDPRm  is the original versioned  LDPRv .
  • (tick) Any response to a GET request must include a <http://mementoweb.org/ns#Memento>; rel="type" link in the Link header.

4.2.2 HTTP OPTIONS (LDPRm)

4.2.3 HTTP POST (LDPRm)

4.2.4 HTTP PUT (LDPRm)

  • (tick) An implementation must not support PUT for LDPRms.

4.2.5 HTTP PATCH (LDPRm)

  • (tick) An implementation must not support PATCH for LDPRms.

4.2.6 HTTP DELETE (LDPRm)

  • (tick) An implementation may support DELETE for LDPRms. If DELETE is supported, the server is responsible for all behaviors implied by the LDP-containment of the LDPRm.
4.3 Version Containers (LDPCv) (Jared Whiklo)
  • (question)(tick) An implementation must indicate TimeMap in the same way it indicates the container interaction model of the resource via HTTP headers.
  • (tick) An implementation must not allow the creation of an LDPCv that is LDP-contained by its associated LDPRv.

4.3.1 HTTP GET (LDPCv) (Jared Whiklo)

  • (tick) An implementation must support GET, as is the case for any LDPR.
  • (question) (tick) Any response to a GET request must include a <http://mementoweb.org/ns#TimeMap>; rel="type" link in the Link header.
  • (tick) An LDPCv must respond to GET Accept: application/link-format as indicated in [ RFC7089section 5 and specified in [ RFC6690section 7.3.
  • (tick) An implementation must include the Allow header
  • (question)(error) If an LDPCv supports POST, then it must include the Accept-Post header
    • todo: create JIRA to add Accept-Post header on LDPCv
  • (minus)(question) If an LDPCv supports PATCH, then it must include the Accept-Patch header - PATCH not supported

4.3.2 HTTP OPTIONS (LDPCv) (Jared Whiklo)

  • (question) Implementations MUST support OPTIONS
  • (question) Implementation's response to an OPTIONS request MUST include "Allow: GET, HEAD, OPTIONS"
  • (tick) Implementations may Allow: DELETE if the versioning behavior is removable by deleting the LDPCv
  • (question) Implementations may Allow: PATCH if the LDPCv has mutable properties
  • (tick) Implementations may Allow: POST if versions can be explicitly minted by a client
  • (question) If an LDPCv supports POST, the response MUST include the "Accept-Post" header
  • (question) If an LDPCv supports PATCH, the response MUST include the "Accept-Patch" header

4.3.3 HTTP POST (LDPCv) 

  • (minus) (tick) Although an LDPCv is both a TimeMap and an LDPC, it may disallow POST requests. - POST is allowed

4.3.3.1 Implementations that allow POSTs for LDPCvs

  • (tick) If an LDPCv supports POST, a POST request that does not contain a Memento-Datetime header should be understood to create a new LDPRm contained by the LDPCv, reflecting the state of the LDPRv at the time of the POST
  • (question) If an LDPCv supports POST, a POST request that does not contain a Memento-Datetime header MUST ignore any request body
  • (tick) If an LDPCv supports POST, a POST with a Memento-Datetime header should be understood to create a new LDPRm contained by the LDPCv, with the state given in the request body
  • (question) If an LDPCv supports POST, a POST with a Memento-Datetime header should be understood to create a new LDPRm contained by the LDPCv, with the datetime given in the Memento-Datetime request header.

4.3.3.2 Implementations that disallow POSTs for LDPCv

  • (minus) If an implementation does not support one or both of POST cases above, it must respond to such requests with a 4xx range status code and a link to an appropriate constraints document

4.3.4 HTTP PUT (LDPCv)

  • (question) (error) Implementations MAY disallow PUT - we should disallow
    • todo: create JIRA to return a 405 instead of the current 400 on:

      Code Block
      curl -i -u fedoraAdmin:fedoraAdmin -XPUT -H"Content-Type: application/sparql-update" @patch.ru localhost:8080/rest/test4/obj/fcr:versions/new


4.3.5 HTTP PATCH (LDPCv)

  • (question) (minus) Implementations MAY disallow PATCH - disallowed

4.3.6 HTTP DELETE (LDPCv)

  • (tick) An implementation may support DELETE.
  • (tick) An implementation that does support DELETE should do so by both removing the LDPCv and removing the versioning interaction model from the original LDPRv.

4.4 Implementation Patterns

  • Non-normative section

...