forked from jarhot1992/Remote-ADB
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathouri api-1.11.json
More file actions
1 lines (1 loc) · 104 KB
/
Copy pathouri api-1.11.json
File metadata and controls
1 lines (1 loc) · 104 KB
1
{"openapi":"3.0.2","info":{"title":"Oura API Documentation","description":"# Overview \n\nThe Oura API allows Oura users and partner applications to improve their user experience with Oura data.\n\nThis document describes the Oura API Version 2 (V2), which supports access to the latest Oura Ring data types.\n For access to other data types—which have not yet migrated to V2—refer to the [Oura API Version 1 (V1)](https://cloud.ouraring.com/docs/) documentation.\n\n# Data Access\n\nIndividual Oura users can access their own data through the API by using a [Personal Access Token](https://cloud.ouraring.com/personal-access-tokens).\n\nIf you want to retrieve data for multiple users, a registered [API Application](https://cloud.ouraring.com/oauth/applications) is required.\n API Applications are limited to **10** users before requiring approval from Oura. There is no limit once an application is approved.\n Additionally, Oura users **must provide consent** to share each data type an API Application has access to.\n\nAll data access requests through the Oura API require [Authentication](https://cloud.ouraring.com/docs/authentication).\n\nAdditionally, we recommend that Oura users keep their mobile app updated to support API access for the latest data types.\n\n# Authentication\n\nThe Oura API provides two methods for Authentication: (1) the OAuth2 protocol and (2) Personal Access Tokens. For more information on the OAuth2 flow, see our [Authentication instructions](https://cloud.ouraring.com/docs/authentication).\n\nAccess tokens must be included in the request header as follows:\n```http\nGET /v2/usercollection/personal_info HTTP/1.1\nHost: api.ouraring.com\nAuthorization: Bearer <token>\n```\n\n# Oura HTTP Response Codes\n\n| Response Code | Description |\n| ------------------------------------ | - |\n| 200 OK | Successful Response |\n| 400 Query Parameter Validation Error | The request contains query parameters that are invalid or incorrectly formatted. |\n| 429 Request Rate Limit Exceeded | The API is rate limited to 5000 requests in a 5 minute period. You will receive a 429 error code if you exceed this limit. [Contact us](mailto:api-support@ouraring.com) if you expect your usage to exceed this limit.| ","termsOfService":"https://cloud.ouraring.com/legal/api-agreement","version":"2.0","x-logo":{"url":"/v2/static/images/Oura_Logo-Developer_RBG_Black.svg"}},"paths":{"/v2/usercollection/heartrate":{"get":{"tags":["Heart Rate Routes"],"summary":"Multiple Heart Rate Documents","operationId":"Multiple_Heart_Rate_Documents_v2_usercollection_heartrate_get","parameters":[{"required":false,"schema":{"title":"Start Datetime","type":"string","format":"date-time"},"name":"start_datetime","in":"query"},{"required":false,"schema":{"title":"End Datetime","type":"string","format":"date-time"},"name":"end_datetime","in":"query"},{"required":false,"schema":{"title":"Next Token","type":"string"},"name":"next_token","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HeartRateResponse"}}}},"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"}}}}},"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"# The '+' symbol in the timezone must be escaped to `%2B` if included. \ncurl --location --request GET 'https://api.ouraring.com/v2/usercollection/heartrate?start_datetime=2021-11-01T00:00:00-08:00&end_datetime=2021-12-01T00:00:00-08:00' \\ \n--header 'Authorization: Bearer <token>'"},{"lang":"Python","source":"import requests \nurl = 'https://api.ouraring.com/v2/usercollection/heartrate' \nparams={ \n 'start_datetime': '2021-11-01T00:00:00-08:00', \n 'end_datetime': '2021-12-01T00:00:00-08:00' \n}\nheaders = { \n 'Authorization': 'Bearer <token>' \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 <token>'); \nvar requestOptions = { \n method: 'GET', \n headers: myHeaders, \nfetch('https://api.ouraring.com/v2/usercollection/heartrate?start_datetime=2021-11-01T00:00:00-08:00&end_datetime=2021-12-01T00:00:00-08:00', 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/heartrate?start_datetime=2021-11-01T00:00:00-08:00&end_datetime=2021-12-01T00:00:00-08:00\") \n .method(\"GET\", null) \n .addHeader(\"Authorization\", \"Bearer <token>\") \n .build(); \nResponse response = client.newCall(request).execute();","label":"Java"}]}},"/v2/usercollection/personal_info":{"get":{"tags":["Personal Info Routes"],"summary":"Single Personal Info Document","operationId":"Single_Personal_Info_Document_v2_usercollection_personal_info_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonalInfoResponse"}}}},"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."}},"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --location --request GET 'https://api.ouraring.com/v2/usercollection/personal_info' \\\n--header 'Authorization: Bearer <token>'"},{"lang":"Python","source":"import requests \nurl = 'https://api.ouraring.com/v2/usercollection/personal_info' \nparams={ \n 'start_date': '2021-11-01', \n 'end_date': '2021-12-01' \n}\nheaders = { \n 'Authorization': 'Bearer <token>' \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 <token>'); \nvar requestOptions = { \n method: 'GET', \n headers: myHeaders, \nfetch('https://api.ouraring.com/v2/usercollection/personal_info', 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/personal_info\") \n .method(\"GET\", null) \n .addHeader(\"Authorization\", \"Bearer <token>\") \n .build(); \nResponse response = client.newCall(request).execute();","label":"Java"}]}},"/v2/usercollection/tag":{"get":{"tags":["Tag Routes"],"summary":"Multiple Tag Documents","operationId":"Multiple_tag_Documents_v2_usercollection_tag_get","parameters":[{"required":false,"schema":{"title":"Start Date","type":"string","format":"date","include_in_schema":true},"name":"start_date","in":"query"},{"required":false,"schema":{"title":"End Date","type":"string","format":"date","include_in_schema":true},"name":"end_date","in":"query"},{"required":false,"schema":{"title":"Next Token","type":"string"},"name":"next_token","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MultiDocumentResponse_TagModel_"}}}},"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"}}}}},"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --location --request GET 'https://api.ouraring.com/v2/usercollection/tag?start_date=2021-11-01&end_date=2021-12-01' \\\n--header 'Authorization: Bearer <token>'"},{"lang":"Python","source":"import requests \nurl = 'https://api.ouraring.com/v2/usercollection/tag' \nparams={ \n 'start_date': '2021-11-01', \n 'end_date': '2021-12-01' \n}\nheaders = { \n 'Authorization': 'Bearer <token>' \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 <token>'); \nvar requestOptions = { \n method: 'GET', \n headers: myHeaders, \nfetch('https://api.ouraring.com/v2/usercollection/tag?start_date=2021-11-01&end_date=2021-12-01', 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/tag?start_date=2021-11-01&end_date=2021-12-01\") \n .method(\"GET\", null) \n .addHeader(\"Authorization\", \"Bearer <token>\") \n .build(); \nResponse response = client.newCall(request).execute();","label":"Java"}]}},"/v2/usercollection/workout":{"get":{"tags":["Workout Routes"],"summary":"Multiple Workout Documents","operationId":"Multiple_workout_Documents_v2_usercollection_workout_get","parameters":[{"required":false,"schema":{"title":"Start Date","type":"string","format":"date","include_in_schema":true},"name":"start_date","in":"query"},{"required":false,"schema":{"title":"End Date","type":"string","format":"date","include_in_schema":true},"name":"end_date","in":"query"},{"required":false,"schema":{"title":"Next Token","type":"string"},"name":"next_token","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MultiDocumentResponse_WorkoutModel_"}}}},"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"}}}}},"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --location --request GET 'https://api.ouraring.com/v2/usercollection/workout?start_date=2021-11-01&end_date=2021-12-01' \\\n--header 'Authorization: Bearer <token>'"},{"lang":"Python","source":"import requests \nurl = 'https://api.ouraring.com/v2/usercollection/workout' \nparams={ \n 'start_date': '2021-11-01', \n 'end_date': '2021-12-01' \n}\nheaders = { \n 'Authorization': 'Bearer <token>' \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 <token>'); \nvar requestOptions = { \n method: 'GET', \n headers: myHeaders, \nfetch('https://api.ouraring.com/v2/usercollection/workout?start_date=2021-11-01&end_date=2021-12-01', 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/workout?start_date=2021-11-01&end_date=2021-12-01\") \n .method(\"GET\", null) \n .addHeader(\"Authorization\", \"Bearer <token>\") \n .build(); \nResponse response = client.newCall(request).execute();","label":"Java"}]}},"/v2/usercollection/session":{"get":{"tags":["Session Routes"],"summary":"Multiple Session Documents","operationId":"Multiple_session_Documents_v2_usercollection_session_get","parameters":[{"required":false,"schema":{"title":"Start Date","type":"string","format":"date","include_in_schema":true},"name":"start_date","in":"query"},{"required":false,"schema":{"title":"End Date","type":"string","format":"date","include_in_schema":true},"name":"end_date","in":"query"},{"required":false,"schema":{"title":"Next Token","type":"string"},"name":"next_token","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MultiDocumentResponse_SessionModel_"}}}},"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"}}}}},"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --location --request GET 'https://api.ouraring.com/v2/usercollection/session?start_date=2021-11-01&end_date=2021-12-01' \\\n--header 'Authorization: Bearer <token>'"},{"lang":"Python","source":"import requests \nurl = 'https://api.ouraring.com/v2/usercollection/session' \nparams={ \n 'start_date': '2021-11-01', \n 'end_date': '2021-12-01' \n}\nheaders = { \n 'Authorization': 'Bearer <token>' \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 <token>'); \nvar requestOptions = { \n method: 'GET', \n headers: myHeaders, \nfetch('https://api.ouraring.com/v2/usercollection/session?start_date=2021-11-01&end_date=2021-12-01', 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/session?start_date=2021-11-01&end_date=2021-12-01\") \n .method(\"GET\", null) \n .addHeader(\"Authorization\", \"Bearer <token>\") \n .build(); \nResponse response = client.newCall(request).execute();","label":"Java"}]}},"/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":[{"required":false,"schema":{"title":"Start Date","type":"string","format":"date","include_in_schema":true},"name":"start_date","in":"query"},{"required":false,"schema":{"title":"End Date","type":"string","format":"date","include_in_schema":true},"name":"end_date","in":"query"},{"required":false,"schema":{"title":"Next Token","type":"string"},"name":"next_token","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MultiDocumentResponse_DailyActivityModel_"}}}},"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"}}}}},"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' \\\n--header 'Authorization: Bearer <token>'"},{"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}\nheaders = { \n 'Authorization': 'Bearer <token>' \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 <token>'); \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', 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\") \n .method(\"GET\", null) \n .addHeader(\"Authorization\", \"Bearer <token>\") \n .build(); \nResponse response = client.newCall(request).execute();","label":"Java"}]}},"/v2/usercollection/daily_sleep":{"get":{"tags":["Daily Sleep Routes"],"summary":"Multiple Daily Sleep Documents","operationId":"Multiple_daily_sleep_Documents_v2_usercollection_daily_sleep_get","parameters":[{"required":false,"schema":{"title":"Start Date","type":"string","format":"date","include_in_schema":true},"name":"start_date","in":"query"},{"required":false,"schema":{"title":"End Date","type":"string","format":"date","include_in_schema":true},"name":"end_date","in":"query"},{"required":false,"schema":{"title":"Next Token","type":"string"},"name":"next_token","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MultiDocumentResponse_DailySleepModel_"}}}},"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"}}}}},"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --location --request GET 'https://api.ouraring.com/v2/usercollection/daily_sleep?start_date=2021-11-01&end_date=2021-12-01' \\\n--header 'Authorization: Bearer <token>'"},{"lang":"Python","source":"import requests \nurl = 'https://api.ouraring.com/v2/usercollection/daily_sleep' \nparams={ \n 'start_date': '2021-11-01', \n 'end_date': '2021-12-01' \n}\nheaders = { \n 'Authorization': 'Bearer <token>' \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 <token>'); \nvar requestOptions = { \n method: 'GET', \n headers: myHeaders, \nfetch('https://api.ouraring.com/v2/usercollection/daily_sleep?start_date=2021-11-01&end_date=2021-12-01', 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_sleep?start_date=2021-11-01&end_date=2021-12-01\") \n .method(\"GET\", null) \n .addHeader(\"Authorization\", \"Bearer <token>\") \n .build(); \nResponse response = client.newCall(request).execute();","label":"Java"}]}},"/v2/usercollection/daily_spo2":{"get":{"tags":["Daily Spo2 Routes"],"summary":"Multiple Daily Spo2 Documents","operationId":"Multiple_daily_spo2_Documents_v2_usercollection_daily_spo2_get","parameters":[{"required":false,"schema":{"title":"Start Date","type":"string","format":"date","include_in_schema":true},"name":"start_date","in":"query"},{"required":false,"schema":{"title":"End Date","type":"string","format":"date","include_in_schema":true},"name":"end_date","in":"query"},{"required":false,"schema":{"title":"Next Token","type":"string"},"name":"next_token","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MultiDocumentResponse_DailySpO2Model_"}}}},"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"}}}}},"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --location --request GET 'https://api.ouraring.com/v2/usercollection/daily_spo2?start_date=2021-11-01&end_date=2021-12-01' \\\n--header 'Authorization: Bearer <token>'"},{"lang":"Python","source":"import requests \nurl = 'https://api.ouraring.com/v2/usercollection/daily_spo2' \nparams={ \n 'start_date': '2021-11-01', \n 'end_date': '2021-12-01' \n}\nheaders = { \n 'Authorization': 'Bearer <token>' \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 <token>'); \nvar requestOptions = { \n method: 'GET', \n headers: myHeaders, \nfetch('https://api.ouraring.com/v2/usercollection/daily_spo2?start_date=2021-11-01&end_date=2021-12-01', 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_spo2?start_date=2021-11-01&end_date=2021-12-01\") \n .method(\"GET\", null) \n .addHeader(\"Authorization\", \"Bearer <token>\") \n .build(); \nResponse response = client.newCall(request).execute();","label":"Java"}]}},"/v2/usercollection/daily_readiness":{"get":{"tags":["Daily Readiness Routes"],"summary":"Multiple Daily Readiness Documents","operationId":"Multiple_daily_readiness_Documents_v2_usercollection_daily_readiness_get","parameters":[{"required":false,"schema":{"title":"Start Date","type":"string","format":"date","include_in_schema":true},"name":"start_date","in":"query"},{"required":false,"schema":{"title":"End Date","type":"string","format":"date","include_in_schema":true},"name":"end_date","in":"query"},{"required":false,"schema":{"title":"Next Token","type":"string"},"name":"next_token","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MultiDocumentResponse_DailyReadinessModel_"}}}},"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"}}}}},"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --location --request GET 'https://api.ouraring.com/v2/usercollection/daily_readiness?start_date=2021-11-01&end_date=2021-12-01' \\\n--header 'Authorization: Bearer <token>'"},{"lang":"Python","source":"import requests \nurl = 'https://api.ouraring.com/v2/usercollection/daily_readiness' \nparams={ \n 'start_date': '2021-11-01', \n 'end_date': '2021-12-01' \n}\nheaders = { \n 'Authorization': 'Bearer <token>' \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 <token>'); \nvar requestOptions = { \n method: 'GET', \n headers: myHeaders, \nfetch('https://api.ouraring.com/v2/usercollection/daily_readiness?start_date=2021-11-01&end_date=2021-12-01', 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_readiness?start_date=2021-11-01&end_date=2021-12-01\") \n .method(\"GET\", null) \n .addHeader(\"Authorization\", \"Bearer <token>\") \n .build(); \nResponse response = client.newCall(request).execute();","label":"Java"}]}},"/v2/usercollection/sleep":{"get":{"tags":["Sleep Routes"],"summary":"Multiple Sleep Documents","operationId":"Multiple_sleep_Documents_v2_usercollection_sleep_get","parameters":[{"required":false,"schema":{"title":"Start Date","type":"string","format":"date","include_in_schema":true},"name":"start_date","in":"query"},{"required":false,"schema":{"title":"End Date","type":"string","format":"date","include_in_schema":true},"name":"end_date","in":"query"},{"required":false,"schema":{"title":"Next Token","type":"string"},"name":"next_token","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MultiDocumentResponse_SleepModel_"}}}},"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"}}}}},"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --location --request GET 'https://api.ouraring.com/v2/usercollection/sleep?start_date=2021-11-01&end_date=2021-12-01' \\\n--header 'Authorization: Bearer <token>'"},{"lang":"Python","source":"import requests \nurl = 'https://api.ouraring.com/v2/usercollection/sleep' \nparams={ \n 'start_date': '2021-11-01', \n 'end_date': '2021-12-01' \n}\nheaders = { \n 'Authorization': 'Bearer <token>' \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 <token>'); \nvar requestOptions = { \n method: 'GET', \n headers: myHeaders, \nfetch('https://api.ouraring.com/v2/usercollection/sleep?start_date=2021-11-01&end_date=2021-12-01', 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/sleep?start_date=2021-11-01&end_date=2021-12-01\") \n .method(\"GET\", null) \n .addHeader(\"Authorization\", \"Bearer <token>\") \n .build(); \nResponse response = client.newCall(request).execute();","label":"Java"}]}},"/v2/usercollection/sleep_time":{"get":{"tags":["Sleep Time Routes"],"summary":"Multiple Sleep Time Documents","operationId":"Multiple_sleep_time_Documents_v2_usercollection_sleep_time_get","parameters":[{"required":false,"schema":{"title":"Start Date","type":"string","format":"date","include_in_schema":true},"name":"start_date","in":"query"},{"required":false,"schema":{"title":"End Date","type":"string","format":"date","include_in_schema":true},"name":"end_date","in":"query"},{"required":false,"schema":{"title":"Next Token","type":"string"},"name":"next_token","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MultiDocumentResponse_SleepTimeModel_"}}}},"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"}}}}},"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --location --request GET 'https://api.ouraring.com/v2/usercollection/sleep_time?start_date=2021-11-01&end_date=2021-12-01' \\\n--header 'Authorization: Bearer <token>'"},{"lang":"Python","source":"import requests \nurl = 'https://api.ouraring.com/v2/usercollection/sleep_time' \nparams={ \n 'start_date': '2021-11-01', \n 'end_date': '2021-12-01' \n}\nheaders = { \n 'Authorization': 'Bearer <token>' \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 <token>'); \nvar requestOptions = { \n method: 'GET', \n headers: myHeaders, \nfetch('https://api.ouraring.com/v2/usercollection/sleep_time?start_date=2021-11-01&end_date=2021-12-01', 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/sleep_time?start_date=2021-11-01&end_date=2021-12-01\") \n .method(\"GET\", null) \n .addHeader(\"Authorization\", \"Bearer <token>\") \n .build(); \nResponse response = client.newCall(request).execute();","label":"Java"}]}},"/v2/usercollection/rest_mode_period":{"get":{"tags":["Rest Mode Period Routes"],"summary":"Multiple Rest Mode Period Documents","operationId":"Multiple_rest_mode_period_Documents_v2_usercollection_rest_mode_period_get","parameters":[{"required":false,"schema":{"title":"Start Date","type":"string","format":"date","include_in_schema":true},"name":"start_date","in":"query"},{"required":false,"schema":{"title":"End Date","type":"string","format":"date","include_in_schema":true},"name":"end_date","in":"query"},{"required":false,"schema":{"title":"Next Token","type":"string"},"name":"next_token","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MultiDocumentResponse_RestModePeriodModel_"}}}},"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"}}}}},"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --location --request GET 'https://api.ouraring.com/v2/usercollection/rest_mode_period?start_date=2021-11-01&end_date=2021-12-01' \\\n--header 'Authorization: Bearer <token>'"},{"lang":"Python","source":"import requests \nurl = 'https://api.ouraring.com/v2/usercollection/rest_mode_period' \nparams={ \n 'start_date': '2021-11-01', \n 'end_date': '2021-12-01' \n}\nheaders = { \n 'Authorization': 'Bearer <token>' \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 <token>'); \nvar requestOptions = { \n method: 'GET', \n headers: myHeaders, \nfetch('https://api.ouraring.com/v2/usercollection/rest_mode_period?start_date=2021-11-01&end_date=2021-12-01', 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/rest_mode_period?start_date=2021-11-01&end_date=2021-12-01\") \n .method(\"GET\", null) \n .addHeader(\"Authorization\", \"Bearer <token>\") \n .build(); \nResponse response = client.newCall(request).execute();","label":"Java"}]}},"/v2/usercollection/ring_configuration":{"get":{"tags":["Ring Configuration Routes"],"summary":"Multiple Ring Configuration Documents","operationId":"Multiple_ring_configuration_Documents_v2_usercollection_ring_configuration_get","parameters":[{"required":false,"schema":{"title":"Start Date","type":"string","format":"date","include_in_schema":false},"name":"start_date","in":"query"},{"required":false,"schema":{"title":"End Date","type":"string","format":"date","include_in_schema":false},"name":"end_date","in":"query"},{"required":false,"schema":{"title":"Next Token","type":"string"},"name":"next_token","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MultiDocumentResponse_RingConfigurationModel_"}}}},"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"}}}}},"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --location --request GET 'https://api.ouraring.com/v2/usercollection/ring_configuration?start_date=2021-11-01&end_date=2021-12-01' \\\n--header 'Authorization: Bearer <token>'"},{"lang":"Python","source":"import requests \nurl = 'https://api.ouraring.com/v2/usercollection/ring_configuration' \nparams={ \n 'start_date': '2021-11-01', \n 'end_date': '2021-12-01' \n}\nheaders = { \n 'Authorization': 'Bearer <token>' \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 <token>'); \nvar requestOptions = { \n method: 'GET', \n headers: myHeaders, \nfetch('https://api.ouraring.com/v2/usercollection/ring_configuration?start_date=2021-11-01&end_date=2021-12-01', 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/ring_configuration?start_date=2021-11-01&end_date=2021-12-01\") \n .method(\"GET\", null) \n .addHeader(\"Authorization\", \"Bearer <token>\") \n .build(); \nResponse response = client.newCall(request).execute();","label":"Java"}]}},"/v2/usercollection/tag/{document_id}":{"get":{"tags":["Tag Routes"],"summary":"Single Tag Document","operationId":"Single_tag_Document_v2_usercollection_tag__document_id__get","parameters":[{"required":true,"schema":{"title":"Document Id","type":"string"},"name":"document_id","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TagModel"}}}},"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"}}}}},"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --location --request GET 'https://api.ouraring.com/v2/usercollection/tag/2-5daccc095220cc5493a4e9c2b681ca941e' \\\n--header 'Authorization: Bearer <token>'"},{"lang":"Python","source":"import requests \nurl = 'https://api.ouraring.com/v2/usercollection/tag/2-5daccc095220cc5493a4e9c2b681ca941e\nheaders = { \n 'Authorization': 'Bearer <token>' \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 <token>'); \nvar requestOptions = { \n method: 'GET', \n headers: myHeaders, \nfetch('https://api.ouraring.com/v2/usercollection/tag/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/tag/2-5daccc095220cc5493a4e9c2b681ca941e\") \n .method(\"GET\", null) \n .addHeader(\"Authorization\", \"Bearer <token>\") \n .build(); \nResponse response = client.newCall(request).execute();","label":"Java"}]}},"/v2/usercollection/workout/{document_id}":{"get":{"tags":["Workout Routes"],"summary":"Single Workout Document","operationId":"Single_workout_Document_v2_usercollection_workout__document_id__get","parameters":[{"required":true,"schema":{"title":"Document Id","type":"string"},"name":"document_id","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkoutModel"}}}},"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"}}}}},"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --location --request GET 'https://api.ouraring.com/v2/usercollection/workout/2-5daccc095220cc5493a4e9c2b681ca941e' \\\n--header 'Authorization: Bearer <token>'"},{"lang":"Python","source":"import requests \nurl = 'https://api.ouraring.com/v2/usercollection/workout/2-5daccc095220cc5493a4e9c2b681ca941e\nheaders = { \n 'Authorization': 'Bearer <token>' \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 <token>'); \nvar requestOptions = { \n method: 'GET', \n headers: myHeaders, \nfetch('https://api.ouraring.com/v2/usercollection/workout/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/workout/2-5daccc095220cc5493a4e9c2b681ca941e\") \n .method(\"GET\", null) \n .addHeader(\"Authorization\", \"Bearer <token>\") \n .build(); \nResponse response = client.newCall(request).execute();","label":"Java"}]}},"/v2/usercollection/session/{document_id}":{"get":{"tags":["Session Routes"],"summary":"Single Session Document","operationId":"Single_session_Document_v2_usercollection_session__document_id__get","parameters":[{"required":true,"schema":{"title":"Document Id","type":"string"},"name":"document_id","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionModel"}}}},"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"}}}}},"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --location --request GET 'https://api.ouraring.com/v2/usercollection/session/2-5daccc095220cc5493a4e9c2b681ca941e' \\\n--header 'Authorization: Bearer <token>'"},{"lang":"Python","source":"import requests \nurl = 'https://api.ouraring.com/v2/usercollection/session/2-5daccc095220cc5493a4e9c2b681ca941e\nheaders = { \n 'Authorization': 'Bearer <token>' \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 <token>'); \nvar requestOptions = { \n method: 'GET', \n headers: myHeaders, \nfetch('https://api.ouraring.com/v2/usercollection/session/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/session/2-5daccc095220cc5493a4e9c2b681ca941e\") \n .method(\"GET\", null) \n .addHeader(\"Authorization\", \"Bearer <token>\") \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":[{"required":true,"schema":{"title":"Document Id","type":"string"},"name":"document_id","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DailyActivityModel"}}}},"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"}}}}},"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --location --request GET 'https://api.ouraring.com/v2/usercollection/daily_activity/2-5daccc095220cc5493a4e9c2b681ca941e' \\\n--header 'Authorization: Bearer <token>'"},{"lang":"Python","source":"import requests \nurl = 'https://api.ouraring.com/v2/usercollection/daily_activity/2-5daccc095220cc5493a4e9c2b681ca941e\nheaders = { \n 'Authorization': 'Bearer <token>' \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 <token>'); \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 <token>\") \n .build(); \nResponse response = client.newCall(request).execute();","label":"Java"}]}},"/v2/usercollection/daily_sleep/{document_id}":{"get":{"tags":["Daily Sleep Routes"],"summary":"Single Daily Sleep Document","operationId":"Single_daily_sleep_Document_v2_usercollection_daily_sleep__document_id__get","parameters":[{"required":true,"schema":{"title":"Document Id","type":"string"},"name":"document_id","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DailySleepModel"}}}},"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"}}}}},"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --location --request GET 'https://api.ouraring.com/v2/usercollection/daily_sleep/2-5daccc095220cc5493a4e9c2b681ca941e' \\\n--header 'Authorization: Bearer <token>'"},{"lang":"Python","source":"import requests \nurl = 'https://api.ouraring.com/v2/usercollection/daily_sleep/2-5daccc095220cc5493a4e9c2b681ca941e\nheaders = { \n 'Authorization': 'Bearer <token>' \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 <token>'); \nvar requestOptions = { \n method: 'GET', \n headers: myHeaders, \nfetch('https://api.ouraring.com/v2/usercollection/daily_sleep/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_sleep/2-5daccc095220cc5493a4e9c2b681ca941e\") \n .method(\"GET\", null) \n .addHeader(\"Authorization\", \"Bearer <token>\") \n .build(); \nResponse response = client.newCall(request).execute();","label":"Java"}]}},"/v2/usercollection/daily_spo2/{document_id}":{"get":{"tags":["Daily Spo2 Routes"],"summary":"Single Daily Spo2 Document","operationId":"Single_daily_spo2_Document_v2_usercollection_daily_spo2__document_id__get","parameters":[{"required":true,"schema":{"title":"Document Id","type":"string"},"name":"document_id","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DailySpO2Model"}}}},"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"}}}}},"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --location --request GET 'https://api.ouraring.com/v2/usercollection/daily_spo2/2-5daccc095220cc5493a4e9c2b681ca941e' \\\n--header 'Authorization: Bearer <token>'"},{"lang":"Python","source":"import requests \nurl = 'https://api.ouraring.com/v2/usercollection/daily_spo2/2-5daccc095220cc5493a4e9c2b681ca941e\nheaders = { \n 'Authorization': 'Bearer <token>' \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 <token>'); \nvar requestOptions = { \n method: 'GET', \n headers: myHeaders, \nfetch('https://api.ouraring.com/v2/usercollection/daily_spo2/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_spo2/2-5daccc095220cc5493a4e9c2b681ca941e\") \n .method(\"GET\", null) \n .addHeader(\"Authorization\", \"Bearer <token>\") \n .build(); \nResponse response = client.newCall(request).execute();","label":"Java"}]}},"/v2/usercollection/daily_readiness/{document_id}":{"get":{"tags":["Daily Readiness Routes"],"summary":"Single Daily Readiness Document","operationId":"Single_daily_readiness_Document_v2_usercollection_daily_readiness__document_id__get","parameters":[{"required":true,"schema":{"title":"Document Id","type":"string"},"name":"document_id","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DailyReadinessModel"}}}},"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"}}}}},"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --location --request GET 'https://api.ouraring.com/v2/usercollection/daily_readiness/2-5daccc095220cc5493a4e9c2b681ca941e' \\\n--header 'Authorization: Bearer <token>'"},{"lang":"Python","source":"import requests \nurl = 'https://api.ouraring.com/v2/usercollection/daily_readiness/2-5daccc095220cc5493a4e9c2b681ca941e\nheaders = { \n 'Authorization': 'Bearer <token>' \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 <token>'); \nvar requestOptions = { \n method: 'GET', \n headers: myHeaders, \nfetch('https://api.ouraring.com/v2/usercollection/daily_readiness/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_readiness/2-5daccc095220cc5493a4e9c2b681ca941e\") \n .method(\"GET\", null) \n .addHeader(\"Authorization\", \"Bearer <token>\") \n .build(); \nResponse response = client.newCall(request).execute();","label":"Java"}]}},"/v2/usercollection/sleep/{document_id}":{"get":{"tags":["Sleep Routes"],"summary":"Single Sleep Document","operationId":"Single_sleep_Document_v2_usercollection_sleep__document_id__get","parameters":[{"required":true,"schema":{"title":"Document Id","type":"string"},"name":"document_id","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SleepModel"}}}},"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"}}}}},"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --location --request GET 'https://api.ouraring.com/v2/usercollection/sleep/2-5daccc095220cc5493a4e9c2b681ca941e' \\\n--header 'Authorization: Bearer <token>'"},{"lang":"Python","source":"import requests \nurl = 'https://api.ouraring.com/v2/usercollection/sleep/2-5daccc095220cc5493a4e9c2b681ca941e\nheaders = { \n 'Authorization': 'Bearer <token>' \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 <token>'); \nvar requestOptions = { \n method: 'GET', \n headers: myHeaders, \nfetch('https://api.ouraring.com/v2/usercollection/sleep/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/sleep/2-5daccc095220cc5493a4e9c2b681ca941e\") \n .method(\"GET\", null) \n .addHeader(\"Authorization\", \"Bearer <token>\") \n .build(); \nResponse response = client.newCall(request).execute();","label":"Java"}]}},"/v2/usercollection/sleep_time/{document_id}":{"get":{"tags":["Sleep Time Routes"],"summary":"Single Sleep Time Document","operationId":"Single_sleep_time_Document_v2_usercollection_sleep_time__document_id__get","parameters":[{"required":true,"schema":{"title":"Document Id","type":"string"},"name":"document_id","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SleepTimeModel"}}}},"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"}}}}},"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --location --request GET 'https://api.ouraring.com/v2/usercollection/sleep_time/2-5daccc095220cc5493a4e9c2b681ca941e' \\\n--header 'Authorization: Bearer <token>'"},{"lang":"Python","source":"import requests \nurl = 'https://api.ouraring.com/v2/usercollection/sleep_time/2-5daccc095220cc5493a4e9c2b681ca941e\nheaders = { \n 'Authorization': 'Bearer <token>' \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 <token>'); \nvar requestOptions = { \n method: 'GET', \n headers: myHeaders, \nfetch('https://api.ouraring.com/v2/usercollection/sleep_time/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/sleep_time/2-5daccc095220cc5493a4e9c2b681ca941e\") \n .method(\"GET\", null) \n .addHeader(\"Authorization\", \"Bearer <token>\") \n .build(); \nResponse response = client.newCall(request).execute();","label":"Java"}]}},"/v2/usercollection/rest_mode_period/{document_id}":{"get":{"tags":["Rest Mode Period Routes"],"summary":"Single Rest Mode Period Document","operationId":"Single_rest_mode_period_Document_v2_usercollection_rest_mode_period__document_id__get","parameters":[{"required":true,"schema":{"title":"Document Id","type":"string"},"name":"document_id","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestModePeriodModel"}}}},"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"}}}}},"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --location --request GET 'https://api.ouraring.com/v2/usercollection/rest_mode_period/2-5daccc095220cc5493a4e9c2b681ca941e' \\\n--header 'Authorization: Bearer <token>'"},{"lang":"Python","source":"import requests \nurl = 'https://api.ouraring.com/v2/usercollection/rest_mode_period/2-5daccc095220cc5493a4e9c2b681ca941e\nheaders = { \n 'Authorization': 'Bearer <token>' \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 <token>'); \nvar requestOptions = { \n method: 'GET', \n headers: myHeaders, \nfetch('https://api.ouraring.com/v2/usercollection/rest_mode_period/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/rest_mode_period/2-5daccc095220cc5493a4e9c2b681ca941e\") \n .method(\"GET\", null) \n .addHeader(\"Authorization\", \"Bearer <token>\") \n .build(); \nResponse response = client.newCall(request).execute();","label":"Java"}]}},"/v2/usercollection/ring_configuration/{document_id}":{"get":{"tags":["Ring Configuration Routes"],"summary":"Single Ring Configuration Document","operationId":"Single_ring_configuration_Document_v2_usercollection_ring_configuration__document_id__get","parameters":[{"required":true,"schema":{"title":"Document Id","type":"string"},"name":"document_id","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RingConfigurationModel"}}}},"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"}}}}},"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --location --request GET 'https://api.ouraring.com/v2/usercollection/ring_configuration/2-5daccc095220cc5493a4e9c2b681ca941e' \\\n--header 'Authorization: Bearer <token>'"},{"lang":"Python","source":"import requests \nurl = 'https://api.ouraring.com/v2/usercollection/ring_configuration/2-5daccc095220cc5493a4e9c2b681ca941e\nheaders = { \n 'Authorization': 'Bearer <token>' \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 <token>'); \nvar requestOptions = { \n method: 'GET', \n headers: myHeaders, \nfetch('https://api.ouraring.com/v2/usercollection/ring_configuration/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/ring_configuration/2-5daccc095220cc5493a4e9c2b681ca941e\") \n .method(\"GET\", null) \n .addHeader(\"Authorization\", \"Bearer <token>\") \n .build(); \nResponse response = client.newCall(request).execute();","label":"Java"}]}},"/v2/webhook/subscription":{"get":{"tags":["Webhook Subscription Routes"],"summary":"List Webhook Subscriptions","operationId":"list_webhook_subscriptions_v2_webhook_subscription_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response List Webhook Subscriptions V2 Webhook Subscription Get","type":"array","items":{"$ref":"#/components/schemas/WebhookSubscriptionModel"}}}}}},"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --location --request GET 'https://api.ouraring.com/v2/webhook/subscription' --header 'x-client-id: client-id' --header 'x-client-secret: client-secret'"}]},"post":{"tags":["Webhook Subscription Routes"],"summary":"Create Webhook Subscription","operationId":"create_webhook_subscription_v2_webhook_subscription_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWebhookSubscriptionRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookSubscriptionModel"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --location --request POST 'https://api.ouraring.com/v2/webhook/subscription' --header 'x-client-id: client-id' --header 'x-client-secret: client-secret' --header 'Content-Type: application/json' --data-raw '{\n \"callback_url\": \"https://my-api/oura/tag/delete\",\n \"verification_token\": \"123\",\n \"event_type\": \"delete\",\n \"data_type\": \"tag\"\n}'"}]}},"/v2/webhook/subscription/{id}":{"get":{"tags":["Webhook Subscription Routes"],"summary":"Get Webhook Subscription","operationId":"get_webhook_subscription_v2_webhook_subscription__id__get","parameters":[{"required":true,"schema":{"title":"Id","type":"string"},"name":"id","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookSubscriptionModel"}}}},"403":{"description":"Webhook with specified id does not exist."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --location --request GET 'https://api.ouraring.com/v2/webhook/subscription/5d3fe17b-f880-4d93-b9b6-afbfb76c1e78' --header 'x-client-id: client-id' --header 'x-client-secret: client-secret'"}]},"put":{"tags":["Webhook Subscription Routes"],"summary":"Update Webhook Subscription","operationId":"update_webhook_subscription_v2_webhook_subscription__id__put","parameters":[{"required":true,"schema":{"title":"Id","type":"string"},"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateWebhookSubscriptionRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookSubscriptionModel"}}}},"403":{"description":"Webhook with specified id does not exist."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --location --request PUT 'https://api.ouraring.com/v2/webhook/subscription/5d3fe17b-f880-4d93-b9b6-afbfb76c1e78' --header 'x-client-id: client-id' --header 'x-client-secret: client-secret' --header 'Content-Type: application/json' --data-raw '{\n \"callback_url\": \"https://my-api/oura/tag/delete\",\n \"verification_token\": \"123\",\n \"event_type\": \"delete\",\n \"data_type\": \"tag\"\n}'"}]},"delete":{"tags":["Webhook Subscription Routes"],"summary":"Delete Webhook Subscription","operationId":"delete_webhook_subscription_v2_webhook_subscription__id__delete","parameters":[{"required":true,"schema":{"title":"Id","type":"string"},"name":"id","in":"path"}],"responses":{"204":{"description":"Successful Response"},"403":{"description":"Webhook with specified id does not exist."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --location --request DELETE 'https://api.ouraring.com/v2/webhook/subscription/5d3fe17b-f880-4d93-b9b6-afbfb76c1e78' --header 'x-client-id: client-id' --header 'x-client-secret: client-secret'"}]}},"/v2/webhook/subscription/renew/{id}":{"put":{"tags":["Webhook Subscription Routes"],"summary":"Renew Webhook Subscription","operationId":"renew_webhook_subscription_v2_webhook_subscription_renew__id__put","parameters":[{"required":true,"schema":{"title":"Id","type":"string"},"name":"id","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookSubscriptionModel"}}}},"403":{"description":"Webhook with specified id does not exist."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --location --request PUT 'https://api.ouraring.com/v2/webhook/subscription/renew/5d3fe17b-f880-4d93-b9b6-afbfb76c1e78' --header 'x-client-id: client-id' --header 'x-client-secret: client-secret' --header 'Content-Type: application/json'"}]}}},"components":{"schemas":{"ActivityContributors":{"title":"ActivityContributors","type":"object","properties":{"meet_daily_targets":{"title":"Meet Daily Targets","type":"integer","description":"Contribution of meeting previous 7-day daily activity targets in range [1, 100].","nullable":true},"move_every_hour":{"title":"Move Every Hour","type":"integer","description":"Contribution of previous 24-hour inactivity alerts in range [1, 100].","nullable":true},"recovery_time":{"title":"Recovery Time","type":"integer","description":"Contribution of previous 7-day recovery time in range [1, 100].","nullable":true},"stay_active":{"title":"Stay Active","type":"integer","description":"Contribution of previous 24-hour activity in range [1, 100].","nullable":true},"training_frequency":{"title":"Training Frequency","type":"integer","description":"Contribution of previous 7-day exercise frequency in range [1, 100].","nullable":true},"training_volume":{"title":"Training Volume","type":"integer","description":"Contribution of previous 7-day exercise volume in range [1, 100].","nullable":true}},"description":"Object defining activity score contributors."},"ArrayNullableFloatBits64":{"title":"ArrayNullableFloatBits64","type":"array","items":{"type":"number","nullable":true}},"CreateWebhookSubscriptionRequest":{"title":"CreateWebhookSubscriptionRequest","required":["callback_url","verification_token","event_type","data_type"],"type":"object","properties":{"callback_url":{"title":"Callback Url","maxLength":2083,"minLength":1,"type":"string","format":"uri"},"verification_token":{"title":"Verification Token","type":"string"},"event_type":{"$ref":"#/components/schemas/WebhookOperation"},"data_type":{"$ref":"#/components/schemas/ExtApiV2DataType"}}},"DailyActivityModel":{"title":"DailyActivityModel","required":["id","active_calories","average_met_minutes","contributors","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","total_calories","day","timestamp"],"type":"object","properties":{"id":{"title":"Id","type":"string"},"class_5_min":{"title":"Class 5 Min","type":"string","description":"5-minute activity classification for the activity period:\n* ```0```\tnon wear\n* ```1``` rest\n* ```2``` inactive\n* ```3``` low activity\n* ```4``` medium activity\n* ```5``` high activity"},"score":{"title":"Score","type":"integer","description":"Activity score in range ```[1, 100]```"},"active_calories":{"title":"Active Calories","type":"integer","description":"Active calories expended (in kilocalories)"},"average_met_minutes":{"title":"Average Met Minutes","type":"number","description":"Average metabolic equivalent (MET) in minutes"},"contributors":{"$ref":"#/components/schemas/ActivityContributors"},"equivalent_walking_distance":{"title":"Equivalent Walking Distance","type":"integer","description":"Equivalent walking distance (in meters) of energy expenditure"},"high_activity_met_minutes":{"title":"High Activity Met Minutes","type":"integer","description":"High activity metabolic equivalent (MET) in minutes"},"high_activity_time":{"title":"High Activity Time","type":"integer","description":"High activity metabolic equivalent (MET) in seconds"},"inactivity_alerts":{"title":"Inactivity Alerts","type":"integer","description":"Number of inactivity alerts received"},"low_activity_met_minutes":{"title":"Low Activity Met Minutes","type":"integer","description":"Low activity metabolic equivalent (MET) in minutes"},"low_activity_time":{"title":"Low Activity Time","type":"integer","description":"Low activity metabolic equivalent (MET) in seconds"},"medium_activity_met_minutes":{"title":"Medium Activity Met Minutes","type":"integer","description":"Medium activity metabolic equivalent (MET) in minutes"},"medium_activity_time":{"title":"Medium Activity Time","type":"integer","description":"Medium activity metabolic equivalent (MET) in seconds"},"met":{"$ref":"#/components/schemas/Sample"},"meters_to_target":{"title":"Meters To Target","type":"integer","description":"Remaining meters to target (from ```target_meters```"},"non_wear_time":{"title":"Non Wear Time","type":"integer","description":"The time (in seconds) in which the ring was not worn"},"resting_time":{"title":"Resting Time","type":"integer","description":"Resting time (in seconds)"},"sedentary_met_minutes":{"title":"Sedentary Met Minutes","type":"integer","description":"Sedentary metabolic equivalent (MET) in minutes"},"sedentary_time":{"title":"Sedentary Time","type":"integer","description":"Sedentary metabolic equivalent (MET) in seconds"},"steps":{"title":"Steps","type":"integer","description":"Total number of steps taken"},"target_calories":{"title":"Target Calories","type":"integer","description":"Daily activity target (in kilocalories)"},"target_meters":{"title":"Target Meters","type":"integer","description":"Daily activity target (in meters)"},"total_calories":{"title":"Total Calories","type":"integer","description":"Total calories expended (in kilocalories)"},"day":{"title":"Day","type":"string","description":"The ```YYYY-MM-DD``` formatted local date indicating when the daily activity occurred","format":"date"},"timestamp":{"title":"Timestamp","type":"string","description":"ISO 8601 formatted local timestamp indicating the start datetime of when the daily activity occurred","format":"date-time"}}},"DailyReadinessModel":{"title":"DailyReadinessModel","required":["id","contributors","day","timestamp"],"type":"object","properties":{"id":{"title":"Id","type":"string"},"contributors":{"title":"Contributors","allOf":[{"$ref":"#/components/schemas/ReadinessContributors"}],"description":"Contributors of the daily readiness score."},"day":{"title":"Day","type":"string","description":"Day that the daily readiness belongs to.","format":"date"},"score":{"title":"Score","type":"integer","description":"Daily readiness score."},"temperature_deviation":{"title":"Temperature Deviation","type":"number","description":"Temperature deviation in degrees Celsius."},"temperature_trend_deviation":{"title":"Temperature Trend Deviation","type":"number","description":"Temperature trend deviation in degrees Celsius."},"timestamp":{"title":"Timestamp","type":"string","description":"Timestamp of the daily readiness.","format":"date-time"}}},"DailySleepModel":{"title":"DailySleepModel","required":["id","contributors","day","timestamp"],"type":"object","properties":{"id":{"title":"Id","type":"string"},"contributors":{"title":"Contributors","allOf":[{"$ref":"#/components/schemas/SleepContributors"}],"description":"Contributors for the daily sleep score."},"day":{"title":"Day","type":"string","description":"Day that the daily sleep belongs to.","format":"date"},"score":{"title":"Score","type":"integer","description":"Daily sleep score."},"timestamp":{"title":"Timestamp","type":"string","description":"Timestamp of the daily sleep.","format":"date-time"}},"description":"Object defining daily sleep."},"DailySpO2AggregatedValuesModel":{"title":"DailySpO2AggregatedValuesModel","required":["average"],"type":"object","properties":{"average":{"title":"Average","type":"number","description":"Average oxygen saturation (SpO2) throughout the night."}}},"DailySpO2Model":{"title":"DailySpO2Model","required":["id","day"],"type":"object","properties":{"id":{"title":"Id","type":"string"},"day":{"title":"Day","type":"string","format":"date"},"spo2_percentage":{"title":"Spo2 Percentage","allOf":[{"$ref":"#/components/schemas/DailySpO2AggregatedValuesModel"}],"description":"The SpO2 percentage value aggregated over a single day."}}},"ExtApiV2DataType":{"title":"ExtApiV2DataType","enum":["tag","tagV2","workout","session","sleep","daily_sleep","daily_readiness","daily_activity","daily_spo2","sleep_time","rest_mode_period","ring_configuration","daily_stress","daily_cycle_phases"],"type":"string","description":"An enumeration."},"HTTPValidationError":{"title":"HTTPValidationError","type":"object","properties":{"detail":{"title":"Detail","type":"array","items":{"$ref":"#/components/schemas/ValidationError"}}}},"HeartRateModel":{"title":"HeartRateModel","required":["bpm","source","timestamp"],"type":"object","properties":{"bpm":{"title":"Bpm","type":"integer"},"source":{"$ref":"#/components/schemas/HeartRateSource"},"timestamp":{"title":"Timestamp","type":"string","format":"date-time"}}},"HeartRateResponse":{"title":"HeartRateResponse","required":["data"],"type":"object","properties":{"data":{"title":"Data","type":"array","items":{"$ref":"#/components/schemas/HeartRateModel"}},"next_token":{"title":"Next Token","type":"string"}}},"HeartRateSource":{"title":"HeartRateSource","enum":["awake","rest","sleep","session","live","workout"],"type":"string","description":"An enumeration."},"LocalizedDateTime":{"title":"LocalizedDateTime","type":"string","description":"ISO 8601 date-time that requires timezone and milliseconds","format":"date-time"},"MomentMood":{"title":"MomentMood","enum":["bad","worse","same","good","great"],"type":"string","description":"Possible Moment moods."},"MomentType":{"title":"MomentType","enum":["breathing","meditation","nap","relaxation","rest","body_status"],"type":"string","description":"Possible Moment types."},"MultiDocumentResponse_DailyActivityModel_":{"title":"MultiDocumentResponse[DailyActivityModel]","required":["data"],"type":"object","properties":{"data":{"title":"Data","type":"array","items":{"$ref":"#/components/schemas/DailyActivityModel"}},"next_token":{"title":"Next Token","type":"string"}}},"MultiDocumentResponse_DailyReadinessModel_":{"title":"MultiDocumentResponse[DailyReadinessModel]","required":["data"],"type":"object","properties":{"data":{"title":"Data","type":"array","items":{"$ref":"#/components/schemas/DailyReadinessModel"}},"next_token":{"title":"Next Token","type":"string"}}},"MultiDocumentResponse_DailySleepModel_":{"title":"MultiDocumentResponse[DailySleepModel]","required":["data"],"type":"object","properties":{"data":{"title":"Data","type":"array","items":{"$ref":"#/components/schemas/DailySleepModel"}},"next_token":{"title":"Next Token","type":"string"}}},"MultiDocumentResponse_DailySpO2Model_":{"title":"MultiDocumentResponse[DailySpO2Model]","required":["data"],"type":"object","properties":{"data":{"title":"Data","type":"array","items":{"$ref":"#/components/schemas/DailySpO2Model"}},"next_token":{"title":"Next Token","type":"string"}}},"MultiDocumentResponse_RestModePeriodModel_":{"title":"MultiDocumentResponse[RestModePeriodModel]","required":["data"],"type":"object","properties":{"data":{"title":"Data","type":"array","items":{"$ref":"#/components/schemas/RestModePeriodModel"}},"next_token":{"title":"Next Token","type":"string"}}},"MultiDocumentResponse_RingConfigurationModel_":{"title":"MultiDocumentResponse[RingConfigurationModel]","required":["data"],"type":"object","properties":{"data":{"title":"Data","type":"array","items":{"$ref":"#/components/schemas/RingConfigurationModel"}},"next_token":{"title":"Next Token","type":"string"}}},"MultiDocumentResponse_SessionModel_":{"title":"MultiDocumentResponse[SessionModel]","required":["data"],"type":"object","properties":{"data":{"title":"Data","type":"array","items":{"$ref":"#/components/schemas/SessionModel"}},"next_token":{"title":"Next Token","type":"string"}}},"MultiDocumentResponse_SleepModel_":{"title":"MultiDocumentResponse[SleepModel]","required":["data"],"type":"object","properties":{"data":{"title":"Data","type":"array","items":{"$ref":"#/components/schemas/SleepModel"}},"next_token":{"title":"Next Token","type":"string"}}},"MultiDocumentResponse_SleepTimeModel_":{"title":"MultiDocumentResponse[SleepTimeModel]","required":["data"],"type":"object","properties":{"data":{"title":"Data","type":"array","items":{"$ref":"#/components/schemas/SleepTimeModel"}},"next_token":{"title":"Next Token","type":"string"}}},"MultiDocumentResponse_TagModel_":{"title":"MultiDocumentResponse[TagModel]","required":["data"],"type":"object","properties":{"data":{"title":"Data","type":"array","items":{"$ref":"#/components/schemas/TagModel"}},"next_token":{"title":"Next Token","type":"string"}}},"MultiDocumentResponse_WorkoutModel_":{"title":"MultiDocumentResponse[WorkoutModel]","required":["data"],"type":"object","properties":{"data":{"title":"Data","type":"array","items":{"$ref":"#/components/schemas/WorkoutModel"}},"next_token":{"title":"Next Token","type":"string"}}},"PersonalInfoResponse":{"title":"PersonalInfoResponse","required":["id"],"type":"object","properties":{"id":{"title":"Id","type":"string"},"age":{"title":"Age","type":"integer"},"weight":{"title":"Weight","type":"number"},"height":{"title":"Height","type":"number"},"biological_sex":{"title":"Biological Sex","type":"string"},"email":{"title":"Email","type":"string"}}},"ReadinessContributors":{"title":"ReadinessContributors","type":"object","properties":{"activity_balance":{"title":"Activity Balance","type":"integer","default":"Contribution of cumulative activity balance in range [1, 100].","nullable":true},"body_temperature":{"title":"Body Temperature","type":"integer","default":"Contribution of body temperature in range [1, 100].","nullable":true},"hrv_balance":{"title":"Hrv Balance","type":"integer","default":"Contribution of heart rate variability balance in range [1, 100].","nullable":true},"previous_day_activity":{"title":"Previous Day Activity","type":"integer","default":"Contribution of previous day's activity in range [1, 100].","nullable":true},"previous_night":{"title":"Previous Night","type":"integer","default":"Contribution of previous night's sleep in range [1, 100].","nullable":true},"recovery_index":{"title":"Recovery Index","type":"integer","default":"Contribution of recovery index in range [1, 100].","nullable":true},"resting_heart_rate":{"title":"Resting Heart Rate","type":"integer","default":"Contribution of resting heart rate in range [1, 100].","nullable":true},"sleep_balance":{"title":"Sleep Balance","type":"integer","default":"Contribution of sleep balance in range [1, 100].","nullable":true}},"description":"Object defining readiness score contributors."},"ReadinessSummary":{"title":"ReadinessSummary","required":["contributors"],"type":"object","properties":{"contributors":{"$ref":"#/components/schemas/ReadinessContributors"},"score":{"title":"Score","type":"integer"},"temperature_deviation":{"title":"Temperature Deviation","type":"number"},"temperature_trend_deviation":{"title":"Temperature Trend Deviation","type":"number"}}},"RestModeEpisode":{"title":"RestModeEpisode","required":["tags","timestamp"],"type":"object","properties":{"tags":{"title":"Tags","type":"array","items":{"type":"string"},"description":"Tags selected for the episode."},"timestamp":{"title":"Timestamp","allOf":[{"$ref":"#/components/schemas/LocalizedDateTime"}],"description":"Timestamp indicating when the episode occurred."}},"description":"Object defining a Rest Mode episode."},"RestModePeriodModel":{"title":"RestModePeriodModel","required":["id","episodes","start_day","start_time"],"type":"object","properties":{"id":{"title":"Id","type":"string"},"end_day":{"title":"End Day","type":"string","description":"End date of rest mode.","format":"date","nullable":true},"end_time":{"title":"End Time","type":"string","description":"Timestamp when rest mode ended.","format":"date-time","nullable":true},"episodes":{"title":"Episodes","type":"array","items":{"$ref":"#/components/schemas/RestModeEpisode"},"description":"Collection of episodes during rest mode, consisting of tags."},"start_day":{"title":"Start Day","type":"string","description":"Start date of rest mode.","format":"date"},"start_time":{"title":"Start Time","type":"string","description":"Timestamp when rest mode started.","format":"date-time"}},"description":"Object contains information about rest mode episode."},"RingColor":{"title":"RingColor","enum":["glossy_black","stealth_black","rose","silver","glossy_gold"],"description":"An enumeration."},"RingConfigurationModel":{"title":"RingConfigurationModel","required":["id"],"type":"object","properties":{"id":{"title":"Id","type":"string"},"color":{"allOf":[{"$ref":"#/components/schemas/RingColor"}],"description":"Color of the ring.","nullable":true},"design":{"allOf":[{"$ref":"#/components/schemas/RingDesign"}],"description":"Design of the ring.","nullable":true},"firmware_version":{"title":"Firmware Version","type":"string","description":"Firmware version of the ring.","nullable":true},"hardware_type":{"allOf":[{"$ref":"#/components/schemas/RingHardwareType"}],"description":"Hardware type of the ring.","nullable":true},"set_up_at":{"title":"Set Up At","type":"string","description":"UTC timestamp indicating when the ring was set up.","format":"date-time","nullable":true},"size":{"title":"Size","type":"integer","description":"US size of the ring.","nullable":true}}},"RingDesign":{"title":"RingDesign","enum":["heritage","horizon"],"description":"An enumeration."},"RingHardwareType":{"title":"RingHardwareType","enum":["gen1","gen2","gen2m","gen3"],"description":"An enumeration."},"Sample":{"title":"Sample","required":["interval","items","timestamp"],"type":"object","properties":{"interval":{"title":"Interval","type":"number","description":"Interval in seconds between the sampled items."},"items":{"title":"Items","allOf":[{"$ref":"#/components/schemas/ArrayNullableFloatBits64"}],"description":"Recorded sample items."},"timestamp":{"title":"Timestamp","allOf":[{"$ref":"#/components/schemas/LocalizedDateTime"}],"description":"Timestamp when the sample recording started."}},"description":"Object defining a recorded sample."},"SessionModel":{"title":"SessionModel","required":["id","day","start_datetime","end_datetime","type"],"type":"object","properties":{"id":{"title":"Id","type":"string"},"day":{"title":"Day","type":"string","description":"The date when the session occurred.","format":"date"},"start_datetime":{"title":"Start Datetime","type":"string","description":"Timestamp indicating when the Moment ended.","format":"date-time"},"end_datetime":{"title":"End Datetime","type":"string","description":"Timestamp indicating when the Moment ended.","format":"date-time"},"type":{"$ref":"#/components/schemas/MomentType"},"heart_rate":{"$ref":"#/components/schemas/Sample"},"heart_rate_variability":{"$ref":"#/components/schemas/Sample"},"mood":{"$ref":"#/components/schemas/MomentMood"},"motion_count":{"$ref":"#/components/schemas/Sample"}}},"SleepAlgorithmVersion":{"title":"SleepAlgorithmVersion","enum":["v1","v2"],"description":"An enumeration."},"SleepContributors":{"title":"SleepContributors","type":"object","properties":{"deep_sleep":{"title":"Deep Sleep","type":"integer","description":"Contribution of deep sleep in range [1, 100].","nullable":true},"efficiency":{"title":"Efficiency","type":"integer","description":"Contribution of sleep efficiency in range [1, 100].","nullable":true},"latency":{"title":"Latency","type":"integer","description":"Contribution of sleep latency in range [1, 100].","nullable":true},"rem_sleep":{"title":"Rem Sleep","type":"integer","description":"Contribution of REM sleep in range [1, 100].","nullable":true},"restfulness":{"title":"Restfulness","type":"integer","description":"Contribution of sleep restfulness in range [1, 100].","nullable":true},"timing":{"title":"Timing","type":"integer","description":"Contribution of sleep timing in range [1, 100].","nullable":true},"total_sleep":{"title":"Total Sleep","type":"integer","description":"Contribution of total sleep in range [1, 100].","nullable":true}},"description":"Object defining sleep score contributors."},"SleepModel":{"title":"SleepModel","required":["id","bedtime_end","bedtime_start","day","low_battery_alert","period","time_in_bed","type"],"type":"object","properties":{"id":{"title":"Id","type":"string"},"average_breath":{"title":"Average Breath","type":"number","description":"Average breathing rate during sleep as breaths/second."},"average_heart_rate":{"title":"Average Heart Rate","type":"number","description":"Average heart rate during sleep as beats/minute."},"average_hrv":{"title":"Average Hrv","type":"integer","description":"Average heart rate variability during sleep."},"awake_time":{"title":"Awake Time","type":"integer","description":"Duration spent awake in seconds."},"bedtime_end":{"title":"Bedtime End","type":"string","description":"Bedtime end of the sleep.","format":"date-time"},"bedtime_start":{"title":"Bedtime Start","type":"string","description":"Bedtime start of the sleep.","format":"date-time"},"day":{"title":"Day","type":"string","description":"Day that the sleep belongs to.","format":"date"},"deep_sleep_duration":{"title":"Deep Sleep Duration","type":"integer","description":"Duration spent in deep sleep in seconds."},"efficiency":{"title":"Efficiency","type":"integer","description":"Sleep efficiency rating in range [1, 100]."},"heart_rate":{"title":"Heart Rate","allOf":[{"$ref":"#/components/schemas/Sample"}],"description":"Object containing heart rate samples."},"hrv":{"$ref":"#/components/schemas/Sample"},"latency":{"title":"Latency","type":"integer","description":"Sleep latency in seconds. This is the time it took for the user to fall asleep after going to bed."},"light_sleep_duration":{"title":"Light Sleep Duration","type":"integer","description":"Duration spent in light sleep in seconds."},"low_battery_alert":{"title":"Low Battery Alert","type":"boolean","description":"Flag indicating if a low battery alert occurred."},"lowest_heart_rate":{"title":"Lowest Heart Rate","type":"integer","description":"Lowest heart rate during sleep."},"movement_30_sec":{"title":"Movement 30 Sec","type":"string","description":"\n 30-second movement classification for the period where every character corresponds to:\n '1' = no motion,\n '2' = restless,\n '3' = tossing and turning\n '4' = active\n ","example":"1143222134"},"period":{"title":"Period","type":"integer","description":"ECore sleep period identifier."},"readiness":{"title":"Readiness","allOf":[{"$ref":"#/components/schemas/ReadinessSummary"}],"description":"Object containing the readiness details for this sleep. As opposed to the daily readiness object which represents the readiness for the entire day."},"readiness_score_delta":{"title":"Readiness Score Delta","type":"integer","description":"Effect on readiness score caused by this sleep period."},"rem_sleep_duration":{"title":"Rem Sleep Duration","type":"integer","description":"Duration spent in REM sleep in seconds."},"restless_periods":{"title":"Restless Periods","type":"integer","description":"Number of restless periods during sleep."},"sleep_phase_5_min":{"title":"Sleep Phase 5 Min","type":"string","description":"\n 5-minute sleep phase classification for the period where every character corresponds to:\n '1' = deep sleep,\n '2' = light sleep,\n '3' = REM sleep\n '4' = awake.\n ","example":"444423323441114"},"sleep_score_delta":{"title":"Sleep Score Delta","type":"integer","description":"Effect on sleep score caused by this sleep period."},"sleep_algorithm_version":{"allOf":[{"$ref":"#/components/schemas/SleepAlgorithmVersion"}],"description":"Version of the sleep algorithm used to calculate the sleep data."},"time_in_bed":{"title":"Time In Bed","type":"integer","description":"Duration spent in bed in seconds."},"total_sleep_duration":{"title":"Total Sleep Duration","type":"integer","description":"Total sleep duration in seconds."},"type":{"$ref":"#/components/schemas/SleepType"}}},"SleepTimeModel":{"title":"SleepTimeModel","required":["id","day"],"type":"object","properties":{"id":{"title":"Id","type":"string"},"day":{"title":"Day","type":"string","description":"Corresponding day for the sleep time.","format":"date"},"optimal_bedtime":{"title":"Optimal Bedtime","allOf":[{"$ref":"#/components/schemas/SleepTimeWindow"}],"description":"Optimal bedtime.","nullable":true},"recommendation":{"allOf":[{"$ref":"#/components/schemas/SleepTimeRecommendation"}],"description":"Recommended action for bedtime.","nullable":true},"status":{"allOf":[{"$ref":"#/components/schemas/SleepTimeStatus"}],"description":"Sleep time status; used to inform sleep time recommendation.","nullable":true}},"description":"Object contains suggested bedtime for the user."},"SleepTimeRecommendation":{"title":"SleepTimeRecommendation","enum":["improve_efficiency","earlier_bedtime","later_bedtime","earlier_wake_up_time","later_wake_up_time","follow_optimal_bedtime"],"description":"Possible SleepTime recommendation."},"SleepTimeStatus":{"title":"SleepTimeStatus","enum":["not_enough_nights","not_enough_recent_nights","bad_sleep_quality","only_recommended_found","optimal_found"],"type":"string","description":"Possible SleepTime status."},"SleepTimeWindow":{"title":"SleepTimeWindow","required":["day_tz","end_offset","start_offset"],"type":"object","properties":{"day_tz":{"title":"Day Tz","type":"integer","description":"Timezone offset in second from GMT of the day"},"end_offset":{"title":"End Offset","type":"integer","description":"End offset from midnight in second"},"start_offset":{"title":"Start Offset","type":"integer","description":"Start offset from midnight in second"}},"description":"Object defining sleep time window"},"SleepType":{"title":"SleepType","enum":["deleted","sleep","long_sleep","late_nap","rest"],"type":"string","description":"Possible sleep period types."},"TagModel":{"title":"TagModel","required":["id","day","timestamp","tags"],"type":"object","properties":{"id":{"title":"Id","type":"string"},"day":{"title":"Day","type":"string","description":"Day that the note belongs to.","format":"date"},"text":{"title":"Text","type":"string","description":"Textual contents of the note."},"timestamp":{"title":"Timestamp","type":"string","description":"Timestamp of the note.","format":"date-time"},"tags":{"title":"Tags","type":"array","items":{"type":"string"},"description":"Selected tags for the tag."}},"description":"A TagModel maps to an ASSANote. An ASSANote in ExtAPIV2 is called a Tag\nA TagModel will be populated by data from an ASSANote\nThe fields in the TagModel map to fields in an ASSANote"},"UpdateWebhookSubscriptionRequest":{"title":"UpdateWebhookSubscriptionRequest","required":["verification_token"],"type":"object","properties":{"verification_token":{"title":"Verification Token","type":"string"},"callback_url":{"title":"Callback Url","maxLength":2083,"minLength":1,"type":"string","format":"uri"},"event_type":{"$ref":"#/components/schemas/WebhookOperation"},"data_type":{"$ref":"#/components/schemas/ExtApiV2DataType"}}},"ValidationError":{"title":"ValidationError","required":["loc","msg","type"],"type":"object","properties":{"loc":{"title":"Location","type":"array","items":{"type":"string"}},"msg":{"title":"Message","type":"string"},"type":{"title":"Error Type","type":"string"}}},"WebhookOperation":{"title":"WebhookOperation","enum":["create","update","delete"],"description":"An enumeration."},"WebhookSubscriptionModel":{"title":"WebhookSubscriptionModel","required":["id","callback_url","event_type","data_type","expiration_time"],"type":"object","properties":{"id":{"title":"Id","type":"string","format":"uuid4"},"callback_url":{"title":"Callback Url","maxLength":2083,"minLength":1,"type":"string","format":"uri"},"event_type":{"$ref":"#/components/schemas/WebhookOperation"},"data_type":{"$ref":"#/components/schemas/ExtApiV2DataType"},"expiration_time":{"title":"Expiration Time","type":"string","format":"date-time"}}},"WorkoutIntensity":{"title":"WorkoutIntensity","enum":["easy","moderate","hard"],"type":"string","description":"Possible workout intensities."},"WorkoutModel":{"title":"WorkoutModel","required":["id","activity","day","end_datetime","intensity","source","start_datetime"],"type":"object","properties":{"id":{"title":"Id","type":"string"},"activity":{"title":"Activity","type":"string","description":"Type of the workout activity."},"calories":{"title":"Calories","type":"number","description":"Energy burned in kilocalories during the workout."},"day":{"title":"Day","type":"string","description":"Day when the workout occurred.","format":"date"},"distance":{"title":"Distance","type":"number","description":"Distance traveled in meters during the workout."},"end_datetime":{"title":"End Datetime","type":"string","description":"Timestamp indicating when the workout ended.","format":"date-time"},"intensity":{"$ref":"#/components/schemas/WorkoutIntensity"},"label":{"title":"Label","type":"string","description":"User-defined label for the workout."},"source":{"allOf":[{"$ref":"#/components/schemas/WorkoutSource"}],"description":"Possible workout sources."},"start_datetime":{"title":"Start Datetime","type":"string","description":"Timestamp indicating when the workout started.","format":"date-time"}}},"WorkoutSource":{"title":"WorkoutSource","enum":["manual","autodetected","confirmed","workout_heart_rate"],"description":"An enumeration."}}},"tags":[{"name":"Daily Activity Routes","description":"The Daily Activity scope includes daily activity summary values and detailed activity levels. Activity levels are expressed in [metabolic equivalent of task minutes](https://en.wikipedia.org/wiki/Metabolic_equivalent) (MET mins). Oura tracks activity based on the movement."},{"name":"Daily Readiness Routes","description":"Readiness tells how ready you are for the day."},{"name":"Daily Sleep Routes","description":"Sleep period is a nearly continuous, longish period of time spent lying down in bed."},{"name":"Daily Spo2 Routes","description":"The Daily spO2 (blood oxygenation) routes include daily SpO2 average. Data will only be available for users with a Gen 3 Oura Ring","externalDocs":{"description":"Blood Oxygen Sensing (SpO2) on Oura","url":"https://ouraring.com/blog/blood-oxygen-sensing-spo2/?g_acctid=553-919-5922&g_adgroupid=&g_adid=&g_adtype=none&g_campaign=pmax_prospecting-retargeting_integrated_allgeos_purchase_english&g_campaignid=17714554930&g_keyword=&g_keywordid=&g_network=x&utm_campaign=pmax_prospecting-retargeting_integrated_allgeos_purchase_english&utm_content=sleeplab_prospecting_allgeos_en_static_video&utm_medium=cpc&utm_source=google&utm_source=google_pmax&gclid=CjwKCAjwloynBhBbEiwAGY25dC2B6syXyPhIQ1Bo8IufRQrBWtooTEFkclzEWdUCHNZIoq5SzurHaRoCsukQAvD_BwE"}},{"name":"Heart Rate Routes","description":"The Heart Rate data scope includes time-series heart rate data throughout the day and night. Heart rate is provided at 5-minute increments. For heart rate data recorded from a Session, see Sessions endpoint.","externalDocs":{"description":"How accurate is the heart rate data generated by the Oura Ring?","url":"https://ouraring.com/blog/how-accurate-is-oura/"}},{"name":"Personal Info Routes","description":"The Personal Info scope includes personal information (e.g. age, email, weight, and height) about the user. You can access the id on the personal_info route with any access token (no scopes are required)."},{"name":"Rest Mode Period Routes","description":"The Rest Mode scope includes information about rest mode periods. This includes the start, end time and detaials of the rest mode period."},{"name":"Ring Configuration Routes","description":"The Ring Configuration scope includes information about the user's ring(s). This includes the model, size, color, etc."},{"name":"Session Routes","description":"The Sessions data scope provides information on how users engage with guided and unguided sessions in the Oura app, including the user’s biometric trends during the sessions.","externalDocs":{"description":"Learn about the available session types within the Explore Tab","url":"https://ouraring.com/blog/oura-explore-tab/"}},{"name":"Sleep Routes","description":"Returns Oura Sleep data for the specified Oura user within a given timeframe. A user can have multiple sleep periods per day."},{"name":"Sleep Time Routes","description":"Recommendations for the optimal bedtime window that is calculated based on sleep data."},{"name":"Tag Routes","description":"The Tags data scope includes tags that Oura users enter within the Oura mobile app. Tags are a growing list of activities, environment factors, symptoms, emotions, and other aspects that provide broader context into what’s happening with users beyond the objective data generated by the Oura Ring.\n\n[More information on tag translations](https://cloud.ouraring.com/edu/tag-translations)","externalDocs":{"description":"More information about tags","url":"https://ouraring.com/blog/tags/"}},{"name":"Workout Routes","description":"The Workout data scope includes information about user workouts. This is a diverse, growing list of workouts that help inform how the user is training and exercising."},{"name":"Webhook Subscription Routes","description":"Webhooks enable you to receive near real-time Oura data updates and are the preferred way to receive the latest data from the Oura API.\n\n## Setup\n\nCreate a new webhook subscription by calling the `POST /v2/webhook/subscription` endpoint. Requests to the `/v2/webhook/subscription` are authenticated using the `client_id` and `client_secret` you received when creating your application and should be included in the HTTP header as `x-client-id` and `x-client-secret`, respectively.\n\nWebhook subscriptions are required for each data type and event type pair. For example, updates to `tag` is a separate subscription from created `tag` and updates to `workouts`. This enables the option for different callback URLs for each pair.\n\n### Verification\n\nA one-time verification occurs whenever creating or updating a subscription. Your server must respond to a request made to the `GET` method of your callback URL. The `GET` method must respond with a challenge code within 2 seconds. The request schema is as follows: `https://{your-callback-url}?verification_token={request.verification_token}&challenge={random-string}`. You should verify the `verification_token` is correct to ensure Oura is the one calling your API. Parse the challenge string from the query parameters and return the string in the body of your response. Example response body:\n```\n{\n \"challenge\": \"give-me-a-challenge\"\n}\n```\n\nThis process is visually represented as follows:\n\n\n## Webhook Delivery\n\n\nCallback URLs must respond with a 2xx or 3xx response code **within 10 seconds**. Any other condition is considered a failure on the client-side. We recommend processing events asynchronously to keep your response time quick.\n\nWebhooks are sent to the POST method of your callback url in the following format:\n\n#### POST Body\n```\n{\n \"event_type\": \"<event-type>\",\n \"data_type\": \"<data-type>\",\n \"object_id\": \"<object-id>\",\n \"event_time\": \"<iso-datetime\",\n \"user_id\": \"<user-id>\"\n}\n```\n\n#### Headers\n```\n{\n \"x-oura-signature\": \"<hmac-signature-of-timestamp-and-body>\",\n \"x-oura-timestamp\": \"<dispatch-timestamp>\",\n}\n```\n\n### Example POST Data\n\n### POST Body\n```\n{\n \"event_type\": \"update\",\n \"data_type\": \"tag\",\n \"object_id\": \"9fc867f2-b455-4c41-a05a-751c6e764ffa\",\n \"event_time\": \"2022-11-16T08:21:00+00:00\",\n \"user_id\": \"bd913327d56d-a0adf03b515a1d8ed46082e\"\n}\n```\n\n#### Headers\n```\n{\n \"x-oura-signature\": \"EA12F1F226BCA425AA10FFE3D318D284FC189DE6CFF62675883F49F6AF68F5A9\",\n \"x-oura-timestamp\": \"1671561207502\",\n}\n```\n\n### Client Failure Handling\n\nAttempted redelivery of events over the course of an hour will occur for the following failures:\n\nResponse Code | Action\n-- | --\n4xx | 10 retries\n5xx | 10 retries\nTime Out | 10 retries\n\n## Security\n\n### Verify HMAC Signature\n\nEach event contains a `x-oura-signature` and `x-oura-timestamp` header. The `x-oura-signature` header is a HMAC signature of the timestamp and request body, using your client application secret as the hash key. We strongly recommend generating your own HMAC signature to verify it matches the header. Non-matching signatures could indicate data originated from an attacker.\n\nPseudocode for generating your own HMAC signature:\n```\ngenerate_hmac_256_signature(key=your_client_secret, data=str(timestamp) + str(payload_data))\n```\n\n## FYIs\n\n### Deduplication\n\nEvents sent in rapid succession (received from the client within milliseconds) are deduplicated. Events which are duplicated over longer periods of time (received from the client within multiple minutes) are *not* deduplicated. Expect at-least-once delivery.\n\n### Delayed Delivery\n\n[For awareness] Upon service outage, messages may be delivered with significant delays.\n\n### Automatically Cancel Subscription\n\nWebhook subscriptions are automatically canceled if a callback responds with a 410 status code.\n "}]}