# Get epoch data

`DynamicEpochValues` represents a period that is composed of a start and end timestamp. This data type is available up to second precision. The `DynamicEpochValue` REST-API allows for data retrieval of one user.&#x20;

Please check the [data type documentation](/thryve-product-overview/access/data-types-biomarker.md) for valueTypes (dataTypeIds) definitions and availability.

## Retrieve DynamicEpochValues for a user

> Retrieve harmonized intraday measurements (e.g., heart rate) for one user within a specified time range.<br>

```json
{"openapi":"3.1.0","info":{"title":"Thryve API","version":"5.0.0"},"servers":[{"url":"https://api.thryve.de"}],"paths":{"/v5/dynamicEpochValues":{"post":{"summary":"Retrieve DynamicEpochValues for a user","tags":["Health Data"],"description":"Retrieve harmonized intraday measurements (e.g., heart rate) for one user within a specified time range.\n","parameters":[{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"},"description":"Basic Auth for your username:password. Required for all endpoints"},{"name":"AppAuthorization","in":"header","required":true,"schema":{"type":"string"},"description":"Basic Auth for your authID:authSecret. Required for all endpoints."}],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/DynamicEpochValuesRequest"}}}},"responses":{"200":{"description":"Request successful. Returns an array of DynamicEpochValues per user.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DynamicEpochValuesResponseItem"}}}}},"400":{"description":"Error response (invalid parameters, unauthorized, etc.).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}},"components":{"schemas":{"DynamicEpochValuesRequest":{"type":"object","required":["authenticationToken"],"oneOf":[{"required":["startTimestamp","endTimestamp"]},{"required":["startTimestampUnix","endTimestampUnix"]}],"properties":{"authenticationToken":{"type":"string","description":"The unique identifier of a user in Thryve's system. Newer interfaces call this parameter endUserId."},"startTimestamp":{"type":"string","description":"ISO 8601 timestamp for the beginning of the period"},"endTimestamp":{"type":"string","description":"ISO 8601 timestamp for the end of the period"},"startTimestampUnix":{"type":"integer","description":"Unix timestamp in milliseconds for the beginning of the period"},"endTimestampUnix":{"type":"integer","description":"Unix timestamp in milliseconds for the end of the period"},"valueTypes":{"type":"string","description":"Comma-separated Thryve DataType IDs to filter by."},"dataSources":{"type":"string","description":"Comma-separated Thryve data source IDs to filter by."},"detailed":{"type":"boolean","description":"If true, includes additional recording information."},"displayTypeName":{"type":"boolean","description":"If true, includes data type names (STRING) in the response."},"displayPartnerUserID":{"type":"boolean","description":"If true, includes the partnerUserID in the response."}}},"DynamicEpochValuesResponseItem":{"type":"object","properties":{"authenticationToken":{"type":"string","description":"The unique identifier of a user in Thryve's system. Newer interfaces call this parameter endUserId."},"partnerUserID":{"type":"string","description":"The optional alias set by the developer when creating a user. Newer interfaces call this parameter endUserAlias."},"dataSources":{"type":"array","items":{"type":"object","properties":{"dataSource":{"type":"integer","description":"ID of the data source (e.g., 8 for Garmin)."},"data":{"type":"array","items":{"type":"object","properties":{"startTimestamp":{"type":"string","description":"Start timestamp as ISO 8601 timespamp in UTC."},"endTimestamp":{"type":"string","description":"End timestamp as ISO 8601 timespamp in UTC (null if instant measurement)."},"createdAt":{"type":"string","description":"ISO 8601 timespamp in UTC when data point was created/updated in the data warehouse."},"startTimestampUnix":{"type":"integer","description":"Start timestamp in Unix milliseconds."},"endTimestampUnix":{"type":"integer","description":"End timestamp in Unix milliseconds (null if instant measurement)."},"createdAtUnix":{"type":"integer","description":"Unix timestamp when data point was created/updated in the data warehouse."},"dynamicValueType":{"type":"integer","description":"Thryve DataTypeID (e.g., 3000 for HeartRate)."},"dynamicValueTypeName":{"type":"string","description":"Name of the dynamic value type (e.g., 'HeartRate')."},"details":{"type":"object","description":"Optional JSON object with additional recording information."},"value":{"type":"string","description":"Value of the measurement."},"valueType":{"type":"string","description":"Type of value provided (LONG, DOUBLE, STRING, DATE, BOOLEAN)."}}}}}}}}},"ErrorResponse":{"type":"string"}}}}
```

{% hint style="warning" %}
When retrieving the desired data period, a startTimestamp(Unix) endTimestamp(Unix) or a createdAfter(Unix) date needs to be added as parameters to the request.\
If both startDay and startTimestampUnix are provided, the system will use the ISO format and ignore the Unix timestamps entirely.\
The query range is set to a maximum of 30 days.
{% endhint %}

{% hint style="info" %}
The response will include all values that overlap with the date range specified in the request. E.g., a user has the epoch values with timestamps 10:00:00 - 10:04:00 and 10:06:00 - 10:10:00, and the timestamps specified in the POST request are 10:02:00 - 10:08:00, the response will contain both epoch values.
{% endhint %}

{% hint style="info" %}
The end timestamp will be `null`, if the epoch entry indicates an instant measurement, such as a weight or heart rate value.
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.thryve.health/access-data-via-wearable-api/get-epoch-data.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
