Oura Enhanced Tag Routes API
The Enhanced Tag Routes API from Oura — 2 operation(s) for enhanced tag routes.
The Enhanced Tag Routes API from Oura — 2 operation(s) for enhanced tag routes.
openapi: 3.1.0
info:
title: Oura Daily Activity Routes Enhanced Tag Routes API
version: '2.0'
tags:
- name: Enhanced Tag Routes
paths:
/v2/usercollection/enhanced_tag:
get:
tags:
- Enhanced Tag Routes
summary: Multiple Enhanced Tag Documents
operationId: Multiple_enhanced_tag_Documents_v2_usercollection_enhanced_tag_get
parameters:
- name: start_date
in: query
required: false
schema:
anyOf:
- type: string
format: date-time
- type: string
format: date
- type: 'null'
title: Start Date
- name: end_date
in: query
required: false
schema:
anyOf:
- type: string
format: date-time
- type: string
format: date
- type: 'null'
title: End Date
- name: next_token
in: query
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: Next Token
- name: fields
in: query
required: false
schema:
anyOf:
- type: string
- type: 'null'
description: N/A. This route does not support field selection yet, all fields will be returned.
title: Fields
description: N/A. This route does not support field selection yet, all fields will be returned.
responses:
'200':
description: Successful Response
content:
application/json:
schema:
anyOf:
- $ref: '#/components/schemas/MultiDocumentResponse_EnhancedTagModel_'
- $ref: '#/components/schemas/MultiDocumentResponseDict'
title: Response Multiple Enhanced Tag Documents V2 Usercollection Enhanced Tag Get
'400':
description: Client Exception
'401':
description: Unauthorized access exception. Usually means the access token is expired, malformed or revoked.
'403':
description: Access forbidden. Usually means the user's subscription to Oura has expired and their data is not available via the API.
'429':
description: Request Rate Limit Exceeded.
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
security:
- BearerAuth: []
- OAuth2: []
x-codeSamples:
- lang: cURL
label: cURL
source: 'curl --location --request GET ''https://api.ouraring.com/v2/usercollection/enhanced_tag?start_date=2021-11-01&end_date=2021-12-01'' \
--header ''Authorization: Bearer <token>'''
- lang: Python
source: "import requests \nurl = 'https://api.ouraring.com/v2/usercollection/enhanced_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/enhanced_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/enhanced_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/enhanced_tag/{document_id}:
get:
tags:
- Enhanced Tag Routes
summary: Single Enhanced Tag Document
operationId: Single_enhanced_tag_Document_v2_usercollection_enhanced_tag__document_id__get
parameters:
- name: document_id
in: path
required: true
schema:
type: string
title: Document Id
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/EnhancedTagModel'
'404':
description: Not Found
'400':
description: Client Exception
'401':
description: Unauthorized access exception. Usually means the access token is expired, malformed or revoked.
'403':
description: Access forbidden. Usually means the user's subscription to Oura has expired and their data is not available via the API.
'429':
description: Request Rate Limit Exceeded.
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
security:
- BearerAuth: []
- OAuth2: []
x-codeSamples:
- lang: cURL
label: cURL
source: 'curl --location --request GET ''https://api.ouraring.com/v2/usercollection/enhanced_tag/2-5daccc095220cc5493a4e9c2b681ca941e'' \
--header ''Authorization: Bearer <token>'''
- lang: Python
source: "import requests \nurl = 'https://api.ouraring.com/v2/usercollection/enhanced_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/enhanced_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/enhanced_tag/2-5daccc095220cc5493a4e9c2b681ca941e\") \n .method(\"GET\", null) \n .addHeader(\"Authorization\", \"Bearer <token>\") \n .build(); \nResponse response = client.newCall(request).execute();"
label: Java
components:
schemas:
ValidationError:
properties:
loc:
items:
anyOf:
- type: string
- type: integer
type: array
title: Location
msg:
type: string
title: Message
type:
type: string
title: Error Type
type: object
required:
- loc
- msg
- type
title: ValidationError
HTTPValidationError:
properties:
detail:
items:
$ref: '#/components/schemas/ValidationError'
type: array
title: Detail
type: object
title: HTTPValidationError
LocalDateTime:
type: string
MultiDocumentResponse_EnhancedTagModel_:
properties:
data:
items:
$ref: '#/components/schemas/EnhancedTagModel'
type: array
title: Data
next_token:
anyOf:
- type: string
- type: 'null'
title: Next Token
type: object
required:
- data
- next_token
title: MultiDocumentResponse[EnhancedTagModel]
MultiDocumentResponseDict:
properties:
data:
items:
additionalProperties: true
type: object
type: array
title: Data
next_token:
anyOf:
- type: string
- type: 'null'
title: Next Token
type: object
required:
- data
- next_token
title: MultiDocumentResponseDict
EnhancedTagModel:
properties:
id:
type: string
title: Id
tag_type_code:
anyOf:
- type: string
- type: 'null'
title: Tag Type Code
description: The unique code of the selected tag type, `NULL` for text-only tags, or `custom` for custom tag types.
start_time:
$ref: '#/components/schemas/LocalDateTime'
description: Timestamp of the tag (if no duration) or the start time of the tag (with duration).
end_time:
anyOf:
- $ref: '#/components/schemas/LocalDateTime'
- type: 'null'
description: Timestamp of the tag's end for events with duration or `NULL` if there is no duration.
start_day:
type: string
format: date
title: Start Day
description: Day of the tag (if no duration) or the start day of the tag (with duration).
end_day:
anyOf:
- type: string
format: date
- type: 'null'
title: End Day
description: Day of the tag's end for events with duration or `NULL` if there is no duration.
comment:
anyOf:
- type: string
- type: 'null'
title: Comment
description: Additional freeform text on the tag.
custom_name:
anyOf:
- type: string
- type: 'null'
title: Custom Name
description: The name of the tag if the tag_type_code is `custom`.
type: object
required:
- id
- start_time
- start_day
title: EnhancedTagModel
description: 'An EnhancedTagModel maps an ASSATag. An ASSATag in ExtAPIV2 is called a EnhancedTag
An EnhancedTagModel will be populated by data from an ASSATag
The fields in the EnhancedTagModel map to fields in an ASSATag'