openapi: 3.1.0 info: title: Oura Daily Activity Routes API version: '2.0' tags: - name: Daily Activity Routes paths: /v2/usercollection/daily_activity: get: tags: - Daily Activity Routes summary: Multiple Daily Activity Documents operationId: Multiple_daily_activity_Documents_v2_usercollection_daily_activity_get parameters: - name: start_date in: query required: false schema: anyOf: - type: string format: date-time - type: string format: date - type: 'null' title: Start Date - name: end_date in: query required: false schema: anyOf: - type: string format: date-time - type: string format: date - type: 'null' title: End Date - name: next_token in: query required: false schema: anyOf: - type: string - type: 'null' title: Next Token - name: fields in: query required: false schema: anyOf: - type: string - type: 'null' description: Comma-separated list of fields to include in the response, in addition to the always returned fields. Defaults to all fields if not provided. title: Fields description: Comma-separated list of fields to include in the response, in addition to the always returned fields. Defaults to all fields if not provided. responses: '200': description: Successful Response content: application/json: schema: anyOf: - $ref: '#/components/schemas/MultiDocumentResponse_PublicDailyActivity_' - $ref: '#/components/schemas/MultiDocumentResponseDict' title: Response Multiple Daily Activity Documents V2 Usercollection Daily Activity Get '400': description: Client Exception '401': description: Unauthorized access exception. Usually means the access token is expired, malformed or revoked. '403': description: Access forbidden. Usually means the user's subscription to Oura has expired and their data is not available via the API. '429': description: Request Rate Limit Exceeded. '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' security: - BearerAuth: [] - OAuth2: [] x-codeSamples: - lang: cURL label: cURL source: 'curl --location --request GET ''https://api.ouraring.com/v2/usercollection/daily_activity?start_date=2021-11-01&end_date=2021-12-01&fields=day,score'' \ --header ''Authorization: Bearer ''' - lang: Python source: "import requests \nurl = 'https://api.ouraring.com/v2/usercollection/daily_activity' \nparams={ \n 'start_date': '2021-11-01', \n 'end_date': '2021-12-01',\n 'fields': 'day,score' \n}\nheaders = { \n 'Authorization': 'Bearer ' \n}\nresponse = requests.request('GET', url, headers=headers, params=params) \nprint(response.text)" label: Python - lang: JavaScript source: "var myHeaders = new Headers(); \nmyHeaders.append('Authorization', 'Bearer '); \nvar requestOptions = { \n method: 'GET', \n headers: myHeaders, \nfetch('https://api.ouraring.com/v2/usercollection/daily_activity?start_date=2021-11-01&end_date=2021-12-01&fields=day,score', requestOptions) \n .then(response => response.text()) \n .then(result => console.log(result)) \n .catch(error => console.log('error', error));" label: JavaScript - lang: Java source: "OkHttpClient client = new OkHttpClient().newBuilder() \n .build(); \nRequest request = new Request.Builder() \n .url(\"https://api.ouraring.com/v2/usercollection/daily_activity?start_date=2021-11-01&end_date=2021-12-01&fields=day,score\") \n .method(\"GET\", null) \n .addHeader(\"Authorization\", \"Bearer \") \n .build(); \nResponse response = client.newCall(request).execute();" label: Java /v2/usercollection/daily_activity/{document_id}: get: tags: - Daily Activity Routes summary: Single Daily Activity Document operationId: Single_daily_activity_Document_v2_usercollection_daily_activity__document_id__get parameters: - name: document_id in: path required: true schema: type: string title: Document Id responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/PublicDailyActivity' '404': description: Not Found '400': description: Client Exception '401': description: Unauthorized access exception. Usually means the access token is expired, malformed or revoked. '403': description: Access forbidden. Usually means the user's subscription to Oura has expired and their data is not available via the API. '429': description: Request Rate Limit Exceeded. '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' security: - BearerAuth: [] - OAuth2: [] x-codeSamples: - lang: cURL label: cURL source: 'curl --location --request GET ''https://api.ouraring.com/v2/usercollection/daily_activity/2-5daccc095220cc5493a4e9c2b681ca941e'' \ --header ''Authorization: Bearer ''' - lang: Python source: "import requests \nurl = 'https://api.ouraring.com/v2/usercollection/daily_activity/2-5daccc095220cc5493a4e9c2b681ca941e\nheaders = { \n 'Authorization': 'Bearer ' \n}\nresponse = requests.request('GET', url, headers=headers, params=params) \nprint(response.text)" label: Python - lang: JavaScript source: "var myHeaders = new Headers(); \nmyHeaders.append('Authorization', 'Bearer '); \nvar requestOptions = { \n method: 'GET', \n headers: myHeaders, \nfetch('https://api.ouraring.com/v2/usercollection/daily_activity/2-5daccc095220cc5493a4e9c2b681ca941e', requestOptions) \n .then(response => response.text()) \n .then(result => console.log(result)) \n .catch(error => console.log('error', error));" label: JavaScript - lang: Java source: "OkHttpClient client = new OkHttpClient().newBuilder() \n .build(); \nRequest request = new Request.Builder() \n .url(\"https://api.ouraring.com/v2/usercollection/daily_activity/2-5daccc095220cc5493a4e9c2b681ca941e\") \n .method(\"GET\", null) \n .addHeader(\"Authorization\", \"Bearer \") \n .build(); \nResponse response = client.newCall(request).execute();" label: Java components: schemas: ISODate: type: string UtcDateTime: type: string LocalizedDateTime: type: string PublicActivityContributors: properties: meet_daily_targets: anyOf: - type: integer - type: 'null' title: '' description: Contribution of meeting previous 7-day daily activity targets in range [1, 100]. move_every_hour: anyOf: - type: integer - type: 'null' title: '' description: Contribution of previous 24-hour inactivity alerts in range [1, 100]. recovery_time: anyOf: - type: integer - type: 'null' title: '' description: Contribution of previous 7-day recovery time in range [1, 100]. stay_active: anyOf: - type: integer - type: 'null' title: '' description: Contribution of previous 24-hour activity in range [1, 100]. training_frequency: anyOf: - type: integer - type: 'null' title: '' description: Contribution of previous 7-day exercise frequency in range [1, 100]. training_volume: anyOf: - type: integer - type: 'null' title: '' description: Contribution of previous 7-day exercise volume in range [1, 100]. type: object title: PublicActivityContributors description: Object defining activity score contributors. ValidationError: properties: loc: items: anyOf: - type: string - type: integer type: array title: Location msg: type: string title: Message type: type: string title: Error Type type: object required: - loc - msg - type title: ValidationError HTTPValidationError: properties: detail: items: $ref: '#/components/schemas/ValidationError' type: array title: Detail type: object title: HTTPValidationError PublicDailyActivity: properties: id: type: string minLength: 1 title: '' description: Unique identifier of the object. meta: $ref: '#/components/schemas/Metadata' title: '' description: Meta data of the object. active_calories: type: integer title: '' description: Active calories expended in kilocalories. average_met_minutes: type: number title: '' description: Average MET minutes. class_5_min: anyOf: - type: string - type: 'null' title: '' description: '5-minute activity classification for the period where every character corresponds to: ''0'' = non wear ''1'' = rest ''2'' = inactive ''3'' = low activity ''4'' = medium activity ''5'' = high activity Example: "001233334555524001".' contributors: $ref: '#/components/schemas/PublicActivityContributors' title: '' description: Object containing activity score contributors. day: $ref: '#/components/schemas/ISODate' title: '' description: Day that the daily activity belong to. equivalent_walking_distance: type: integer title: '' description: Equivalent walking distance of energe expenditure in meters. high_activity_met_minutes: type: integer title: '' description: The total METs of each minute classified as high activity. high_activity_time: type: integer title: '' description: The total time in seconds of each minute classified as high activity. inactivity_alerts: type: integer title: '' description: Number of inactivity alerts received. low_activity_met_minutes: type: integer title: '' description: The total METs of each minute classified as low activity. low_activity_time: type: integer title: '' description: The total time in seconds of each minute classified as low activity. medium_activity_met_minutes: type: integer title: '' description: The total METs of each minute classified as medium activity. medium_activity_time: type: integer title: '' description: The total time in seconds of each minute classified as medium activity. met: $ref: '#/components/schemas/PublicSample' title: '' description: Sample containing METs. meters_to_target: type: integer title: '' description: Meters remaining to target. non_wear_time: type: integer title: '' description: Ring non-wear time in seconds. resting_time: type: integer title: '' description: Resting time in seconds. score: anyOf: - type: integer - type: 'null' title: '' description: Activity score in range [1, 100]. sedentary_met_minutes: type: integer title: '' description: Sedentary MET minutes. sedentary_time: type: integer title: '' description: Sedentary time in seconds. steps: type: integer title: '' description: Total number of steps taken. target_calories: type: integer title: '' description: Daily activity target in kilocalories. target_meters: type: integer title: '' description: Daily activity target in meters. timestamp: $ref: '#/components/schemas/LocalizedDateTime' title: '' description: Timestamp of the daily activity. total_calories: type: integer title: '' description: Total calories expended in kilocalories. type: object required: - id - meta - active_calories - average_met_minutes - contributors - day - equivalent_walking_distance - high_activity_met_minutes - high_activity_time - inactivity_alerts - low_activity_met_minutes - low_activity_time - medium_activity_met_minutes - medium_activity_time - met - meters_to_target - non_wear_time - resting_time - sedentary_met_minutes - sedentary_time - steps - target_calories - target_meters - timestamp - total_calories title: PublicDailyActivity description: Object defining a daily activity that is a 24-hour period starting at 4 a.m. x-cloud-only: true x-collection: publicdailyactivity x-owner: movement-squad MultiDocumentResponse_PublicDailyActivity_: properties: data: items: $ref: '#/components/schemas/PublicDailyActivity' type: array title: Data next_token: anyOf: - type: string - type: 'null' title: Next Token type: object required: - data - next_token title: MultiDocumentResponse[PublicDailyActivity] PublicSample: properties: interval: type: number title: '' description: Interval in seconds between the sampled items. items: $ref: '#/components/schemas/Array_Union_float__NoneType__Bits64_' title: '' description: Recorded sample items. timestamp: $ref: '#/components/schemas/LocalizedDateTime' title: '' description: Timestamp when the sample recording started. type: object required: - interval - items - timestamp title: PublicSample description: Object defining a recorded sample. Array_Union_float__NoneType__Bits64_: items: anyOf: - type: number - type: 'null' type: array title: ArrayNullableFloatBits64 Metadata: properties: updated_at: $ref: '#/components/schemas/UtcDateTime' title: '' description: Timestamp indicating when the object was last updated. version: type: integer title: '' description: Version number of the object. type: object required: - updated_at - version title: Metadata description: Object defining the metadata of a collection model instance. MultiDocumentResponseDict: properties: data: items: additionalProperties: true type: object type: array title: Data next_token: anyOf: - type: string - type: 'null' title: Next Token type: object required: - data - next_token title: MultiDocumentResponseDict