The latest version of the specification is version v2.


A log of changes is a sequence of entries identified by their numerical order, the entry number. It is the backbone data structure that enables snapshots, records and audit.

type Log =
  List Entry

A picture of a log with A, B a Z entries

The first entry number MUST always be 1. The range corresponds to the positive numbers and they MUST be assigned in strict incremental succession (e.g. {1, 2, 3, ...}).


This section is non-normative.

Conceptually, a log has a few operations to help interact with it and with the rest of the data model.

A log is a list of immutable entries so in order to evolve the log the main operation is to append a new entry to it.

append : Entry -> Log -> Log

The log needs to be consumed at different sizes to support functionality like snapshots.

take : Integer -> Log -> Log

And finally, obtaining discrete entries from the log is as important and supported by the REST API.

get : ID -> Log -> Maybe Entry

© Crown copyright released under the Open Government Licence.