HTTP Revision Metadata

Revisions figure in HTTP operations in two ways

  • metadata retrieval
  • query revision specification

Revision Metadata Retrieval via HTTP

Revision metadata is available both through content negotiation on a repository’s SPARQL service URI and in response to an HTTP request either to a repository resource specific to its timemap.

The SPARQL service URI for a given repository is

http://account/repository

for which, a request with the single accept header application/link-format generates a Memento timemap as the response. In addition, the relative uri timemap yields the same result. For example

GET /jhacker/foaf
Host: dydra.com
Accept: application-link-format

and

GET /jhacker/foaf/timemap
Host: dydra.com

both return the time map for the jhacker/foaf repository encoded as ntriples.

Revision Specification via HTTP

Dydra accepts the url query parameter revision-id in SPARQL protocol requests to indicate that a query is to apply to a specific repository revision. For example,

GET /account/repository/sparql? \
  revision-id=%3Curn%3Adydra%3Arevision%3Aa7b7ff5d-a73d-1545-be41-275337a28d70%3E& \
  query=SELECT%20(%20count(*)%20as%20%3FstatementCount%20)%0A%20%20WHERE%20%7B%20%3Fs%20%3Fp%20%3Fo%20%7D \
  HTTP/1.1
Host: dydra.com

A specific revision is permitted for read-only queries only. Update operations apply to the current revision only.

Table Of Contents

Previous topic

Repository Revision Metadata

Next topic

SPARQL Revision Metadata