Designating Delta Versions in Requests

When data is cached, delta is calculated that is a difference between two resource data versions that allows a mobile device to restore a new resource version from the saved older version.

To designate delta between two resource data versions, use transformation of the initial data version to the final one.

When delta is requested, initial and final versions are specified:

Below is the syntax of delta versions according to the ABNF notation:

delta_versions = old "-" new
old = "v" version_number
new = ("v" version_number) / "last"
version_number = 1 * DIGIT

The example of correct versions: v0-last, v2-last, v1-v3, v2-v2.

The example of incorrect versions: v2-v1, v0-v0, v1-v0.

NOTE. Delta is meaningless if the final version is zero or less than the initial one, for example, the v2-last record is incorrect if the final version is 1.

Types and Methods of API Access

A request can be executed synchronously in the same execution stream and asynchronously in a new execution stream. If the request is synchronous, the result is obtained right after request execution. If the request is asynchronous, first, the request is prepared, and the callback function is used that is called by the system after the request result is obtained. The request result is sent to the function as an argument.

The execution time for various API requests depends on quick and long methods. Main features of quick method execution:

See also:

Server API | Caching