There are a few simple conventions to follow when working with ZivaCare API, this section covers them in detail.
Making a basic query
ZivaCare API lets query user’s health data with and
access_token query parameter. For details on how to authorize users and retrive those tokens please see this section
Example of an API call with a query parameter (replace demo with the appropriate token):
application/json and when sending data you should set the Content-Type to
The different versions of ZivaCare API can be used by specifiyng the version number in the url, i.e.
The most current version of ZivaCare API is v1.
Query options conventions
The standard query options for the ZivaCare API are as described in the table below. These parameters make it easier for you to implement smart synchronization for your application. These are the availabke query options in ZivaCare API:
|limit||The max number of records to return in one query. Default is 10|
|offset||The index of the first record to return. Default is 0|
|start||Returns records that are created after the specified date. The format is YYYY-MM-DD|
|end||Returns records that are udpated before the specified date. The format is YYYY-MM-DD|
Discrete measurements conventions
A discrete measurement is a unit of data that is captured at a point in time and has a
value, and a
type. A measurement can also have an optional location or other meta data. To retrieve the discrete measurements you can follow the following pattern:
To retrieve the latest recordings:
To retrieve a reading by ID:
To retrieve a list of recordings for a specific date:
Periodic data conventions
Periodic data, unlike discrete data, always has a start and end date. This type of data can be retrieved as a list of objects for a specific date or time period.
To retrieve a list of recordings for a period: