PcoWSkbVqDnWTu_dm2ix
The Developer Hub is now deprecated and information on this page may no longer be accurate. Instead, you should go to our new and improved documentation. You can also learn more about the future of documentation.
Collapse Sidebar

ListVersionsAsync

This function enumerates versions of the specified key in either ascending or descending order specified by a Enum/SortDirection parameter. It can optionally filter the returned versions by minimum and maximum timestamp.

See Also

  • Articles/Data store|Data Stores, an in-depth guide on data structure, management, error handling, and more.

Parameters

Name Type Default Description

key

Key name for the versions to list. If DataStoreOptions/AllScopes was set to true when accessing the data store through DataStoreService/GetDataStore, this key name must be prepended with the original scope as in “scope/key”.

Ascending

Enum specifying ascending or descending sort order.

0

Date after which the versions should be listed.

0

Date up to which the versions should be listed.

int
0

Number of items to be returned in each page.

Returns

Return Type Summary

A DataStoreVersionPages instance that enumerates all the versions of the key as DataStoreObjectVersionInfo instances.


Code Samples


Retrieving DataStore Versions With A Date Filter

The following code sample retrieves all versions after a specified starting time, sorted in ascending order.