openapi: 3.0.1 info: title: CureDAO Unified Health API description: A community-owned platform for crowd-sourced clinical research termsOfService: 'https://curedao.org/tos' contact: name: hello@curedao.org url: 'https://curedao.org' email: api@curedao.org 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://api.curedao.org/api' description: Production - description: Local url: 'http://localhost/api' tags: - name: units description: Available units for measurements externalDocs: description: See it in action url: 'https://app.curedao.org/#/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://app.curedao.org/#/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://app.curedao.org/#/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://app.curedao.org/#/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://app.curedao.org/#/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://app.curedao.org/#/app/reminders-inbox?accessToken=demo' - name: user description: Get or update user info and settings externalDocs: description: See it in action url: 'https://app.curedao.org/#/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://app.curedao.org/#/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: [] - curedao_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/userIdParam' - $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: [] - curedao_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: [] - curedao_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/userIdParam' - $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: [] - curedao_oauth2: - readmeasurements /v3/measurements/post: post: tags: - measurements summary: Post a new set or update existing measurements to the database description: 'You can submit or update multiple measurements in a "measurements" sub-array. If the variable these measurements correspond to does not already exist in the database, it will be automatically added.' operationId: postMeasurements parameters: - $ref: '#/components/parameters/userIdParam' requestBody: description: An array of measurement sets containing measurement items you want to insert. content: application/json: schema: type: array items: $ref: '#/components/schemas/MeasurementSet' required: true responses: '201': description: Successful operation content: application/json: schema: $ref: '#/components/schemas/PostMeasurementsResponse' '401': description: Not Authenticated content: {} security: - bearerAuth: [] - curedao_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 startTime, 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: [] - curedao_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: [] - curedao_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.curedao.org' 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 example spreadsheet with allowed column names, units and time format.' operationId: measurementSpreadsheetUpload requestBody: content: multipart/form-data: schema: type: object properties: file: type: string format: binary parameters: - $ref: '#/components/parameters/userIdParam' responses: '201': description: successful operation content: application/json: schema: type: integer examples: {} security: - bearerAuth: [] - curedao_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 parameters: - $ref: '#/components/parameters/userIdParam' responses: '201': description: successful operation content: application/json: schema: type: integer security: - bearerAuth: [] - curedao_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.curedao.org/api/v3/connect/mobile?access_token=123' operationId: getMobileConnectPage parameters: - $ref: '#/components/parameters/userIdParam' 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: [] - curedao_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/userIdParam' - $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: [] - curedao_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: [] - curedao_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/userIdParam' - $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: [] - curedao_oauth2: - basic /v3/correlations: get: tags: - analytics summary: Get correlations description: 'Get a list of correlations that can be used to display top predictors of a given outcome like mood, for instance.' operationId: getCorrelations parameters: - $ref: '#/components/parameters/causeVariableNameParam' - $ref: '#/components/parameters/effectVariableNameParam' - $ref: '#/components/parameters/sortParam' - $ref: '#/components/parameters/limitParam' - $ref: '#/components/parameters/offsetParam' - $ref: '#/components/parameters/userIdParam' - $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/GetCorrelationsResponse' '401': description: Not Authenticated content: {} security: - bearerAuth: [] - curedao_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/userIdParam' - $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: [] - curedao_oauth2: - basic post: tags: - feed summary: Post user interactions with feed description: Post user actions on feed cards operationId: postFeed parameters: - $ref: '#/components/parameters/userIdParam' - $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: [] - curedao_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: {} /v3/oauth2/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 `/api/v3/oauth2/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 /api/v1/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: [] - curedao_oauth2: - basic /v3/oauth2/token: get: tags: - authentication summary: Get a user access token description: 'Client provides authorization token obtained from /api/v3/oauth2/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.curedao.org/v1/oauth2/authorize endpoint, you''ll receive an authorization code to request an access token. This time make a `POST` request to `/api/v1/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 `/api/v1/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: [] - curedao_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/userIdParam' - $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: [] - curedao_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: [] - curedao_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: [] - curedao_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/userIdParam' - $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 content: application/json: schema: $ref: '#/components/schemas/JsonErrorResponse' '404': description: Not found content: {} '500': description: Internal server error content: {} security: - bearerAuth: [] - curedao_oauth2: - basic /v3/studies/open: get: tags: - studies summary: These are open studies that anyone can join description: These are studies that anyone can join and share their data for the predictor and outcome variables of interest. operationId: getOpenStudies parameters: - $ref: '#/components/parameters/causeVariableNameParam' - $ref: '#/components/parameters/effectVariableNameParam' - $ref: '#/components/parameters/userIdParam' - $ref: '#/components/parameters/clientIdParam' - $ref: '#/components/parameters/includeChartsParam' - $ref: '#/components/parameters/recalculate' - $ref: '#/components/parameters/studyClientIdParam' responses: '200': description: Successful operation content: application/json: schema: $ref: '#/components/schemas/GetStudiesResponse' '401': description: Successful operation content: application/json: schema: $ref: '#/components/schemas/JsonErrorResponse' '404': description: Not found content: {} '500': description: Internal server error content: {} security: - bearerAuth: [] - curedao_oauth2: - basic /v3/studies/joined: get: tags: - studies summary: Studies You Have Joined description: These are studies that you are currently sharing your data with. operationId: getStudiesJoined parameters: - $ref: '#/components/parameters/causeVariableNameParam' - $ref: '#/components/parameters/effectVariableNameParam' - $ref: '#/components/parameters/sortParam' - $ref: '#/components/parameters/limitParam' - $ref: '#/components/parameters/offsetParam' - $ref: '#/components/parameters/userIdParam' - $ref: '#/components/parameters/correlationCoefficientParam' - $ref: '#/components/parameters/updatedAtParam' - $ref: '#/components/parameters/outcomesOfInterestParam' - $ref: '#/components/parameters/clientIdParam' responses: '200': description: Successful operation content: application/json: schema: $ref: '#/components/schemas/GetStudiesResponse' '401': description: Not Authenticated content: {} security: - bearerAuth: [] - curedao_oauth2: - basic /v3/studies/created: get: tags: - studies summary: Get studies you have created description: These are studies that you have created. operationId: getStudiesCreated parameters: - $ref: '#/components/parameters/causeVariableNameParam' - $ref: '#/components/parameters/effectVariableNameParam' - $ref: '#/components/parameters/sortParam' - $ref: '#/components/parameters/limitParam' - $ref: '#/components/parameters/offsetParam' - $ref: '#/components/parameters/userIdParam' - $ref: '#/components/parameters/updatedAtParam' - $ref: '#/components/parameters/clientIdParam' responses: '200': description: Successful operation content: application/json: schema: $ref: '#/components/schemas/GetStudiesResponse' '401': description: Not Authenticated content: {} security: - bearerAuth: [] - curedao_oauth2: - basic /v3/study/publish: post: tags: - studies summary: Publish Your Study description: Make a study and all related measurements publicly visible by anyone operationId: publishStudy parameters: - $ref: '#/components/parameters/causeVariableNameParam' - $ref: '#/components/parameters/effectVariableNameParam' - $ref: '#/components/parameters/userIdParam' - $ref: '#/components/parameters/clientIdParam' - $ref: '#/components/parameters/includeChartsParam' - $ref: '#/components/parameters/recalculate' - $ref: '#/components/parameters/studyClientIdParam' responses: '201': description: Successful operation content: application/json: schema: $ref: '#/components/schemas/PostStudyPublishResponse' '401': description: Not authenticated content: {} '404': description: Not found content: {} '500': description: Internal server error content: {} security: - bearerAuth: [] - curedao_oauth2: - basic /v3/study/join: post: tags: - studies summary: Join a Study description: Anonymously share measurements for specified variables operationId: joinStudy parameters: - $ref: '#/components/parameters/studyClientIdParam' - $ref: '#/components/parameters/causeVariableNameParam' - $ref: '#/components/parameters/effectVariableNameParam' - $ref: '#/components/parameters/userIdParam' - $ref: '#/components/parameters/clientIdParam' responses: '201': description: Successful operation content: application/json: schema: $ref: '#/components/schemas/StudyJoinResponse' '401': description: Not authenticated content: {} '404': description: Not found content: {} '500': description: Internal server error content: {} security: - bearerAuth: [] - curedao_oauth2: - basic /v3/study/create: post: tags: - studies summary: Create a Study description: 'Create an individual, group, or population study examining the relationship between a predictor and outcome variable. You will be given a study id which you can invite participants to join and share their measurements for the specified variables.' operationId: createStudy parameters: - $ref: '#/components/parameters/clientIdParam' requestBody: description: Details about the study you want to create content: application/json: schema: $ref: '#/components/schemas/StudyCreationBody' required: true responses: '201': description: Successful operation content: application/json: schema: $ref: '#/components/schemas/PostStudyCreateResponse' '401': description: Not authenticated content: {} '404': description: Not found content: {} '500': description: Internal server error content: {} security: - bearerAuth: [] - curedao_oauth2: - basic x-codegen-request-body-name: body /v3/trackingReminderNotifications: get: tags: - reminders summary: Get specific tracking reminder notifications description: Specific tracking reminder notification instances that still need to be tracked. operationId: getTrackingReminderNotifications parameters: - $ref: '#/components/parameters/sortParam' - $ref: '#/components/parameters/userIdParam' - $ref: '#/components/parameters/createdAtParam' - $ref: '#/components/parameters/updatedAtParam' - $ref: '#/components/parameters/limitParam' - $ref: '#/components/parameters/offsetParam' - $ref: '#/components/parameters/variableCategoryNameParam' - $ref: '#/components/parameters/reminderTimeParam' - $ref: '#/components/parameters/clientIdParam' - $ref: '#/components/parameters/onlyPastParam' - $ref: '#/components/parameters/includeDeletedParam' responses: '200': description: Successful operation content: application/json: schema: $ref: '#/components/schemas/GetTrackingReminderNotificationsResponse' security: - bearerAuth: [] - curedao_oauth2: - basic post: tags: - reminders summary: 'Snooze, skip, or track a tracking reminder notification' description: 'Snooze, skip, or track a tracking reminder notification' operationId: postTrackingReminderNotifications parameters: - $ref: '#/components/parameters/userIdParam' - $ref: '#/components/parameters/clientIdParam' requestBody: description: Id of the tracking reminder notification to be snoozed content: application/json: schema: type: array description: Array of TrackingReminderNotifications to take action on items: $ref: '#/components/schemas/TrackingReminderNotificationPost' required: true responses: '201': description: Successful Operation content: application/json: schema: $ref: '#/components/schemas/CommonResponse' '401': description: Not Authenticated content: {} security: - bearerAuth: [] - curedao_oauth2: - basic x-codegen-request-body-name: body /v3/trackingReminders: get: tags: - reminders summary: Get repeating tracking reminder settings description: Users can be reminded to track certain variables at a specified frequency with a default value. operationId: getTrackingReminders parameters: - $ref: '#/components/parameters/userIdParam' - $ref: '#/components/parameters/variableCategoryNameParam' - $ref: '#/components/parameters/createdAtParam' - $ref: '#/components/parameters/updatedAtParam' - $ref: '#/components/parameters/limitParam' - $ref: '#/components/parameters/offsetParam' - $ref: '#/components/parameters/sortParam' - $ref: '#/components/parameters/clientIdParam' - $ref: '#/components/parameters/appVersionParam' responses: '200': description: Successful operation content: application/json: schema: type: array items: $ref: '#/components/schemas/TrackingReminder' security: - bearerAuth: [] - curedao_oauth2: - basic post: tags: - reminders summary: Store a Tracking Reminder description: This is to enable users to create reminders to track a variable with a default value at a specified frequency operationId: postTrackingReminders requestBody: description: TrackingReminder that should be stored content: application/json: schema: type: array items: $ref: '#/components/schemas/TrackingReminder' required: true responses: '201': description: Successful operation content: application/json: schema: $ref: '#/components/schemas/PostTrackingRemindersResponse' security: - bearerAuth: [] - curedao_oauth2: - basic x-codegen-request-body-name: body /v3/trackingReminders/delete: delete: tags: - reminders summary: Delete Tracking Reminder description: Stop getting notifications to record data for a variable. Previously recorded measurements will be preserved. operationId: deleteTrackingReminder parameters: - $ref: '#/components/parameters/userIdParam' responses: '204': description: Successful Operation content: application/json: schema: $ref: '#/components/schemas/CommonResponse' '401': description: Not Authenticated content: {} security: - bearerAuth: [] - curedao_oauth2: - basic x-codegen-request-body-name: body /v3/unitCategories: get: tags: - units summary: Get unit categories description: 'Get a list of the categories of measurement units such as ''Distance'', ''Duration'', ''Energy'', ''Frequency'', ''Miscellany'', ''Pressure'', ''Proportion'', ''Rating'', ''Temperature'', ''Volume'', and ''Weight''.' operationId: getUnitCategories responses: '200': description: Successful operation content: application/json: schema: type: array items: $ref: '#/components/schemas/UnitCategory' '401': description: Not Authenticated content: {} security: - bearerAuth: [] - curedao_oauth2: - basic /v3/user: get: tags: - user summary: Get user info description: 'Returns user info. If no userId is specified, returns info for currently authenticated user' operationId: getUser parameters: - $ref: '#/components/parameters/userIdParam' - $ref: '#/components/parameters/createdAtParam' - $ref: '#/components/parameters/updatedAtParam' - $ref: '#/components/parameters/limitParam' - $ref: '#/components/parameters/offsetParam' - $ref: '#/components/parameters/sortParam' - $ref: '#/components/parameters/clientIdParam' - $ref: '#/components/parameters/appVersionParam' - $ref: '#/components/parameters/clientUserIdParam' - $ref: '#/components/parameters/log' - $ref: '#/components/parameters/pwd' - $ref: '#/components/parameters/includeAuthorizedClientsParam' responses: '200': description: Successful operation content: application/json: schema: $ref: '#/components/schemas/User' '401': description: Not Authenticated content: {} security: - bearerAuth: [] - curedao_oauth2: - basic /v3/users: get: tags: - user summary: Get users who shared data description: Returns users who have granted access to their data operationId: getUsers parameters: - $ref: '#/components/parameters/userIdParam' - $ref: '#/components/parameters/createdAtParam' - $ref: '#/components/parameters/updatedAtParam' - $ref: '#/components/parameters/limitParam' - $ref: '#/components/parameters/offsetParam' - $ref: '#/components/parameters/sortParam' - $ref: '#/components/parameters/clientIdParam' - $ref: '#/components/parameters/appVersionParam' - $ref: '#/components/parameters/clientUserIdParam' - $ref: '#/components/parameters/log' - $ref: '#/components/parameters/pwd' responses: '200': description: Successful operation content: application/json: schema: $ref: '#/components/schemas/UsersResponse' '401': description: Not Authenticated content: {} security: - bearerAuth: [] - curedao_oauth2: - basic /v3/user/delete: delete: tags: - user summary: Delete user description: Delete user account. Only the client app that created a user can delete that user. operationId: deleteUser parameters: - $ref: '#/components/parameters/clientIdParam' - name: reason in: query description: 'Ex: I hate you!' required: true schema: type: string responses: '204': description: Successful Operation content: application/json: schema: $ref: '#/components/schemas/CommonResponse' '401': description: Not Authenticated content: {} security: - bearerAuth: [] - curedao_oauth2: - writemeasurements /v3/userSettings: post: tags: - user summary: Post UserSettings description: Post UserSettings operationId: postUserSettings parameters: - $ref: '#/components/parameters/clientIdParam' requestBody: description: User settings to update content: application/json: schema: $ref: '#/components/schemas/User' required: true responses: '201': description: Successful operation content: application/json: schema: $ref: '#/components/schemas/PostUserSettingsResponse' '401': description: Not authenticated content: {} '404': description: Not found content: {} '500': description: Internal server error content: {} x-codegen-request-body-name: body /v3/userTags: post: tags: - variables summary: Post or update user tags or ingredients description: This endpoint allows users to tag foods with their ingredients. This information will then be used to infer the user intake of the different ingredients by just entering the foods. The inferred intake levels will then be used to determine the effects of different nutrients on the user during analysis. operationId: postUserTags parameters: - $ref: '#/components/parameters/userIdParam' requestBody: description: Contains the new user tag data content: application/json: schema: $ref: '#/components/schemas/UserTag' required: true responses: '201': description: Successful Operation content: application/json: schema: $ref: '#/components/schemas/CommonResponse' '401': description: Not Authenticated content: {} security: - bearerAuth: [] - curedao_oauth2: - basic x-codegen-request-body-name: body /v3/userTags/delete: delete: tags: - variables summary: Delete user tag or ingredient description: Delete previously created user tags or ingredients. operationId: deleteUserTag parameters: - $ref: '#/components/parameters/taggedVariableIdParam' - $ref: '#/components/parameters/tagVariableIdParam' responses: '204': description: Successful Operation content: application/json: schema: $ref: '#/components/schemas/CommonResponse' '401': description: Not Authenticated content: {} security: - bearerAuth: [] - curedao_oauth2: - basic /v3/userVariables/delete: delete: tags: - variables summary: Delete All Measurements For Variable description: Users can delete all of their measurements for a variable operationId: deleteUserVariable responses: '204': description: Successful operation content: {} '400': description: The received JSON was invalid or malformed content: {} '401': description: Not Authenticated content: {} '404': description: Unknown target user ID content: {} security: - bearerAuth: [] - curedao_oauth2: - basic /v3/userVariables/reset: post: tags: - variables summary: Reset user settings for a variable to defaults description: Reset user settings for a variable to defaults operationId: resetUserVariableSettings requestBody: $ref: '#/components/requestBodies/variableIdBodyParam' responses: '201': description: Successful operation content: {} '400': description: The received JSON was invalid or malformed content: {} '401': description: Not Authenticated content: {} '404': description: Unknown target user ID content: {} security: - bearerAuth: [] - curedao_oauth2: - basic /v3/variableCategories: get: tags: - variables summary: Variable categories description: 'The variable categories include Activity, Causes of Illness, Cognitive Performance, Conditions, Environment, Foods, Location, Miscellaneous, Mood, Nutrition, Physical Activity, Physique, Sleep, Social Interactions, Symptoms, Treatments, Vital Signs, and Goals.' operationId: getVariableCategories responses: '200': description: Successful operation content: application/json: schema: type: array items: $ref: '#/components/schemas/VariableCategory' '401': description: Not Authenticated content: {} security: - bearerAuth: [] - curedao_oauth2: - basic /v3/votes: post: tags: - studies summary: Post or update vote description: 'I am really good at finding correlations and even compensating for various onset delays and durations of action. However, you are much better than me at knowing if there''s a way that a given factor could plausibly influence an outcome. You can help me learn and get better at my predictions by pressing the thumbs down button for relationships that you think are coincidences and thumbs up once that make logic sense.' operationId: postVote parameters: - $ref: '#/components/parameters/userIdParam' requestBody: description: 'Contains the cause variable, effect variable, and vote value.' content: application/json: schema: $ref: '#/components/schemas/Vote' required: true responses: '201': description: Successful Operation content: application/json: schema: $ref: '#/components/schemas/CommonResponse' '401': description: Not Authenticated content: {} security: - bearerAuth: [] - curedao_oauth2: - basic x-codegen-request-body-name: body /v3/votes/delete: delete: tags: - studies summary: Delete vote description: Delete previously posted vote operationId: deleteVote parameters: - $ref: '#/components/parameters/userIdParam' responses: '204': description: Successful Operation content: application/json: schema: $ref: '#/components/schemas/CommonResponse' '401': description: Not Authenticated content: {} security: - bearerAuth: [] - curedao_oauth2: - basic x-codegen-request-body-name: body /v4/study: get: tags: - studies summary: Get Study description: Get Study operationId: getStudy parameters: - $ref: '#/components/parameters/causeVariableNameParam' - $ref: '#/components/parameters/effectVariableNameParam' - $ref: '#/components/parameters/userIdParam' - $ref: '#/components/parameters/clientIdParam' - $ref: '#/components/parameters/includeChartsParam' - $ref: '#/components/parameters/recalculate' - $ref: '#/components/parameters/studyClientIdParam' responses: '200': description: Successful operation content: application/json: schema: $ref: '#/components/schemas/Study' '401': description: Successful operation content: application/json: schema: $ref: '#/components/schemas/JsonErrorResponse' '404': description: Not found content: {} '500': description: Internal server error content: {} security: - bearerAuth: [] - curedao_oauth2: - basic components: schemas: AppSettings: type: object properties: additionalSettings: type: object properties: {} appDescription: type: string appDesign: type: object properties: {} appDisplayName: type: string appStatus: type: object properties: {} appType: type: string buildEnabled: type: string clientId: type: string description: 'Get yours at https:://builder.curedao.org' clientSecret: type: string description: 'Get yours at https:://builder.curedao.org' collaborators: type: array items: $ref: '#/components/schemas/User' createdAt: type: string userId: type: integer description: User id of the owner of the application format: int32 users: type: array items: $ref: '#/components/schemas/User' redirectUri: type: string companyName: type: string homepageUrl: type: string iconUrl: type: string longDescription: type: string splashScreen: type: string textLogo: type: string AppSettingsResponse: required: - description - summary type: object properties: appSettings: $ref: '#/components/schemas/AppSettings' description: type: string description: Can be used as body of help info popup summary: type: string description: Can be used as title in help info popup errors: type: array description: Array of error objects with message property items: $ref: '#/components/schemas/ErrorResponse' status: type: string description: ex. OK or ERROR success: type: boolean description: true or false code: type: number description: Response code such as 200 link: type: string description: A super neat url you might want to share with your users! card: $ref: '#/components/schemas/Card' AuthorizedClients: required: - apps - individuals - studies type: object properties: apps: type: array description: Applications with access to user measurements for all variables items: $ref: '#/components/schemas/AppSettings' individuals: type: array description: Individuals such as physicians or family members with access to user measurements for all variables items: $ref: '#/components/schemas/AppSettings' studies: type: array description: Studies with access to generally anonymous user measurements for a specific predictor and outcome variable items: $ref: '#/components/schemas/AppSettings' Button: required: - link - text type: object properties: accessibilityText: type: string description: 'Ex: connect' action: type: object properties: {} description: Action data additionalInformation: type: string description: 'Ex: connect' color: type: string description: 'Ex: #f2f2f2' confirmationText: type: string description: Text to show user before executing functionName functionName: type: string description: Name of function to call parameters: type: object properties: {} description: Data to provide to functionName or be copied to the card parameters when button is clicked and card is posted to the API html: type: string description: 'Ex: connect' id: type: string description: HTML element id image: type: string description: 'Ex: https://image.jpg' ionIcon: type: string description: 'Ex: ion-refresh' link: type: string description: 'Ex: https://local.curedao.org' stateName: type: string description: State to go to stateParams: type: object properties: {} description: Data to provide to the state successToastText: type: string description: Text to show user after executing functionName successAlertTitle: type: string description: Text to show user after executing functionName successAlertBody: type: string description: Text to show user after executing functionName text: type: string description: 'Ex: Connect' tooltip: type: string description: 'Ex: This is a tooltip' webhookUrl: type: string description: Post here on button click Card: required: - id type: object properties: actionSheetButtons: type: array items: $ref: '#/components/schemas/Button' avatar: type: string description: Smaller square image avatarCircular: type: string description: Smaller circular image backgroundColor: type: string description: 'Ex: #f2f2f2' buttons: type: array items: $ref: '#/components/schemas/Button' buttonsSecondary: type: array items: $ref: '#/components/schemas/Button' content: type: string description: 'Ex: Content' headerTitle: type: string description: 'Ex: Title' html: type: string description: HTML for the entire card. htmlContent: type: string description: 'Ex:
'
lastSuccessfulUpdatedAt:
type: string
description: 'Ex: 2017-07-31 10:10:34 UTC ISO 8601 YYYY-MM-DDThh:mm:ss'
lastUpdate:
type: integer
description: Epoch timestamp of last sync
linkedDisplayNameHtml:
type: string
description: 'Ex: CureDAO'
longDescription:
type: string
description: 'Ex: CureDAO is a Chrome extension, Android app, iOS app, and web app that allows you to easily track mood, symptoms, or any outcome you want to optimize in a fraction of a second. You can also import your data from over 30 other apps and devices like Fitbit, Rescuetime, Jawbone Up, Withings, Facebook, GitHub, Google Calendar, Runkeeper, MoodPanda, Slice, Google Fit, and more. CureDAO then analyzes your data to identify which hidden factors are most likely to be influencing your mood or symptoms and their optimal daily values.'
message:
type: string
description: 'Ex: Got 412 new measurements on 2017-07-31 10:10:34'
mobileConnectMethod:
type: string
description: 'Mobile connect method: webview, cordova, google, spreadsheet, or ip'
name:
type: string
description: 'Ex: curedao'
platforms:
type: array
description: 'Platforms (chrome, android, ios, web) that you can connect on.'
items:
type: string
premium:
type: boolean
description: True if connection requires upgrade
scopes:
type: array
description: Required connector scopes
items:
type: string
shortDescription:
type: string
description: 'Ex: Tracks anything'
spreadsheetUploadLink:
type: string
description: URL to POST a spreadsheet to (if available for this data source)
totalMeasurementsInLastUpdate:
type: integer
description: Number of measurements obtained during latest update
updatedAt:
type: string
description: 'Ex: 2017-07-31 10:10:34 UTC ISO 8601 YYYY-MM-DDThh:mm:ss'
updateRequestedAt:
type: string
description: 'Ex: 2017-07-18 05:16:31 UTC ISO 8601 YYYY-MM-DDThh:mm:ss'
updateStatus:
type: string
description: 'Ex: UPDATED'
userId:
type: integer
description: 'Ex: 230'
DeviceToken:
required:
- deviceToken
- platform
type: object
properties:
clientId:
type: string
description: Client id
platform:
type: string
description: 'ios, android, or web'
deviceToken:
type: string
description: The device token
ErrorResponse:
required:
- message
type: object
properties:
message:
type: string
description: Error message
Explanation:
required:
- description
- image
- ionIcon
- startTracking
- title
type: object
properties:
description:
type: string
description: 'Ex: These factors are most predictive of Overall Mood based on your own data.'
image:
$ref: '#/components/schemas/Image'
ionIcon:
type: string
description: 'Ex: ion-ios-person'
startTracking:
$ref: '#/components/schemas/ExplanationStartTracking'
title:
type: string
description: 'Ex: Top Predictors of Overall Mood'
html:
type: string
description: Embeddable list of study summaries with explanation at the top
ExplanationStartTracking:
required:
- button
- description
- title
type: object
properties:
button:
$ref: '#/components/schemas/Button'
description:
type: string
description: 'Ex: The more data I have the more accurate your results will be so track regularly!'
title:
type: string
description: 'Ex: Improve Accuracy'
InputField:
required:
- displayName
- type
type: object
properties:
displayName:
type: string
helpText:
type: string
hint:
type: string
icon:
type: string
id:
type: string
description: HTML element id
image:
type: string
key:
type: string
labelLeft:
type: string
labelRight:
type: string
link:
type: string
maxLength:
type: integer
maxValue:
type: number
minLength:
type: integer
minValue:
type: number
options:
type: array
description: Selector list options
items:
type: string
placeholder:
type: string
description: 'Ex: Title'
postUrl:
type: string
required:
type: boolean
show:
type: boolean
description: 'Ex: Title'
submitButton:
$ref: '#/components/schemas/Button'
type:
type: string
description: 'Ex: Title'
enum:
- check_box
- date
- email
- number
- postal_code
- select_option
- string
- switch
- text_area
- unit
- variable_category
validationPattern:
type: string
description: 'See https://html5pattern.com/ for examples'
value:
type: string
GetConnectorsResponse:
required:
- description
- summary
type: object
properties:
connectors:
type: array
items:
$ref: '#/components/schemas/DataSource'
description:
type: string
description: Can be used as body of help info popup
summary:
type: string
description: Can be used as title in help info popup
errors:
type: array
description: Array of error objects with message property
items:
$ref: '#/components/schemas/ErrorResponse'
status:
type: string
description: ex. OK or ERROR
success:
type: boolean
description: true or false
code:
type: number
description: Response code such as 200
link:
type: string
description: A super neat url you might want to share with your users!
card:
$ref: '#/components/schemas/Card'
GetCorrelationsDataResponse:
required:
- correlations
- explanation
type: object
properties:
correlations:
type: array
items:
$ref: '#/components/schemas/Correlation'
explanation:
$ref: '#/components/schemas/Explanation'
description:
type: string
description: Can be used as body of help info popup
summary:
type: string
description: Can be used as title in help info popup
errors:
type: array
description: Array of error objects with message property
items:
$ref: '#/components/schemas/ErrorResponse'
status:
type: string
description: ex. OK or ERROR
success:
type: boolean
description: true or false
code:
type: number
description: Response code such as 200
link:
type: string
description: A super neat url you might want to share with your users!
card:
$ref: '#/components/schemas/Card'
GetCorrelationsResponse:
required:
- description
- summary
type: object
properties:
data:
$ref: '#/components/schemas/GetCorrelationsDataResponse'
description:
type: string
description: Can be used as body of help info popup
summary:
type: string
description: Can be used as title in help info popup
avatar:
type: string
description: Square icon png url
errors:
type: array
description: Array of error objects with message property
items:
$ref: '#/components/schemas/ErrorResponse'
status:
type: string
description: ex. OK or ERROR
success:
type: boolean
description: true or false
code:
type: number
description: Response code such as 200
link:
type: string
description: A super neat url you might want to share with your users!
card:
$ref: '#/components/schemas/Card'
GetStudiesResponse:
required:
- description
- summary
type: object
properties:
studies:
type: array
items:
$ref: '#/components/schemas/Study'
description:
type: string
description: 'Ex: These factors are most predictive of Overall Mood based on your own data.'
summary:
type: string
description: Can be used as title in help info popup
image:
$ref: '#/components/schemas/Image'
avatar:
type: string
description: Square icon png url
ionIcon:
type: string
description: 'Ex: ion-ios-person'
startTracking:
$ref: '#/components/schemas/ExplanationStartTracking'
title:
type: string
description: 'Ex: Top Predictors of Overall Mood'
html:
type: string
description: Embeddable list of study summaries with explanation at the top
GetSharesResponse:
required:
- description
- summary
type: object
properties:
authorizedClients:
$ref: '#/components/schemas/AuthorizedClients'
description:
type: string
description: Can be used as body of help info popup
summary:
type: string
description: Can be used as title in help info popup
errors:
type: array
description: Array of error objects with message property
items:
$ref: '#/components/schemas/ErrorResponse'
status:
type: string
description: ex. OK or ERROR
success:
type: boolean
description: true or false
code:
type: number
description: Response code such as 200
link:
type: string
description: A super neat url you might want to share with your users!
card:
$ref: '#/components/schemas/Card'
FeedResponse:
required:
- cards
- description
- summary
type: object
properties:
cards:
type: array
items:
$ref: '#/components/schemas/Card'
description:
type: string
description: 'Tracking reminder notifications, messages, and study result cards that can be displayed in user feed or stream'
summary:
type: string
description: 'Tracking reminder notifications, messages, and study results'
errors:
type: array
description: Array of error objects with message property
items:
$ref: '#/components/schemas/ErrorResponse'
status:
type: string
description: ex. OK or ERROR
success:
type: boolean
description: true or false
code:
type: number
description: Response code such as 200
link:
type: string
description: A super neat url you might want to share with your users!
card:
$ref: '#/components/schemas/Card'
GetTrackingReminderNotificationsResponse:
required:
- description
- summary
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/TrackingReminderNotification'
description:
type: string
description: Can be used as body of help info popup
summary:
type: string
description: Can be used as title in help info popup
errors:
type: array
description: Array of error objects with message property
items:
$ref: '#/components/schemas/ErrorResponse'
status:
type: string
description: ex. OK or ERROR
success:
type: boolean
description: true or false
code:
type: number
description: Response code such as 200
link:
type: string
description: A super neat url you might want to share with your users!
card:
$ref: '#/components/schemas/Card'
Image:
required:
- height
- imageUrl
- width
type: object
properties:
height:
type: string
description: 'Ex: 240'
imageUrl:
type: string
description: 'Ex: https://www.filepicker.io/api/file/TjmeNWS5Q2SFmtJlUGLf'
width:
type: string
description: 'Ex: 224'
JsonErrorResponse:
required:
- status
type: object
properties:
message:
type: string
description: Error message
description:
type: string
description: Can be used as body of help info popup
summary:
type: string
description: Can be used as title in help info popup
errors:
type: array
description: Array of error objects with message property
items:
$ref: '#/components/schemas/ErrorResponse'
status:
type: string
description: ex. OK or ERROR
success:
type: boolean
description: true or false
code:
type: number
description: Response code such as 200
link:
type: string
description: A super neat url you might want to share with your users!
card:
$ref: '#/components/schemas/Card'
Measurement:
required:
- sourceName
- startTimeString
- unitAbbreviatedName
- value
- variableName
type: object
properties:
card:
$ref: '#/components/schemas/Card'
clientId:
type: string
description: 'Ex: curedao'
connectorId:
type: integer
description: 'Ex: 13'
createdAt:
type: string
description: 'Ex: 2017-07-30 21:08:36'
displayValueAndUnitString:
type: string
description: 'Examples: 3/5, $10, or 1 count'
iconIcon:
type: string
description: 'Ex: ion-sad-outline'
id:
type: integer
description: 'Ex: 1051466127'
inputType:
type: string
description: 'Ex: value'
ionIcon:
type: string
description: 'Ex: ion-ios-medkit-outline'
manualTracking:
type: boolean
description: 'Ex: 1'
maximumAllowedValue:
type: number
description: 'Ex: 5. Unit: User-specified or common.'
format: double
minimumAllowedValue:
type: number
description: 'Ex: 1. Unit: User-specified or common.'
format: double
note:
type: string
description: Note of measurement
noteObject:
type: object
properties: {}
description: Additional meta data for the measurement
noteHtml:
type: object
properties: {}
description: Embeddable HTML with message hyperlinked with associated url
originalUnitId:
type: integer
description: 'Ex: 23'
originalValue:
type: number
description: 'Original value submitted. Unit: Originally submitted.'
format: double
pngPath:
type: string
description: 'Ex: img/variable_categories/treatments.png'
pngUrl:
type: string
description: 'Ex: https://app.curedao.org/img/variable_categories/treatments.png'
productUrl:
type: string
description: Link to associated product for purchase
sourceName:
type: string
description: Application or device used to record the measurement values
startDate:
type: string
description: 'Ex: 2014-08-27'
startTimeEpoch:
type: integer
description: Seconds between the start of the event measured and 1970 (Unix timestamp)
startTimeString:
type: string
description: 'Start Time for the measurement event in UTC ISO 8601 YYYY-MM-DDThh:mm:ss'
svgUrl:
type: string
description: 'Ex: https://app.curedao.org/img/variable_categories/treatments.svg'
unitAbbreviatedName:
type: string
description: Abbreviated name for the unit of measurement
unitCategoryId:
type: integer
description: 'Ex: 6'
unitCategoryName:
type: string
description: 'Ex: Miscellany'
unitId:
type: integer
description: 'Ex: 23'
unitName:
type: string
description: 'Ex: Count'
updatedAt:
type: string
description: 'Ex: 2017-07-30 21:08:36'
url:
type: string
description: 'Link to associated Facebook like or GitHub commit, for instance'
userVariableUnitAbbreviatedName:
type: string
description: 'Ex: count'
userVariableUnitCategoryId:
type: integer
description: 'Ex: 6'
userVariableUnitCategoryName:
type: string
description: 'Ex: Miscellany'
userVariableUnitId:
type: integer
description: 'Ex: 23'
userVariableUnitName:
type: string
description: 'Ex: Count'
userVariableVariableCategoryId:
type: integer
description: 'Ex: 13'
userVariableVariableCategoryName:
type: string
description: 'Ex: Treatments'
valence:
type: string
description: 'Valence indicates what type of buttons should be used when recording measurements for this variable. positive - Face buttons with the happiest face equating to a 5/5 rating where higher is better like Overall Mood. negative - Face buttons with the happiest face equating to a 1/5 rating where lower is better like Headache Severity. numeric - Just 1 to 5 numeric buttons for neutral variables. '
value:
type: number
description: Converted measurement value in requested unit
format: double
variableCategoryId:
type: integer
description: 'Ex: 13'
variableCategoryImageUrl:
type: string
description: 'Ex: https://static.quantimo.do/img/variable_categories/pill-96.png'
variableCategoryName:
type: string
description: 'Ex: Emotions, Treatments, Symptoms...'
enum:
- Activity
- Books
- Causes of Illness
- Cognitive Performance
- Conditions
- Emotions
- Environment
- Foods
- Goals
- Locations
- Miscellaneous
- Movies and TV
- Music
- Nutrients
- Payments
- Physical Activities
- Physique
- Sleep
- Social Interactions
- Software
- Symptoms
- Treatments
- Vital Signs
variableDescription:
type: string
description: 'Valence indicates what type of buttons should be used when recording measurements for this variable. positive - Face buttons with the happiest face equating to a 5/5 rating where higher is better like Overall Mood. negative - Face buttons with the happiest face equating to a 1/5 rating where lower is better like Headache Severity. numeric - Just 1 to 5 numeric buttons for neutral variables. '
variableId:
type: integer
description: 'Ex: 5956846'
variableName:
type: string
description: Name of the variable for which we are creating the measurement records
displayName:
type: string
description: 'Ex: Trader Joe''s Bedtime Tea'
MeasurementItem:
required:
- timestamp
- value
type: object
properties:
note:
type: string
description: Optional note to include with the measurement
timestamp:
type: integer
description: Timestamp for the measurement event in epoch time (unixtime)
format: int64
value:
type: number
description: Measurement value
format: double
MeasurementSet:
required:
- measurementItems
- sourceName
- unitAbbreviatedName
- variableName
type: object
properties:
combinationOperation:
type: string
description: 'Way to aggregate measurements over time. SUM should be used for things like minutes of exercise. If you use MEAN for exercise, then a person might exercise more minutes in one day but add separate measurements that were smaller. So when we are doing correlational analysis, we would think that the person exercised less that day even though they exercised more. Conversely, we must use MEAN for things such as ratings which cannot be SUMMED.'
enum:
- MEAN
- SUM
measurementItems:
type: array
description: 'Array of timestamps, values, and optional notes'
items:
$ref: '#/components/schemas/MeasurementItem'
sourceName:
type: string
description: Name of the application or device used to record the measurement values
unitAbbreviatedName:
type: string
description: Unit of measurement
variableCategoryName:
type: string
description: 'Ex: Emotions, Treatments, Symptoms...'
enum:
- Activity
- Books
- Causes of Illness
- Cognitive Performance
- Conditions
- Emotions
- Environment
- Foods
- Goals
- Locations
- Miscellaneous
- Movies and TV
- Music
- Nutrients
- Payments
- Physical Activities
- Physique
- Sleep
- Social Interactions
- Software
- Symptoms
- Treatments
- Vital Signs
variableName:
type: string
description: ORIGINAL name of the variable for which we are creating the measurement records
upc:
type: string
description: UPC or other barcode scan result
MeasurementUpdate:
required:
- id
type: object
properties:
id:
type: integer
description: Variable id of the measurement to be updated
note:
type: string
description: The new note for the measurement (optional)
startTime:
type: integer
description: The new timestamp for the the event in epoch seconds (optional)
value:
type: number
description: The new value of for the measurement (optional)
format: double
Pair:
required:
- causeMeasurement
- causeMeasurementValue
- causeVariableUnitAbbreviatedName
- effectMeasurement
- effectMeasurementValue
- effectVariableUnitAbbreviatedName
- timestamp
type: object
properties:
causeMeasurement:
type: number
description: 'Ex: 101341.66666667'
format: double
causeMeasurementValue:
type: number
description: 'Ex: 101341.66666667'
format: double
causeVariableUnitAbbreviatedName:
type: string
description: 'Ex: mg'
effectMeasurement:
type: number
description: 'Ex: 7.98'
format: double
effectMeasurementValue:
type: number
description: 'Ex: 7.98'
format: double
effectVariableUnitAbbreviatedName:
type: string
description: 'Ex: %'
eventAt:
type: string
description: 'Ex: 2015-08-06 15:49:02 UTC ISO 8601 YYYY-MM-DDThh:mm:ss'
eventAtUnixTime:
type: integer
description: 'Ex: 1438876142'
startTimeString:
type: string
description: 'Ex: 2015-08-06 15:49:02 UTC ISO 8601 YYYY-MM-DDThh:mm:ss'
timestamp:
type: integer
description: 'Ex: 1464937200'
ParticipantInstruction:
type: object
properties:
instructionsForCauseVariable:
type: string
description: 'Ex: Obtain Fitbit and use it to record your Sleep Duration. Once you have a Fitbit account, connect your Fitbit account at CureDAO to automatically import and analyze your data.'
instructionsForEffectVariable:
type: string
description: 'Ex: Obtain CureDAO and use it to record your Overall Mood. Once you have a CureDAO account, connect your CureDAO account at CureDAO to automatically import and analyze your data.'
PostMeasurementsDataResponse:
type: object
properties:
userVariables:
type: array
items:
$ref: '#/components/schemas/Variable'
description:
type: string
description: Can be used as body of help info popup
summary:
type: string
description: Can be used as title in help info popup
errors:
type: array
description: Array of error objects with message property
items:
$ref: '#/components/schemas/ErrorResponse'
status:
type: string
description: ex. OK or ERROR
success:
type: boolean
description: true or false
code:
type: number
description: Response code such as 200
link:
type: string
description: A super neat url you might want to share with your users!
card:
$ref: '#/components/schemas/Card'
PostMeasurementsResponse:
required:
- status
- success
type: object
properties:
data:
$ref: '#/components/schemas/PostMeasurementsDataResponse'
message:
type: string
description: Message
description:
type: string
description: Can be used as body of help info popup
summary:
type: string
description: Can be used as title in help info popup
errors:
type: array
description: Array of error objects with message property
items:
$ref: '#/components/schemas/ErrorResponse'
status:
type: string
description: ex. OK or ERROR
success:
type: boolean
description: true or false
code:
type: number
description: Response code such as 200
link:
type: string
description: A super neat url you might want to share with your users!
card:
$ref: '#/components/schemas/Card'
PostStudyPublishResponse:
type: object
properties:
description:
type: string
description: Can be used as body of help info popup
summary:
type: string
description: Can be used as title in help info popup
errors:
type: array
description: Array of error objects with message property
items:
$ref: '#/components/schemas/ErrorResponse'
status:
type: string
description: ex. OK or ERROR
success:
type: boolean
description: true or false
code:
type: number
description: Response code such as 200
link:
type: string
description: A super neat url you might want to share with your users!
card:
$ref: '#/components/schemas/Card'
PostStudyCreateResponse:
type: object
properties:
study:
$ref: '#/components/schemas/Study'
description:
type: string
description: Can be used as body of help info popup
summary:
type: string
description: Can be used as title in help info popup
errors:
type: array
description: Array of error objects with message property
items:
$ref: '#/components/schemas/ErrorResponse'
status:
type: string
description: ex. OK or ERROR
success:
type: boolean
description: true or false
code:
type: number
description: Response code such as 200
link:
type: string
description: A super neat url you might want to share with your users!
card:
$ref: '#/components/schemas/Card'
PostTrackingRemindersDataResponse:
type: object
properties:
trackingReminderNotifications:
type: array
items:
$ref: '#/components/schemas/TrackingReminderNotification'
trackingReminders:
type: array
items:
$ref: '#/components/schemas/TrackingReminder'
userVariables:
type: array
items:
$ref: '#/components/schemas/Variable'
description:
type: string
description: Can be used as body of help info popup
summary:
type: string
description: Can be used as title in help info popup
errors:
type: array
description: Array of error objects with message property
items:
$ref: '#/components/schemas/ErrorResponse'
status:
type: string
description: ex. OK or ERROR
success:
type: boolean
description: true or false
code:
type: number
description: Response code such as 200
link:
type: string
description: A super neat url you might want to share with your users!
card:
$ref: '#/components/schemas/Card'
PostTrackingRemindersResponse:
required:
- status
- success
type: object
properties:
data:
$ref: '#/components/schemas/PostTrackingRemindersDataResponse'
message:
type: string
description: Message
description:
type: string
description: Can be used as body of help info popup
summary:
type: string
description: Can be used as title in help info popup
errors:
type: array
description: Array of error objects with message property
items:
$ref: '#/components/schemas/ErrorResponse'
status:
type: string
description: ex. OK or ERROR
success:
type: boolean
description: true or false
code:
type: number
description: Response code such as 200
link:
type: string
description: A super neat url you might want to share with your users!
card:
$ref: '#/components/schemas/Card'
PostUserSettingsDataResponse:
type: object
properties:
purchaseId:
type: integer
description: 'Ex: 1'
description:
type: string
description: Can be used as body of help info popup
summary:
type: string
description: Can be used as title in help info popup
errors:
type: array
description: Array of error objects with message property
items:
$ref: '#/components/schemas/ErrorResponse'
status:
type: string
description: ex. OK or ERROR
success:
type: boolean
description: true or false
code:
type: number
description: Response code such as 200
link:
type: string
description: A super neat url you might want to share with your users!
card:
$ref: '#/components/schemas/Card'
PostUserSettingsResponse:
required:
- status
- success
type: object
properties:
data:
$ref: '#/components/schemas/PostUserSettingsDataResponse'
message:
type: string
description: Message
description:
type: string
description: Can be used as body of help info popup
summary:
type: string
description: Can be used as title in help info popup
errors:
type: array
description: Array of error objects with message property
items:
$ref: '#/components/schemas/ErrorResponse'
status:
type: string
description: ex. OK or ERROR
success:
type: boolean
description: true or false
code:
type: number
description: Response code such as 200
link:
type: string
description: A super neat url you might want to share with your users!
card:
$ref: '#/components/schemas/Card'
ShareInvitationBody:
required:
- emailAddress
type: object
properties:
emailAddress:
type: string
description: 'Enter the email address of the friend, family member, or health-care provider that you would like to give access to your measurements'
name:
type: string
description: Name of the individual that the user wishes to have access to their measurements
emailSubject:
type: string
description: 'Ex: I would like to share my measurements with you!'
emailBody:
type: string
description: 'Ex: I would like to share my data with you so you can help me identify find discover hidden causes of and new treatments for my illness.'
scopes:
type: string
description: 'Space separated list of scopes to grant to the recipient (i.e. readmeasurements, writemeasurements, measurements:read'
Study:
required:
- type
type: object
properties:
type:
type: string
description: 'Ex: population, cohort, or individual'
userId:
type: integer
description: The user id of the principal investigator or subject if an individual studies
format: int32
id:
type: string
description: ID of the cohort study which is necessary to allow participants to join
causeVariable:
$ref: '#/components/schemas/Variable'
causeVariableName:
type: string
description: 'Ex: Sleep Quality'
studyCharts:
$ref: '#/components/schemas/StudyCharts'
effectVariable:
$ref: '#/components/schemas/Variable'
effectVariableName:
type: string
description: 'Ex: Overall Mood'
participantInstructions:
$ref: '#/components/schemas/ParticipantInstruction'
statistics:
$ref: '#/components/schemas/Correlation'
studyCard:
$ref: '#/components/schemas/Card'
studyHtml:
$ref: '#/components/schemas/StudyHtml'
studyImages:
$ref: '#/components/schemas/StudyImages'
studyLinks:
$ref: '#/components/schemas/StudyLinks'
studySharing:
$ref: '#/components/schemas/StudySharing'
studyText:
$ref: '#/components/schemas/StudyText'
studyVotes:
$ref: '#/components/schemas/StudyVotes'
joined:
type: boolean
description: True if you are sharing your data with this study
description: A study analyzes the relationship between a predictor variable like gluten-intake and an outcome of interest such as overall mood.
StudyCharts:
type: object
properties:
populationTraitScatterPlot:
$ref: '#/components/schemas/Chart'
outcomeDistributionColumnChart:
$ref: '#/components/schemas/Chart'
predictorDistributionColumnChart:
$ref: '#/components/schemas/Chart'
correlationScatterPlot:
$ref: '#/components/schemas/Chart'
pairsOverTimeLineChart:
$ref: '#/components/schemas/Chart'
description: An object with various chart properties each property contain and svg and Highcharts configuration
StudyCreationBody:
required:
- causeVariableName
- effectVariableName
- type
type: object
properties:
causeVariableName:
type: string
description: Name of predictor variable
effectVariableName:
type: string
description: Name of the outcome variable
studyTitle:
type: string
description: Title of your study (optional)
type:
type: string
description: Individual studies are based on data of a single user. Group studies are based on data from a specific group of individuals who have joined. Global studies are based on aggregated and anonymously shared data from all users.
enum:
- individual
- group
- global
StudyHtml:
required:
- chartHtml
- fullStudyHtml
type: object
properties:
chartHtml:
type: string
description: Embeddable chart html
downloadButtonsHtml:
type: string
description: 'Play Store, App Store, Chrome Web Store'
fullPageWithHead:
type: string
description: 'Embeddable study including HTML head section charts. Modifiable css classes are study-title, study-section-header, study-section-body'
fullStudyHtml:
type: string
description: 'Embeddable study text html including charts. Modifiable css classes are study-title, study-section-header, study-section-body'
fullStudyHtmlWithCssStyles:
type: string
description: Embeddable study html including charts and css styling
participantInstructionsHtml:
type: string
description: Instructions for study participation
statisticsTableHtml:
type: string
description: Embeddable table with statistics
studyAbstractHtml:
type: string
description: Text summary
studyHeaderHtml:
type: string
description: 'Title, study image, abstract with CSS styling'
studyImageHtml:
type: string
description: PNG image
studyMetaHtml:
type: string
description: 'Facebook, Twitter, Google+'
studyTextHtml:
type: string
description: Formatted study text sections
socialSharingButtonHtml:
type: string
studySummaryBoxHtml:
type: string
StudyImages:
required:
- gaugeImage
- gaugeImageSquare
- imageUrl
type: object
properties:
causeVariableImageUrl:
type: string
description: 'Ex: https://static.quantimo.do/img/variable_categories/sleeping_in_bed-96.png'
causeVariableIonIcon:
type: string
description: 'Ex: ion-ios-cloudy-night-outline'
effectVariableImageUrl:
type: string
description: 'Ex: https://static.quantimo.do/img/variable_categories/theatre_mask-96.png'
effectVariableIonIcon:
type: string
description: 'Ex: ion-happy-outline'
gaugeImage:
type: string
description: 'Ex: https://s3.amazonaws.com/curedao-docs/images/gauge-moderately-positive-relationship.png'
gaugeImageSquare:
type: string
description: 'Ex: https://s3.amazonaws.com/curedao-docs/images/gauge-moderately-positive-relationship-200-200.png'
gaugeSharingImageUrl:
type: string
description: Image with gauge and category images
imageUrl:
type: string
description: 'Ex: https://s3-us-west-1.amazonaws.com/qmimages/variable_categories_gauges_logo_background/gauge-moderately-positive-relationship_sleep_emotions_logo_background.png'
robotSharingImageUrl:
type: string
description: Image with robot and category images
avatar:
type: string
description: Avatar of the principal investigator
StudyJoinResponse:
type: object
properties:
study:
$ref: '#/components/schemas/Study'
trackingReminders:
type: array
items:
$ref: '#/components/schemas/TrackingReminder'
trackingReminderNotifications:
type: array
items:
$ref: '#/components/schemas/TrackingReminderNotification'
description:
type: string
description: Can be used as body of help info popup
summary:
type: string
description: Can be used as title in help info popup
errors:
type: array
description: Array of error objects with message property
items:
$ref: '#/components/schemas/ErrorResponse'
status:
type: string
description: ex. OK or ERROR
success:
type: boolean
description: true or false
code:
type: number
description: Response code such as 200
link:
type: string
description: A super neat url you might want to share with your users!
card:
$ref: '#/components/schemas/Card'
StudyLinks:
required:
- studyLinkDynamic
- studyLinkEmail
- studyLinkFacebook
- studyLinkGoogle
- studyLinkStatic
- studyLinkTwitter
type: object
properties:
studyJoinLink:
type: string
description: Share this link with potential study participants
studyLinkEmail:
type: string
description: 'Ex: mailto:?subject=N1%20Study%3A%20Sleep%20Quality%20Predicts%20Higher%20Overall%20Mood&body=Check%20out%20my%20study%20at%20https%3A%2F%2Flocal.curedao.org%2Fapi%2Fv2%2Fstudy%3FcauseVariableName%3DSleep%2520Quality%26effectVariableName%3DOverall%2520Mood%26userId%3D230%0A%0AHave%20a%20great%20day!'
studyLinkFacebook:
type: string
description: 'Ex: https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Flocal.curedao.org%2Fapi%2Fv2%2Fstudy%3FcauseVariableName%3DSleep%2520Quality%26effectVariableName%3DOverall%2520Mood%26userId%3D230'
studyLinkGoogle:
type: string
description: 'Ex: https://plus.google.com/share?url=https%3A%2F%2Flocal.curedao.org%2Fapi%2Fv2%2Fstudy%3FcauseVariableName%3DSleep%2520Quality%26effectVariableName%3DOverall%2520Mood%26userId%3D230'
studyLinkStatic:
type: string
description: 'Ex: https://local.curedao.org/api/v2/study?causeVariableName=Sleep%20Quality&effectVariableName=Overall%20Mood&userId=230'
studyLinkDynamic:
type: string
description: 'Ex: https://local.curedao.org/ionic/Modo/www/index.html#/app/study?causeVariableName=Sleep%20Quality&effectVariableName=Overall%20Mood&userId=230'
studyLinkTwitter:
type: string
description: 'Ex: https://twitter.com/home?status=Sleep%20Quality%20Predicts%20Higher%20Overall%20Mood%20https%3A%2F%2Flocal.curedao.org%2Fapi%2Fv2%2Fstudy%3FcauseVariableName%3DSleep%2520Quality%26effectVariableName%3DOverall%2520Mood%26userId%3D230%20%40curedao'
StudySharing:
required:
- shareUserMeasurements
- sharingDescription
- sharingTitle
type: object
properties:
shareUserMeasurements:
type: boolean
description: Would you like to make this study publicly visible?
sharingDescription:
type: string
description: 'Ex: N1 Study: Sleep Quality Predicts Higher Overall Mood'
sharingTitle:
type: string
description: 'Ex: N1 Study: Sleep Quality Predicts Higher Overall Mood'
StudyText:
required:
- studyAbstract
- studyDesign
- studyLimitations
- studyObjective
- studyResults
- studyTitle
type: object
properties:
averageEffectFollowingHighCauseExplanation:
type: string
description: 'Ex: Overall Mood is 3.55/5 (15% higher) on average after days with around 4.19/5 Sleep Quality'
averageEffectFollowingLowCauseExplanation:
type: string
description: 'Ex: Overall Mood is 2.65/5 (14% lower) on average after days with around 1.97/5 Sleep Quality'
valuePredictingHighOutcomeExplanation:
type: string
description: 'Ex: Overall Mood, on average, 17% higher after around 4.14/5 Sleep Quality'
valuePredictingLowOutcomeExplanation:
type: string
description: 'Ex: Overall Mood, on average, 11% lower after around 3.03/5 Sleep Quality'
dataAnalysis:
type: string
description: 'Ex: It was assumed that 0 hours would pass before a change in Very Distracting Time would produce an observable change in Video Activities. It was assumed that Very Distracting Time could produce an observable change in Video Activities for as much as 7 days after the stimulus event.'
dataSources:
type: string
description: 'Ex: Very Distracting Time data was primarily collected using RescueTime. Detailed reports show which applications and websites you spent time on. Activities are automatically grouped into pre-defined categories with built-in productivity scores covering thousands of websites and applications. You can customize categories and productivity scores to meet your needs.