Insights

Get trends (Profile Authorization)

Gets trend data for a profile with profile authorization. Can be filtered by name, category, and date range.

get/api/v1/profile/insight/trend

Request

  • Base URL
    https://api.sahha.ai (the document declares no server; this is the origin it was published from)
  • Auth
    API key in header Authorization

Query parameters

startDateTimestring date-time
endDateTimestring date-time
namestring
categorystring
periodicitystring
versionnumber float

Response

Success

idstring uuid

Unique identifier for the trend.

typestring

The type of the data structure, always 'trend'.

categorystring

The category of the trend, such as 'score', 'factor', or 'biomarker'.

namestring

The name of the metric being trended.

statestring

The direction of the trend: 'increasing', 'decreasing', or 'stable'.

isHigherBetterboolean nullable

Indicates whether higher values are better for this metric.

valueRangenumber[]

The minimum and maximum values in the data set, as [min, max].

unitstring

The unit of measurement for the values.

periodicitystring

The time period each data point represents, typically 'weekly'.

trendStartDateTimestring date-time

The start datetime for the entire trend period.

trendEndDateTimestring date-time

The end datetime for the entire trend period.

createdAtUtcstring date-time

The UTC timestamp when this trend was created.

versionnumber float

The version of the trend algorithm used.

Example response

[
  {
    "id": "2F9EA4F8-8A96-4AC2-88B5-001EE6FC2CCD",
    "type": "trend",
    "category": "score",
    "name": "sleep",
    "state": "increasing",
    "unit": "index",
    "periodicity": "weekly",
    "trendStartDateTime": "2023-05-01T00:00:00.0000000+05:00",
    "trendEndDateTime": "2023-05-29T00:00:00.0000000+05:00",
    "data": [
      {
        "id": "2F9EA4F8-8A96-4AC2-88B5-001EE6FC2CCD",
        "startDateTime": "2023-05-01T00:00:00.0000000+05:00",
        "endDateTime": "2023-05-08T00:00:00.0000000+05:00"
      }
    ],
    "createdAtUtc": "2023-05-16T09:30:00.0000000+00:00"
  }
]

Changes

No recorded changes to this operation across all 1 revision of this API.