-
Notifications
You must be signed in to change notification settings - Fork 0
/
ouraring_openapi.yaml
289 lines (289 loc) · 7.28 KB
/
ouraring_openapi.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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
openapi: "3.0.0"
info:
version: 1.0.0
title: Oura Ring
servers:
- url: https://api.ouraring.com/v1
paths:
/userinfo:
get:
summary: Get personal information for the user
operationId: userinfo
responses:
'200':
description: Personal info for the user
content:
application/json:
schema:
$ref: "#/components/schemas/PersonalInfo"
default:
description: unexpected error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
/sleep:
get:
summary: Get sleep summaries
operationId: sleep
parameters:
- in: query
name: start
schema:
type: string
description: The start date (inclusive)
- in: query
name: end
schema:
type: string
description: The end date (inclusive)
responses:
'200':
description: Sleep summary
content:
application/json:
schema:
$ref: "#/components/schemas/SleepSummary"
default:
description: unexpected error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
/activity:
get:
summary: Get activity summaries
operationId: activity
parameters:
- in: query
name: start
schema:
type: string
description: The start date (inclusive)
- in: query
name: end
schema:
type: string
description: The end date (inclusive)
responses:
'200':
description: Activity summary
content:
application/json:
schema:
$ref: "#/components/schemas/ActivitySummary"
default:
description: unexpected error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
components:
schemas:
PersonalInfo:
type: object
required:
- age
- weight
- gender
- email
properties:
age:
type: integer
weight:
type: integer
gender:
type: string
email:
type: string
SleepSummary:
type: object
required:
- sleep
properties:
sleep:
type: array
items:
type: object
properties:
summary_date:
type: string
period_id:
type: number
is_longest:
type: number
timezone:
type: number
bedtime_end:
type: string
bedtime_start:
type: string
breath_average:
type: number
duration:
type: number
total:
type: number
awake:
type: number
rem:
type: number
deep:
type: number
light:
type: number
midpoint_time:
type: number
efficiency:
type: number
restless:
type: number
onset_latency:
type: number
hr_5min:
type: array
items:
type: number
hr_average:
type: number
hr_lowest:
type: number
hypnogram_5min:
type: string
rmssd:
type: number
rmssd_5min:
type: array
items:
type: number
score:
type: number
score_alignment:
type: number
score_deep:
type: number
score_disturbances:
type: number
score_efficiency":
type: number
score_latency:
type: number
score_rem:
type: number
score_total:
type: number
temperature_deviation:
type: number
bedtime_start_delta:
type: number
bedtime_end_delta:
type: number
midpoint_at_delta:
type: number
temperature_delta:
type: number
temperature_trend_deviation:
type: number
nullable: true
ActivitySummary:
type: object
required:
- activity
properties:
activity:
type: array
items:
type: object
properties:
summary_date:
type: string
timezone:
type: number
day_start:
type: string
day_end:
type: string
cal_active:
type: number
cal_total:
type: number
class_5min:
type: string
steps:
type: number
daily_movement:
type: number
non_wear:
type: number
rest:
type: number
inactive:
type: number
low:
type: number
medium:
type: number
high:
type: number
inactivity_alerts:
type: number
average_met:
type: number
met_1min:
type: array
items:
type: number
met_min_inactive:
type: number
met_min_low:
type: number
met_min_medium:
type: number
met_min_high:
type: number
target_calories:
type: number
target_km:
type: number
target_miles:
type: number
to_target_km:
type: number
to_target_miles:
type: number
score:
type: number
score_meet_daily_targets:
type: number
score_move_every_hour:
type: number
score_recovery_time:
type: number
score_stay_active:
type: number
score_training_frequency:
type: number
score_training_volume:
type: number
rest_mode_state:
type: number
total:
type: number
Error:
type: object
required:
- code
- message
properties:
code:
type: integer
format: int32
message:
type: string
securitySchemes:
ApiKeyAuth:
type: apiKey
in: query
name: access_token
security:
- ApiKeyAuth: []