-
Notifications
You must be signed in to change notification settings - Fork 2
/
TimeSeriesAPI.yaml
120 lines (112 loc) · 3.54 KB
/
TimeSeriesAPI.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
openapi: 3.0.3
info:
title: TimeSeries API
description: |
This describes the datastructures of the TimeSeries stored in ElasticSearch
version: v1
servers: []
paths: {}
components:
schemas:
DataPoint:
type: object
description: A datapoint represents a single measurement for a study participation within an time-instant or timeframe
properties:
datapointId:
description: "local ID of this datapoint"
type: string
format: uuid
participantId:
$ref: '#/components/schemas/Id'
studyId:
$ref: '#/components/schemas/Id'
moduleId:
$ref: '#/components/schemas/Id'
moduleType:
type: string
dataType:
type: string
storageDate:
description: The timestamp when the measurement was stored/received server-side.
type: string
format: date-time
effectiveTimeFrame:
$ref: '#/components/schemas/TimeFrame'
data:
oneOf:
- $ref: '#/components/schemas/Acceleration'
- $ref: '#/components/schemas/Geoposition'
required:
- datapointId
- participantId
- studyId
- moduleId
- moduleType
- dataType
- storageDate
- effectiveTimeFrame
- data
Acceleration:
description: A single measurement for acceleration
externalDocs:
url: https://www.openmhealth.org/documentation/#/schema-docs/schema-library/schemas/omh_acceleration
type: object
properties:
acceleration_x:
$ref: '#/components/schemas/MeterPerSecondSquared'
acceleration_y:
$ref: '#/components/schemas/MeterPerSecondSquared'
acceleration_z:
$ref: '#/components/schemas/MeterPerSecondSquared'
required:
- acceleration_x
- acceleration_y
MeterPerSecondSquared:
description: An acceleration value, in `m/s^2`.
type: number
format: double
Geoposition:
description: A geographic position measurement
externalDocs:
url: https://www.openmhealth.org/documentation/#/schema-docs/schema-library/schemas/omh_geoposition
type: object
properties:
latitude:
description: geographical latitude in `degrees`. Negative values indicate `South`.
type: number
format: double
minimum: -90
maximum: 90
longitude:
description:
geographical longitude east or west of Greenwich, England, in `degrees`.
Negative values indicate `West`.
type: number
format: double
minimum: -180
maximum: 180
elevation:
description: |
The height above or below the Earth's sea level as an equipotential gravitational surface in `meters`.
type: number
required:
- latitude
- longitude
TimeFrame:
oneOf:
- $ref: '#/components/schemas/Instant'
externalDocs:
url: https://www.openmhealth.org/documentation/#/schema-docs/schema-library/schemas/omh_time-frame
Instant:
description: |
A point in time (ISO8601). The time SHALL specified at least to the millisecond and SHALL include a time zone.
type: object
properties:
datetime:
type: string
format: date-time
required: [ datetime ]
externalDocs:
url: https://www.openmhealth.org/documentation/#/schema-docs/schema-library/schemas/omh_date-time
Id:
type: string