forked from decentralized-fda/dfda-wiki
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathopenapi-huge.yml
More file actions
7771 lines (7771 loc) · 302 KB
/
openapi-huge.yml
File metadata and controls
7771 lines (7771 loc) · 302 KB
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
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
x-stoplight:
id: e2dd35f0e728f
info:
title: Decentralized FDA API
description: A platform for quantifying the effects of every drug, supplement, food, and other factor on your health.
contact:
name: hello@quantimo.do
license:
name: GNU General Public License v3 (GPL-3)
url: 'https://tldrlegal.com/license/gnu-general-public-license-v3-(gpl-3)'
version: 0.0.1
servers:
- url: 'https://safe.dfda.earth/api'
description: Production Server
tags:
- name: units
description: Available units for measurements
externalDocs:
description: See it in action
url: 'https://web.quantimo.do/#/app/measurement-search?accessToken=demo'
- name: variables
description: 'Can be used for search auto-complete for data types like symptoms, foods and treatments and include statistics'
externalDocs:
description: Search for a variable
url: 'https://web.quantimo.do/#/app/reminder-search?accessToken=demo'
- name: measurements
description: 'Measurements are any value that can be recorded like daily steps, a mood rating, or apples eaten.'
externalDocs:
description: See it in action
url: 'https://web.quantimo.do/#/app/history-all-category/Anything?accessToken=demo'
- name: analytics
description: Identify the strongest predictors of a given outcome and generate studies
externalDocs:
description: Try it out
url: 'https://web.quantimo.do/#/app/predictor-search'
- name: connectors
description: Import data from third-party apps and devices like Fitbit and Mint.
externalDocs:
description: Import your data now
url: 'https://web.quantimo.do/#/app/import'
- name: reminders
description: Users can be reminded to track certain variables at a specified frequency with a default value.
externalDocs:
description: See it in action
url: 'https://web.quantimo.do/#/app/reminders-inbox?accessToken=demo'
- name: user
description: Get or update user info and settings
externalDocs:
description: See it in action
url: 'https://web.quantimo.do/#/app/settings?accessToken=demo'
- name: studies
description: Automatically generated natural language studies examining the relationship between a predictor and outcome variable including charts.
externalDocs:
description: Search for a study
url: 'https://web.quantimo.do/#/app/studies'
paths:
/v3/units:
get:
tags:
- units
summary: Get units
description: Get a list of the available measurement units
operationId: getUnits
responses:
'200':
description: Successful operation
content:
application/json:
schema:
type: array
description: Array of units
items:
$ref: '#/components/schemas/Unit'
'401':
description: Not Authenticated
content: {}
security:
- bearerAuth: []
- OAuth2:
- basic
/v3/variables:
get:
tags:
- variables
summary: Get variables along with related user-specific analysis settings and statistics
description: 'Get variables. If the user has specified variable settings, these are provided instead of the common variable defaults.'
operationId: getVariables
parameters:
- $ref: '#/components/parameters/includeChartsParam'
- $ref: '#/components/parameters/numberOfRawMeasurementsParam'
- $ref: '#/components/parameters/variableCategoryNameParam'
- name: name
in: query
description: 'Name of the variable. To get results matching a substring, add % as a wildcard as the first and/or last character of a query string parameter. In order to get variables that contain `Mood`, the following query should be used: ?variableName=%Mood%'
schema:
type: string
- $ref: '#/components/parameters/variableNameParam'
- $ref: '#/components/parameters/updatedAtParam'
- $ref: '#/components/parameters/sourceNameParam'
- $ref: '#/components/parameters/earliestMeasurementTimeParam'
- $ref: '#/components/parameters/latestMeasurementTimeParam'
- name: id
in: query
description: Common variable id
schema:
type: integer
- $ref: '#/components/parameters/lastSourceParam'
- $ref: '#/components/parameters/limitParam'
- $ref: '#/components/parameters/offsetParam'
- $ref: '#/components/parameters/sortParam'
- $ref: '#/components/parameters/includePublicParam'
- $ref: '#/components/parameters/manualTrackingParam'
- $ref: '#/components/parameters/clientIdParam'
- name: upc
in: query
description: UPC or other barcode scan result
schema:
type: string
- $ref: '#/components/parameters/effectOrCauseParam'
- $ref: '#/components/parameters/publicEffectOrCauseParam'
- $ref: '#/components/parameters/exactMatchParam'
- $ref: '#/components/parameters/variableCategoryIdParam'
- $ref: '#/components/parameters/includePrivateParam'
- $ref: '#/components/parameters/searchPhraseParam'
- $ref: '#/components/parameters/synonymsParam'
- $ref: '#/components/parameters/taggedVariableIdParam'
- $ref: '#/components/parameters/tagVariableIdParam'
- name: joinVariableId
in: query
description: 'Id of the variable you would like to get variables that can be joined to. This is used to merge duplicate variables. If joinVariableId is specified, this returns only variables eligible to be joined to the variable specified by the joinVariableId.'
schema:
type: integer
- name: parentUserTagVariableId
in: query
description: 'Id of the parent category variable (i.e. Fruit) you would like to get eligible child sub-type variables (i.e. Apple) for. Child variable measurements will be included in analysis of the parent variable. For instance, a child sub-type of the parent category Fruit could be Apple. When Apple is tagged with the parent category Fruit, Apple measurements will be included when Fruit is analyzed.'
schema:
type: integer
- name: childUserTagVariableId
in: query
description: 'Id of the child sub-type variable (i.e. Apple) you would like to get eligible parent variables (i.e. Fruit) for. Child variable measurements will be included in analysis of the parent variable. For instance, a child sub-type of the parent category Fruit could be Apple. When Apple is tagged with the parent category Fruit, Apple measurements will be included when Fruit is analyzed.'
schema:
type: integer
- name: ingredientUserTagVariableId
in: query
description: 'Id of the ingredient variable (i.e. Fructose) you would like to get eligible ingredientOf variables (i.e. Apple) for. IngredientOf variable measurements will be included in analysis of the ingredient variable. For instance, a ingredientOf of variable Fruit could be Apple.'
schema:
type: integer
- name: ingredientOfUserTagVariableId
in: query
description: 'Id of the ingredientOf variable (i.e. Apple) you would like to get eligible ingredient variables (i.e. Fructose) for. IngredientOf variable measurements will be included in analysis of the ingredient variable. For instance, a ingredientOf of variable Fruit could be Apple.'
schema:
type: integer
- name: commonOnly
in: query
description: Return only public and aggregated common variable data instead of user-specific variables
schema:
type: boolean
- name: userOnly
in: query
description: 'Return only user-specific variables and data, excluding common aggregated variable data'
schema:
type: boolean
- $ref: '#/components/parameters/includeTagsParam'
- $ref: '#/components/parameters/recalculate'
- $ref: '#/components/parameters/variableIdParam'
- $ref: '#/components/parameters/conciseParam'
- name: refresh
in: query
description: Regenerate charts instead of getting from the cache
schema:
type: boolean
responses:
'200':
description: Variables returned
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Variable'
'401':
description: Not Authenticated
content: {}
security:
- bearerAuth: []
- OAuth2:
- basic
/v3/userVariables:
get:
tags:
- variables
summary: Get variables along with related user-specific analysis settings and statistics
description: 'Get variables. If the user has specified variable settings, these are provided instead of the common variable defaults.'
operationId: getUserVariables
parameters:
- $ref: '#/components/parameters/includeChartsParam'
- $ref: '#/components/parameters/numberOfRawMeasurementsParam'
- $ref: '#/components/parameters/variableCategoryNameParam'
- name: name
in: query
description: 'Name of the variable. To get results matching a substring, add % as a wildcard as the first and/or last character of a query string parameter. In order to get variables that contain `Mood`, the following query should be used: ?variableName=%Mood%'
schema:
type: string
- $ref: '#/components/parameters/variableNameParam'
- $ref: '#/components/parameters/updatedAtParam'
- $ref: '#/components/parameters/sourceNameParam'
- $ref: '#/components/parameters/earliestMeasurementTimeParam'
- $ref: '#/components/parameters/latestMeasurementTimeParam'
- name: id
in: query
description: Common variable id
schema:
type: integer
- $ref: '#/components/parameters/lastSourceParam'
- $ref: '#/components/parameters/limitParam'
- $ref: '#/components/parameters/offsetParam'
- $ref: '#/components/parameters/sortParam'
- $ref: '#/components/parameters/includePublicParam'
- $ref: '#/components/parameters/manualTrackingParam'
- $ref: '#/components/parameters/clientIdParam'
- name: upc
in: query
description: UPC or other barcode scan result
schema:
type: string
- $ref: '#/components/parameters/effectOrCauseParam'
- $ref: '#/components/parameters/publicEffectOrCauseParam'
- $ref: '#/components/parameters/exactMatchParam'
- $ref: '#/components/parameters/variableCategoryIdParam'
- $ref: '#/components/parameters/includePrivateParam'
- $ref: '#/components/parameters/searchPhraseParam'
- $ref: '#/components/parameters/synonymsParam'
- $ref: '#/components/parameters/taggedVariableIdParam'
- $ref: '#/components/parameters/tagVariableIdParam'
- name: joinVariableId
in: query
description: 'Id of the variable you would like to get variables that can be joined to. This is used to merge duplicate variables. If joinVariableId is specified, this returns only variables eligible to be joined to the variable specified by the joinVariableId.'
schema:
type: integer
- name: parentUserTagVariableId
in: query
description: 'Id of the parent category variable (i.e. Fruit) you would like to get eligible child sub-type variables (i.e. Apple) for. Child variable measurements will be included in analysis of the parent variable. For instance, a child sub-type of the parent category Fruit could be Apple. When Apple is tagged with the parent category Fruit, Apple measurements will be included when Fruit is analyzed.'
schema:
type: integer
- name: childUserTagVariableId
in: query
description: 'Id of the child sub-type variable (i.e. Apple) you would like to get eligible parent variables (i.e. Fruit) for. Child variable measurements will be included in analysis of the parent variable. For instance, a child sub-type of the parent category Fruit could be Apple. When Apple is tagged with the parent category Fruit, Apple measurements will be included when Fruit is analyzed.'
schema:
type: integer
- name: ingredientUserTagVariableId
in: query
description: 'Id of the ingredient variable (i.e. Fructose) you would like to get eligible ingredientOf variables (i.e. Apple) for. IngredientOf variable measurements will be included in analysis of the ingredient variable. For instance, a ingredientOf of variable Fruit could be Apple.'
schema:
type: integer
- name: ingredientOfUserTagVariableId
in: query
description: 'Id of the ingredientOf variable (i.e. Apple) you would like to get eligible ingredient variables (i.e. Fructose) for. IngredientOf variable measurements will be included in analysis of the ingredient variable. For instance, a ingredientOf of variable Fruit could be Apple.'
schema:
type: integer
- name: commonOnly
in: query
description: Return only public and aggregated common variable data instead of user-specific variables
schema:
type: boolean
- name: userOnly
in: query
description: 'Return only user-specific variables and data, excluding common aggregated variable data'
schema:
type: boolean
- $ref: '#/components/parameters/includeTagsParam'
- $ref: '#/components/parameters/recalculate'
- $ref: '#/components/parameters/variableIdParam'
- $ref: '#/components/parameters/conciseParam'
- name: refresh
in: query
description: Regenerate charts instead of getting from the cache
schema:
type: boolean
responses:
'200':
description: Variables returned
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Variable'
'401':
description: Not Authenticated
content: { }
security:
- bearerAuth: [ ]
- OAuth2:
- basic
post:
tags:
- variables
summary: Update User Settings for a Variable
description: 'Users can change the parameters used in analysis of that variable such as the expected duration of action for a variable to have an effect, the estimated delay before the onset of action. In order to filter out erroneous data, they are able to set the maximum and minimum reasonable daily values for a variable.'
operationId: postUserVariables
parameters:
- $ref: '#/components/parameters/includePrivateParam'
- $ref: '#/components/parameters/clientIdParam'
- $ref: '#/components/parameters/includePublicParam'
- $ref: '#/components/parameters/searchPhraseParam'
- $ref: '#/components/parameters/exactMatchParam'
- $ref: '#/components/parameters/manualTrackingParam'
- $ref: '#/components/parameters/variableCategoryNameParam'
- $ref: '#/components/parameters/variableCategoryIdParam'
- $ref: '#/components/parameters/synonymsParam'
requestBody:
$ref: '#/components/requestBodies/userVariablesParam'
responses:
'201':
description: Successful Operation
content:
application/json:
schema:
$ref: '#/components/schemas/CommonResponse'
'400':
description: The received JSON was invalid or malformed
content: { }
'401':
description: Not Authenticated
content: { }
'404':
description: Unknown target user ID
content: { }
security:
- bearerAuth: [ ]
- OAuth2:
- basic
/v3/measurements:
get:
tags:
- measurements
summary: Get measurements for this user
description: 'Measurements are any value that can be recorded like daily steps, a mood rating, or apples eaten.'
operationId: getMeasurements
parameters:
- $ref: '#/components/parameters/variableNameParam'
- $ref: '#/components/parameters/sortParam'
- $ref: '#/components/parameters/limitParam'
- $ref: '#/components/parameters/offsetParam'
- $ref: '#/components/parameters/variableCategoryNameParam'
- $ref: '#/components/parameters/updatedAtParam'
- $ref: '#/components/parameters/sourceNameParam'
- $ref: '#/components/parameters/connectorNameParam'
- $ref: '#/components/parameters/valueParam'
- $ref: '#/components/parameters/unitNameParam'
- $ref: '#/components/parameters/earliestMeasurementTimeParam'
- $ref: '#/components/parameters/latestMeasurementTimeParam'
- $ref: '#/components/parameters/createdAtParam'
- name: id
in: query
description: Measurement id
schema:
type: integer
- $ref: '#/components/parameters/groupingWidthParam'
- $ref: '#/components/parameters/groupingTimezoneParam'
- $ref: '#/components/parameters/doNotProcessParam'
- $ref: '#/components/parameters/clientIdParam'
- $ref: '#/components/parameters/doNotConvertParam'
- $ref: '#/components/parameters/minMaxFilterParam'
responses:
'200':
description: Successful operation
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Measurement'
'401':
description: Not Authenticated
content: {}
security:
- bearerAuth: []
- OAuth2:
- readmeasurements
/v3/measurements/post:
post:
tags:
- measurements
summary: Save measurements
description: 'Store measurements representing things like a food eaten, a mood rating, or a medication taken. If the variable for the measurements does not already exist in the database, it will be automatically created.'
operationId: postMeasurements
requestBody:
description: An array of measurement sets containing measurement items you want to insert.
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/MeasurementItem'
required: true
responses:
'201':
description: Successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/PostMeasurementsResponse'
'401':
description: Not Authenticated
content: {}
security:
- bearerAuth: []
- OAuth2:
- writemeasurements
x-codegen-request-body-name: body
/v3/measurements/update:
post:
tags:
- measurements
summary: Update a measurement
description: Update a previously submitted measurement
operationId: updateMeasurement
requestBody:
description: 'The id as well as the new startAt, note, and/or value of the measurement to be updated'
content:
application/json:
schema:
$ref: '#/components/schemas/MeasurementUpdate'
required: true
responses:
'201':
description: Successful Operation
content:
application/json:
schema:
$ref: '#/components/schemas/CommonResponse'
'401':
description: Not Authenticated
content: {}
security:
- bearerAuth: []
- OAuth2:
- basic
x-codegen-request-body-name: body
/v3/measurements/delete:
delete:
tags:
- measurements
summary: Delete a measurement
description: Delete a previously submitted measurement
operationId: deleteMeasurement
responses:
'204':
description: Successful Operation
content:
application/json:
schema:
$ref: '#/components/schemas/CommonResponse'
'401':
description: Not Authenticated
content: {}
security:
- bearerAuth: []
- OAuth2:
- writemeasurements
x-codegen-request-body-name: body
/v3/appSettings:
get:
tags:
- appSettings
summary: Get client app settings
description: 'Get the settings for your application configurable at https://builder.quantimo.do'
operationId: getAppSettings
parameters:
- $ref: '#/components/parameters/clientIdParam'
- $ref: '#/components/parameters/clientSecretParam'
responses:
'200':
description: Successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/AppSettingsResponse'
'401':
description: Successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/JsonErrorResponse'
'404':
description: Not found
content: {}
'500':
description: Internal server error
content: {}
/v2/spreadsheetUpload:
post:
tags:
- measurements
summary: Upload a spreadsheet with measurements
description: 'Import from a spreadsheet containing a Variable Name, Value, Measurement Event Time, and Abbreviated Unit Name field. Here is an <a href="https://bit.ly/2jz7CNl" target="_blank">example spreadsheet</a> with allowed column names, units and time format.'
operationId: measurementSpreadsheetUpload
requestBody:
content:
multipart/form-data:
schema:
type: object
properties:
file:
type: string
format: binary
responses:
'201':
description: successful operation
content:
application/json:
schema:
type: integer
security:
- bearerAuth: []
- OAuth2:
- basic
/v2/measurements/exportRequest:
post:
tags:
- measurements
summary: Post Request for Measurements CSV
description: Use this endpoint to schedule a CSV export containing all user measurements to be emailed to the user within 24 hours.
operationId: measurementExportRequest
responses:
'201':
description: successful operation
content:
application/json:
schema:
type: integer
security:
- bearerAuth: []
- OAuth2:
- basic
/v3/connect/mobile:
get:
tags:
- connectors
summary: Mobile connect page
description: 'This page is designed to be opened in a webview. Instead of using popup authentication boxes, it uses redirection. You can include the user''s access_token as a URL parameter like https://api.quantimo.do/api/v3/connect/mobile?access_token=123'
operationId: getMobileConnectPage
responses:
'200':
description: Mobile connect page was returned
content: {}
'401':
description: User token is missing
content: {}
'403':
description: User token is incorrect
content: {}
/v3/connectors/list:
get:
tags:
- connectors
summary: List of Connectors
description: 'A connector pulls data from other data providers using their API or a screenscraper. Returns a list of all available connectors and information about them such as their id, name, whether the user has provided access, logo url, connection instructions, and the update history.'
operationId: getConnectors
parameters:
- $ref: '#/components/parameters/clientIdParam'
responses:
'200':
description: Successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/GetConnectorsResponse'
'401':
description: Not Authenticated
content: {}
security:
- bearerAuth: []
- OAuth2:
- basic
'/v3/connectors/{connectorName}/connect':
get:
tags:
- connectors
summary: Obtain a token from 3rd party data source
description: 'Attempt to obtain a token from the data provider, store it in the database. With this, the connector to continue to obtain new user data until the token is revoked.'
operationId: connectConnector
parameters:
- $ref: '#/components/parameters/connectorNamePathParam'
responses:
'200':
description: Successful operation
content: {}
'401':
description: Not Authenticated
content: {}
'404':
description: Method not found. Could not execute the requested method.
content: {}
'500':
description: Error during update. Unsupported response from update().
content: {}
security:
- bearerAuth: []
- OAuth2:
- basic
'/v3/connectors/{connectorName}/disconnect':
get:
tags:
- connectors
summary: Delete stored connection info
description: The disconnect method deletes any stored tokens or connection information from the connectors database.
operationId: disconnectConnector
parameters:
- $ref: '#/components/parameters/connectorNamePathParam'
responses:
'200':
description: Successful operation
content: {}
'401':
description: Not Authenticated
content: {}
'404':
description: Method not found. Could not execute the requested method.
content: {}
'500':
description: Error during update. Unsupported response from update().
content: {}
security:
- bearerAuth: []
- OAuth2:
- basic
'/v3/connectors/{connectorName}/update':
get:
tags:
- connectors
summary: Sync with data source
description: The update method tells the QM Connector Framework to check with the data provider (such as Fitbit or MyFitnessPal) and retrieve any new measurements available.
operationId: updateConnector
parameters:
- $ref: '#/components/parameters/connectorNamePathParam'
responses:
'200':
description: Connection Successful
content: {}
'401':
description: Not Authenticated
content: {}
'404':
description: Method not found. Could not execute the requested method.
content: {}
'500':
description: Error during update. Unsupported response from update().
content: {}
security:
- bearerAuth: []
- OAuth2:
- basic
/v3/correlations:
get:
tags:
- analytics
summary: Get user variable relationships
description: 'Get a list of user variable relationships that can be used to display top predictors of a given outcome like mood, for instance.'
operationId: getUserVariableRelationships
parameters:
- $ref: '#/components/parameters/causeVariableNameParam'
- $ref: '#/components/parameters/effectVariableNameParam'
- $ref: '#/components/parameters/sortParam'
- $ref: '#/components/parameters/limitParam'
- $ref: '#/components/parameters/offsetParam'
- $ref: '#/components/parameters/correlationCoefficientParam'
- $ref: '#/components/parameters/updatedAtParam'
- $ref: '#/components/parameters/outcomesOfInterestParam'
- $ref: '#/components/parameters/clientIdParam'
- name: commonOnly
in: query
description: 'Return only public, anonymized and aggregated population data instead of user-specific variables'
schema:
type: boolean
responses:
'200':
description: Successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/GetUserVariableRelationshipsResponse'
'401':
description: Not Authenticated
content: {}
security:
- bearerAuth: []
- OAuth2:
- basic
/v3/deviceTokens:
post:
tags:
- notifications
summary: Post DeviceTokens
description: 'Post user token for Android, iOS, or web push notifications'
operationId: postDeviceToken
requestBody:
description: The platform and token
content:
application/json:
schema:
$ref: '#/components/schemas/DeviceToken'
required: true
responses:
'201':
description: Successful operation
content: {}
'401':
description: Not authenticated
content: {}
'404':
description: Not found
content: {}
'500':
description: Internal server error
content: {}
x-codegen-request-body-name: body
/v3/feed:
get:
tags:
- feed
summary: 'Tracking reminder notifications, messages, and study results'
description: 'Tracking reminder notifications, messages, and study results'
operationId: getFeed
parameters:
- $ref: '#/components/parameters/sortParam'
- $ref: '#/components/parameters/createdAtParam'
- $ref: '#/components/parameters/updatedAtParam'
- $ref: '#/components/parameters/limitParam'
- $ref: '#/components/parameters/offsetParam'
- $ref: '#/components/parameters/clientIdParam'
responses:
'200':
description: Successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/FeedResponse'
security:
- bearerAuth: []
- OAuth2:
- basic
post:
tags:
- feed
summary: Post user interactions with feed
description: Post user actions on feed cards
operationId: postFeed
parameters:
- $ref: '#/components/parameters/clientIdParam'
requestBody:
description: Id of the tracking reminder notification to be snoozed
content:
application/json:
schema:
type: array
description: Array of cards to take action on
items:
$ref: '#/components/schemas/Card'
required: true
responses:
'201':
description: Returns new feed cards
content:
application/json:
schema:
$ref: '#/components/schemas/FeedResponse'
'401':
description: Not Authenticated
content: {}
security:
- bearerAuth: []
- OAuth2:
- basic
x-codegen-request-body-name: body
/v3/integration.js:
get:
tags:
- connectors
summary: Get embeddable connect javascript
description: |-
Get embeddable connect javascript. Usage:
- Embedding in applications with popups for 3rd-party authentication
windows.
Use `qmSetupInPopup` function after connecting `connect.js`.
- Embedding in applications with popups for 3rd-party authentication
windows.
Requires a selector to block. It will be embedded in this block.
Use `qmSetupOnPage` function after connecting `connect.js`.
- Embedding in mobile applications without popups for 3rd-party
authentication.
Use `qmSetupOnMobile` function after connecting `connect.js`.
If using in a Cordova application call `qmSetupOnIonic` function after connecting `connect.js`.
operationId: getIntegrationJs
parameters:
- $ref: '#/components/parameters/clientIdParam'
responses:
'200':
description: Embeddable connect javascript was returned
content: {}
/v3/notificationPreferences:
get:
tags:
- notifications
summary: Get NotificationPreferences
description: Get NotificationPreferences
operationId: getNotificationPreferences
responses:
'200':
description: Successful operation
content: {}
'401':
description: Not authenticated
content: {}
'404':
description: Not found
content: {}
'500':
description: Internal server error
content: {}
/oauth/authorize:
get:
tags:
- authentication
summary: Request Authorization Code
description: You can implement OAuth2 authentication to your application using our **OAuth2** endpoints. You need to redirect users to `/oauth/authorize` endpoint to get an authorization code and include the parameters below. This page will ask the user if they want to allow a client's application to submit or obtain data from their QM account. It will redirect the user to the url provided by the client application with the code as a query parameter or error in case of an error. See the /oauth/access_token endpoint for the next steps.
operationId: getOauthAuthorizationCode
parameters:
- $ref: '#/components/parameters/clientIdParam'
- $ref: '#/components/parameters/clientSecretParam'
- $ref: '#/components/parameters/responseTypeParam'
- $ref: '#/components/parameters/scopeParam'
- $ref: '#/components/parameters/redirectUriParam'
- $ref: '#/components/parameters/stateParam'
responses:
'200':
description: Successful Operation
content: {}
'401':
description: Not Authenticated
content: {}
security:
- bearerAuth: []
- OAuth2:
- basic
/oauth/token:
get:
tags:
- authentication
summary: Get a user access token
description: 'Client provides authorization token obtained from /oauth/authorize to this endpoint and receives an access token. Access token can then be used to query API endpoints. ### Request Access Token After user approves your access to the given scope form the https:/api.quantimo.do/oauth/authorize endpoint, you''ll receive an authorization code to request an access token. This time make a `POST` request to `/oauth/access_token` with parameters including: * `grant_type` Can be `authorization_code` or `refresh_token` since we are getting the `access_token` for the first time we don''t have a `refresh_token` so this must be `authorization_code`. * `code` Authorization code you received with the previous request. * `redirect_uri` Your application''s redirect url. ### Refreshing Access Token Access tokens expire at some point, to continue using our api you need to refresh them with `refresh_token` you received along with the `access_token`. To do this make a `POST` request to `/oauth/access_token` with correct parameters, which are: * `grant_type` This time grant type must be `refresh_token` since we have it. * `clientId` Your application''s client id. * `client_secret` Your application''s client secret. * `refresh_token` The refresh token you received with the `access_token`. Every request you make to this endpoint will give you a new refresh token and make the old one expired. So you can keep getting new access tokens with new refresh tokens. ### Using Access Token Currently we support 2 ways for this, you can''t use both at the same time. * Adding access token to the request header as `Authorization: Bearer {access_token}` * Adding to the url as a query parameter `?access_token={access_token}` You can read more about OAuth2 from [here](https://oauth.net/2/)'
operationId: getAccessToken
parameters:
- $ref: '#/components/parameters/clientIdParam'
- $ref: '#/components/parameters/clientSecretParam'
- $ref: '#/components/parameters/grantTypeParam'
- $ref: '#/components/parameters/codeParam'
- $ref: '#/components/parameters/responseTypeParam'
- $ref: '#/components/parameters/scopeParam'
- $ref: '#/components/parameters/redirectUriParam'
- $ref: '#/components/parameters/stateParam'
responses:
'200':
description: Successful Operation
content: {}
'401':
description: Not Authenticated
content: {}
security:
- bearerAuth: []
- OAuth2:
- basic
/v3/shares:
get:
tags:
- shares
summary: 'Get Authorized Apps, Studies, and Individuals'
description: 'This is a list of individuals, apps, or studies with access to your measurements.'
operationId: getShares
parameters:
- $ref: '#/components/parameters/createdAtParam'
- $ref: '#/components/parameters/updatedAtParam'
- $ref: '#/components/parameters/clientIdParam'
- $ref: '#/components/parameters/appVersionParam'
- $ref: '#/components/parameters/log'
- $ref: '#/components/parameters/pwd'
responses:
'200':
description: Successful Operation
content:
application/json:
schema:
$ref: '#/components/schemas/GetSharesResponse'
'401':
description: Not Authenticated
content: {}
security:
- bearerAuth: []
- OAuth2:
- writemeasurements
/v3/shares/delete:
post:
tags:
- shares
summary: Delete share
description: 'Remove access to user data for a given client_id associated with a given individual, app, or study'
operationId: deleteShare
parameters:
- name: clientIdToRevoke
in: query
description: 'Client id of the individual, study, or app that the user wishes to no longer have access to their data'
required: true
schema:
type: string
- name: reason
in: query
description: 'Ex: I hate you!'
schema:
type: string
responses:
'204':
description: Successful Operation
content:
application/json:
schema:
$ref: '#/components/schemas/User'
'401':
description: Not Authenticated
content: {}
security:
- bearerAuth: []
- OAuth2:
- writemeasurements
/v3/shares/invite:
post:
tags:
- shares
summary: Delete share
description: Invite someone to view your measurements
operationId: inviteShare
parameters:
- $ref: '#/components/parameters/clientIdParam'
requestBody:
description: Details about person to share with
content:
application/json:
schema:
$ref: '#/components/schemas/ShareInvitationBody'
required: true
responses:
'204':
description: Successful Operation
content:
application/json:
schema:
$ref: '#/components/schemas/User'
'401':
description: Not Authenticated
content: {}
security:
- bearerAuth: []
- OAuth2:
- writemeasurements
x-codegen-request-body-name: body
/v3/studies:
get:
tags:
- studies
summary: Get Personal or Population Studies
description: 'If you have enough data, this will be a list of your personal studies, otherwise it will consist of aggregated population studies.'
operationId: getStudies
parameters:
- $ref: '#/components/parameters/causeVariableNameParam'
- $ref: '#/components/parameters/effectVariableNameParam'
- $ref: '#/components/parameters/clientIdParam'
- $ref: '#/components/parameters/includeChartsParam'
- $ref: '#/components/parameters/recalculate'
- $ref: '#/components/parameters/studyClientIdParam'
- $ref: '#/components/parameters/sortParam'
- $ref: '#/components/parameters/limitParam'
- $ref: '#/components/parameters/offsetParam'
- $ref: '#/components/parameters/correlationCoefficientParam'
- $ref: '#/components/parameters/updatedAtParam'
- $ref: '#/components/parameters/outcomesOfInterestParam'
- $ref: '#/components/parameters/principalInvestigatorUserIdParam'
- $ref: '#/components/parameters/openParam'
- $ref: '#/components/parameters/joinedParam'
- $ref: '#/components/parameters/createdParam'
- $ref: '#/components/parameters/aggregatedParam'
- $ref: '#/components/parameters/downVotedParam'
responses:
'200':
description: Successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/GetStudiesResponse'
'401':
description: Successful operation