Time Series: Client API Overview
The Time Series client API includes a set of session
methods and store
operations.
You can use the API to append (create and update), get,
delete, include, patch and query time series data.
Creating and Removing Time Series
A time series is constructed of time series entries, which can
be created and deleted using the API.
There is no need to explicitly create or delete a time series.
- A time series is created when the first entry is appended to it.
- A time series is deleted when all entries are deleted from it.
session
Methods -vs- document-store
Operations
Some time series functions are available through both session
methods
and document-store
operations:
You can append, delete, get and patch time series data
through both interfaces.
There are also functionalities unique to each interface.
-
Time series functionalities unique to the
session
interface:session
methods provide a transactional guarantee.
Use them when you want to guarantee that your actions would be processed in a single ACID transaction.
You can, for instance, gather multiple session actions (e.g. the update of a time series and the modification of a document) and execute them in a single transaction by callingsession.SaveChanges
, to ensure that they would all be completed or all be reverted.- You can use
session
methods toinclude
time series while loading documents.
Included time series data is held by the client's session, and can be handed to the user instantly when requested without issuing an additional request to the server
-
Time series functionalities unique to the
store
interface:- Getting the data of multiple time series in a single operation.
- Managing time series rollup and retention policies.
- Patching time series data to multiple documents located by a query.
Available Time Series session
methods
- TimeSeriesFor.Append
Use this method to Append entries to a time series (creating the series if it didn't previously exist). -
TimeSeriesFor.Delete
Use this method to delete a range of entries from a time series (removing the series completely if all entries have been deleted).- TimeSeriesFor.Get
Use this method to Retrieve raw time series entries for all entries or for a chosen entries range.
- TimeSeriesFor.Get
- Advanced.GetTimeSeriesFor
Use this method to Retrieve time series Names.
Series names are fetched byGetTimeSeriesFor
directly from their parent documents' metadata, requiring no additional server roundtrips. - session.Advanced.Defer
Use this method to patch time series data to a document. - To include time series data -
Available Time Series store
Operations
- TimeSeriesBatchOperation
Use this operation to append and delete time series entries.
You can bundle a series of Append and/or Delete operations in a list and execute them in a single call. - GetTimeSeriesOperation
Use this operation to Get entries from a single time series. - GetMultipleTimeSeriesOperation
Use this operation to Get entries from multiple time series. - ConfigureTimeSeriesOperation
Use this operation to manage time series roll-up and retention policies. - PatchOperation
Use this operation to append/delete time series entries to/from a single document. - PatchByQueryOperation
Use this operation to run a query and append/delete time series entries to/from matching documents.
by a query**. - BulkInsert.TimeSeriesFor.Append
Use this operation to append time series entries in bulk.