HISTORY: Retrieves incremental changes since timestamp
HISTORY operation is intended for continuous data synchronization with other systems. Every insertion, update and deletion will be included in the resulting JSON array of documents (since timestamp in Last-Modified request header value). All changes are listed chronologically in response with 200 HTTP status code. The maximum listed srvModified timestamp is also stored in Last-Modified and ETag response headers that you can use for future, directly following synchronization. You can also limit the array's length using limit parameter.
Deleted documents will appear with isValid = false field.
HISTORY operation has a fallback mechanism in place for documents, which were not created by API v3. For such documents srvModified is virtually assigned from the date field (for entries collection) or from the created_at field (for other collections).
This operation requires read permission for the API and the collection (e.g. api:treatments:read)
The only exception is the settings collection which requires admin permission (api:settings:admin), because the settings of each application should be isolated and kept secret. You need to know the concrete identifier to access the app's settings.
Query parameters
Maximum number of documents to get in result array
A chosen set of fields to return in response. Either you can enumerate specific fields of interest or use the predefined set. Sample parameter values:
_all: All fields will be returned (default value)
date,insulin: Only fields date and insulin will be returned
Headers
Starting timestamp (defined with respect to server's clock) since which the changes in documents are to be listed, formatted as:
<day-name>, <day> <month> <year> <hour>:<minute>:<second> GMT
Example:
<pre>Last-Modified: Wed, 17 Oct 2018 05:13:00 GMT</pre>Response
Changed documents since specified timestamp
Changes
Changed in 5 of the 6 revisions of this API.10228
- ○
the endpoint scheme security
accessTokenwas removed from the APIapi-security-removed
This revision also has 1 change that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog
- ○
- ▲
the response's body type/format changed from
object/to/for status200response-body-type-changed
- ▲
removed the success response with the status
204response-success-status-removed
- ○
the endpoint scheme security
accessTokenwas added to the APIapi-security-added
- ○
the endpoint scheme security
jwtokenwas added to the APIapi-security-added
- ○
the endpoint scheme security
apiKeyAuthwas removed from the APIapi-security-removed
- ○
removed
DeviceStatusArrayEntryArrayFoodArrayProfileArraySettingsArrayTreatmentArrayfrom the response bodyoneOflist for the response status200response-body-one-of-removed
- ○
added the media type
application/jsonfor the response with the status400response-media-type-added
- ○
added the media type
application/jsonfor the response with the status401response-media-type-added
- ○
added the media type
application/jsonfor the response with the status403response-media-type-added
- ○
added the media type
application/jsonfor the response with the status404response-media-type-added
- ○
added the media type
application/jsonfor the response with the status406response-media-type-added
- ○
added the optional property
resultto the response with the200statusresponse-optional-property-added
- ○
added the optional property
statusto the response with the200statusresponse-optional-property-added
- ▲
- ○
added the media type
application/xmlfor the response with the status200response-media-type-added
- ○
added the media type
text/csvfor the response with the status200response-media-type-added
- ○
added the non-success response with the status
406response-non-success-status-added
- ○
- ○
added the optional property
oneOf[DeviceStatusArray]/items/allOf[DocumentBase]/isReadOnlyto the response with the200statusresponse-optional-property-added
- ○
added the optional property
oneOf[EntryArray]/items/allOf[DocumentBase]/isReadOnlyto the response with the200statusresponse-optional-property-added
- ○
added the optional property
oneOf[FoodArray]/items/allOf[DocumentBase]/isReadOnlyto the response with the200statusresponse-optional-property-added
- ○
added the optional property
oneOf[ProfileArray]/items/allOf[DocumentBase]/isReadOnlyto the response with the200statusresponse-optional-property-added
- ○
added the optional property
oneOf[SettingsArray]/items/allOf[DocumentBase]/isReadOnlyto the response with the200statusresponse-optional-property-added
- ○
added the optional property
oneOf[TreatmentArray]/items/allOf[DocumentBase]/isReadOnlyto the response with the200statusresponse-optional-property-added
- ○
- ▲
added
DeviceStatusArrayEntryArrayFoodArrayProfileArraySettingsArrayTreatmentArrayto the response bodyoneOflist for the response status200response-body-one-of-added
- ▲
the response's body type/format changed from
/toobject/for status200response-body-type-changed
- ▲
removed the media type
application/jsonfor the response with the status400response-media-type-removed
- ▲
removed the media type
application/jsonfor the response with the status401response-media-type-removed
- ▲
removed the media type
application/jsonfor the response with the status403response-media-type-removed
- ▲
removed the media type
application/jsonfor the response with the status404response-media-type-removed
- ▲
removed the media type
application/xmlfor the response with the status200response-media-type-removed
- ▲
removed the media type
text/csvfor the response with the status200response-media-type-removed
- ●
removed the optional property
resultfrom the response with the200statusresponse-optional-property-removed
- ●
removed the optional property
statusfrom the response with the200statusresponse-optional-property-removed
- ○
the endpoint scheme security
apiKeyAuthwas added to the APIapi-security-added
- ○
the endpoint scheme security
jwtokenwas removed from the APIapi-security-removed
- ○
added the new optional
headerrequest parameterDateto all path's operationsnew-optional-request-default-parameter-to-existing-path
- ○
added the new optional
queryrequest parameternowto all path's operationsnew-optional-request-default-parameter-to-existing-path
- ○
added the new optional
queryrequest parametertokento all path's operationsnew-optional-request-default-parameter-to-existing-path
- ○
removed the non-success response with the status
406response-non-success-status-removed
- ○
added the success response with the status
204response-success-status-added
This revision also has 8 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog
- ▲