# Overview

The History service lets you store historical values of Entries of a Ledger with a timestamp denoting when the value was changed.

The History service is enabled through adding the "history" attribute to an Entry of a Ledger through the add_twin_ledger_entry endpoint.

If the History service is enabled, every time the value of an Entry is changed (e.g., via request to the update_twin_ledger_entry endpoint), a new item is added to the history. The current value of the Entry is also stored in the history and returned by the get_twin_ledger_entry endpoint.

In our example on the right-hand side, there is no "history" attribute in the Entry. The History service is not enabled for the Entry.

In our example on the right-hand side, the "history" attribute is set to null. This means that the History service is not enabled and that the historical values of the Entry will not be stored.

In our example on the right-hand side, the "history" attribute is set to "2W" (2 weeks). The History service will store 2 weeks of historical values of the Entry. If the number of Entry value changes exceeds 1000, the most recent 1000 Entry value changes will be stored.

In our example on the right-hand side, the "history" attribute is set to INF. The History service will store the Entry value changes for an infinite (INF) period of time, unless the number of Entry value changes exceeds 1000. If the number of Entry value changes exceeds 1000, the most recent 1000 Entry value changes will be stored.

The response to the get_twin_ledger_entry_history returns a list of Entries with the history of Entry value changes in form of key-value pairs.