Timestamps and TTL

This page provides detailed descriptions of timestamps in AnySee.

To help users better manage the registered face entities, we offer several timestamps in the API. These timestamps are automatically generated or calculated.


Timestamps

AnySee offers timestamps following the ISO-8601 standard, accurate to the second. For example, "2022-07-04T00:00:00Z" means 0 AM, July 4th, 2022, UTC.

📘

Time zone

All stored timestamps and our server time are in UTC or GMT+0.
Please do the conversion if you want to display the local time on your client.

There are three types of timestamps, createdAt, updatedAt, and expiresAt. createdAt is automatically generated when adding a face entity, and updatedAt is overwritten when the face entity is updated. These two timestamps are not indexed and thus can not be used in listing or searching. For expiresAt, please refer to the next section.


TTL

TTL (Time to Live) is a common technology used in database services to limit the lifetime of data. In some use cases, entity data must be deleted periodically to ensure data security or to remind the update of face photos. We offer the TTL function to help you automatically manage your registered data.

TTL in AnySee is an integer representing how many seconds from now before the face entity expires. It will automatically generate the expiresAt field calculated by adding the TTL value to the current server time. After that time, the server will automatically delete the face entity in an hour. Please tolerate some time difference between the expiration time and the actual time when the entity is deleted entirely. After the deletion, you will no longer be able to access that entity.

If you do not want to use the TTL function, do not attach that to your request body. By default, ttl is set to -1 and will lead to an expiresAt value of 3000-01-01T00:00:00Z. In this case, your face feature will never be automatically deleted.