# Advanced services

The Trusted Twin platform offers the History, Timeseries, Indexes, and Notifications advanced services.

# History

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

The historical values, as well as the current value of the Entry, can be viewed at any time by sending a request to the get_twin_ledger_entry_history endpoint. The response returns a list of Entries with the history of Entry value changes in form of key-value pairs:

# Timeseries

A Timeseries* database on the Trusted Twin platform stores structured and multidimensional views of Digital Twin history in form of user-defined tables created through the create_timeseries_table endpoint. A Timeseries database consists of one or more tables.

On the right-hand side you can find an example of a Timeseries table which contains a timestamp column (added automatically by the system), one dimension ("city") and three measurements ("temperature", "ozone", "relative_humidity"):

A Timeseries table is automatically updated each time an Entry with a "timeseries" attribute for the given Timeseries table is being changed.

*

The Timeseries database service needs to be enabled for your Account. Please contact hello@trustedtwin.com for more details.

_timestamp city temperature ozone relative_humidity
21 Apr 2022 2022, 15:00:00 Gdańsk 12 29 55
21 Apr 2022 2022, 15:00:00 Wrocław 12 29 55
21 Apr 2022 2022, 16:00:00 Gdańsk 13 30 56
21 Apr 2022 2022, 16:00:00 Wrocław 12 29 55
21 Apr 2022 2022, 17:00:00 Gdańsk 12 29 54
21 Apr 2022 2022, 17:00:00 Wrocław 12 29 55
21 Apr 2022 2022, 18:00:00 Gdańsk 10 30 54
21 Apr 2022 2022, 18:00:00 Wrocław 12 29 55

# Indexes

Indexes* allow you to efficiently access Ledger records and are especially helpful if you manage a large number of Twins within your Account. The Indexes database on the Trusted Twin platform stores structured and multidimensional views of Digital Twin states in form of user-defined tables created through the create_indexes_table endpoint. An Indexes database consists of one or more tables. An Index can occur only once in a given Twin.

On the right-hand side you can find an example of an Indexes table which contains a Twin column (stating the UUID of the Twin where the index occurs), a timestamp column stating when the index was last changed (added automatically by the system), and three properties ("gdansk_temperature", "gdansk_ozone", "gdansk_relative_humidity"):

*

The Indexes service needs to be enabled for your Account. Please contact hello@trustedtwin.com for more details.

_twin _timestamp gdansk_temperature gdansk_ozone gdansk_relative_humidity
ca12b80e-045a-4c93-9e9b-2fc407fc5f2f 18 May 2022, 11:36:39 21 29 55
b27289ba-da39-4232-a9d7-7bef299d548c 18 May 2022, 12:00:00 20 29 56

# Notifications

Notifications allow to automatically invoke external services via publish/notify service (e.g., webhooks).