-
Notifications
You must be signed in to change notification settings - Fork 1
Home
The Wellness Building Block (Wellness BB) is the service responsible for managing user wellness data in the Rokwire platform. This includes user Wellness Ring progress and Todo Lists.
API level documentation for this Building Block can be accessed by visiting https://api.rokwire.illinois.edu/wellness/doc/ui/. This documentation conforms to the OpenAPI 3.0 standard. For the raw YAML documentation, you can visit https://api.rokwire.illinois.edu/wellness/doc.
This Wiki provides an overview of the functionality included in the Wellness Building Block. It includes the following sections:
Todo lists allow users to define and organize tasks that they need to complete.
Todo Entries represent individual tasks created by users. To create a new Todo Entry, the user can make a request to the POST /api/user/todo_entries endpoint. To retrieve all existing Todo Entries, the user can make a request to the GET /api/user/todo_entries endpoint.
Todo Entries contain the following data:
Name | Key | Type | Required | Description | Example |
---|---|---|---|---|---|
ID | id |
string | true | The unique identifier generated by the system for this item. | a8ea68e8-750d-4743-a6de-5a35498a8fb4 |
Organization ID | org_id |
string | true | The unique identifier of the Organization with which the item is associated. | 380bd40a-12ad-47e6-a4d0-835d1d29fc76 |
Application ID | app_id |
string | true | The unique identifier of the Application with which the item is associated. | 380bd40a-12ad-47e6-a4d0-835d1d29fc76 |
User ID | user_id |
string | true | The Account ID of the user that created this task | cf8a2cc9-48cd-43b3-8003-e6f21c756db2 |
Title | title |
string | true | The title of the task to be completed | Read chapter 3 |
Description | description |
string | false | A description of the task to be completed | Finish reading chapter 3 for english class |
Category | category |
Todo Entry Category | false | The category of the task | |
Work Days | work_days |
list (string) | false | List of days to work on the task in yyyy-MM-dd format |
[2022-06-10, 2022-06-11, 2022-06-12] |
Location | location |
Todo Location | false | The Todo Location associated with this task | |
Completed | completed |
boolean | true | A flag indicating if the task has been completed | false |
Has Due Time | has_due_time |
boolean | true | A flag indicating if the task has a due time | false |
Due Date Time | due_date_time |
string | false | The date and time this task is due. Uses DateTime format | 2022-06-30T14:30:00Z |
Reminder Date Time | reminder_date_time |
DateTime | false | The date and time to send a reminder about this task | 2022-06-30T14:30:00Z |
Date Created | date_created |
DateTime | true | The time that this item was originally created | 2022-06-01T12:21:06Z |
Date Updated | date_updated |
DateTime | false | The time that this item was last updated | 2022-06-06T21:23:19Z |
Todo Entry Categories are references to Todo Categories which are stored inside of Todo Entries for easy access. Todo Entry Categories contain the following data:
Name | Key | Type | Required | Description | Example |
---|---|---|---|---|---|
ID | id |
string | true | The unique identifier generated by the system for this item. | 46cc43e1-b9b3-406e-80d6-af8e4d719cc8 |
Name | name |
string | true | The name of this category | Homework |
Color | color |
string | true | The hexadecimal color code for this category | #FF0000 |
Reminder Type | reminder_type |
string | true | The type of reminder for tasks in this category. Options are night_before , morning_of , and none
|
night_before |
Todo Entry Locations represent a geographic location associated with a task. Todo Entry Locations contain the following data:
Name | Key | Type | Required | Description | Example |
---|---|---|---|---|---|
Latitude | latitude |
float | true | The latitude of the location | 40.10939880806252 |
Longitude | longitude |
float | true | The longitude of the location | -88.22723323081459 |
Todo Categories are organizational tools that users may create to group Todo Entries together.To create a new category, a user can make a request to the POST /api/user/todo_categories endpoint. To retrieve all existing Todo Categories, the user can make a request to the GET /api/user/todo_categories endpoint.
Todo Categories contain the following data:
Name | Key | Type | Required | Description | Example |
---|---|---|---|---|---|
ID | id |
string | true | The unique identifier generated by the system for this item. | 46cc43e1-b9b3-406e-80d6-af8e4d719cc8 |
Organization ID | org_id |
string | false | The unique identifier of the Organization with which the item is associated. | 380bd40a-12ad-47e6-a4d0-835d1d29fc76 |
Application ID | app_id |
string | true | The unique identifier of the Application with which the item is associated. | 380bd40a-12ad-47e6-a4d0-835d1d29fc76 |
User ID | user_id |
string | true | The Account ID of the user that created this category | cf8a2cc9-48cd-43b3-8003-e6f21c756db2 |
Name | name |
string | true | The name of this category | Homework |
Color | color |
string | true | The hexadecimal color code for this category | #FF0000 |
Reminder Type | reminder_type |
string | true | The type of reminder for tasks in this category. Options are night_before , morning_of , and none
|
night_before |
Date Created | date_created |
DateTime | true | The time that this item was originally created | 2022-06-01T12:21:06Z |
Date Updated | date_updated |
DateTime | false | The time that this item was last updated | 2022-06-06T21:23:19Z |
Wellness Rings allow users to set goals and track progress on recurring goals to build positive habits.
A Ring represents one of the rings tracked by a given user. A user can retrieve their Rings by making a request to the GET /api/user/rings endpoint.
Rings contain the following data:
Name | Key | Type | Required | Description | Example |
---|---|---|---|---|---|
ID | id |
string | true | The unique identifier generated by the system for this item. | 350a4aa8-9d0b-4839-ab24-e4ded18aa4a6 |
Organization ID | org_id |
string | true | The unique identifier of the Organization with which the item is associated. | 380bd40a-12ad-47e6-a4d0-835d1d29fc76 |
Application ID | app_id |
string | true | The unique identifier of the Application with which the item is associated. | 380bd40a-12ad-47e6-a4d0-835d1d29fc76 |
User ID | user_id |
string | true | The Account ID of the user that created this category | cf8a2cc9-48cd-43b3-8003-e6f21c756db2 |
History | history |
List (Ring History Entry) | false | A list of Ring History Entries for this ring | |
Color | color |
string | true | The hexadecimal color code for this category | #FF0000 |
Date Created | date_created |
DateTime | true | The time that this item was originally created | 2022-06-01T12:21:06Z |
Date Updated | date_updated |
DateTime | false | The time that this item was last updated | 2022-06-06T21:23:19Z |
Ring History Entries represent a definition of the goal associated with a Ring at a given time. If the definition of the goal associated with a Ring is updated using the POST /api/user/rings/{id}/history endpoint, a new Ring History Entry will be created.
Ring History Entries contain the following data:
Name | Key | Type | Required | Description | Example |
---|---|---|---|---|---|
ID | id |
string | true | The unique identifier generated by the system for this item | 9ca66e47-6728-439c-936f-ccbbf9266d9b |
Ring ID | ring_id |
string | true | The unique identifier of the Ring with which the item is associated | 350a4aa8-9d0b-4839-ab24-e4ded18aa4a6 |
Color | color |
string | true | The hexadecimal color code for this ring for this entry | #FF0000 |
Name | name |
string | true | The name of this ring for this entry | Mindfulness |
Unit | unit |
string | true | The unit of this ring for this entry | moment |
Value | value |
float | true | The goal value of this ring for this entry | 1 |
Date Created | date_created |
DateTime | true | The time that this item was originally created | 2022-06-01T12:21:06Z |
Date Updated | date_updated |
DateTime | false | The time that this item was last updated | 2022-06-06T21:23:19Z |
Ring Records represent individual daily records for a given Ring. Past Ring Records can be retrieved using the GET /api/user/all_ring_records endpoint to get records for all rings, or the GET /api/user/rings/{id}/records endpoint to get the records for a specific ring. New Ring Records can be created using the POST /api/user/rings/{id}/records endpoint.
Ring Records contain the following data:
Name | Key | Type | Required | Description | Example |
---|---|---|---|---|---|
ID | id |
string | true | The unique identifier generated by the system for this item. | fa887d12-c0cf-424a-af17-db8b848663bf |
Organization ID | org_id |
string | true | The unique identifier of the Organization with which the item is associated. | 380bd40a-12ad-47e6-a4d0-835d1d29fc76 |
Application ID | app_id |
string | true | The unique identifier of the Application with which the item is associated. | 380bd40a-12ad-47e6-a4d0-835d1d29fc76 |
User ID | user_id |
string | true | The Account ID of the user that created this category | cf8a2cc9-48cd-43b3-8003-e6f21c756db2 |
Ring ID | ring_id |
string | true | The unique identifier of the Ring with which the record is associated | 350a4aa8-9d0b-4839-ab24-e4ded18aa4a6 |
Value | value |
float | true | The value completed in this record | 1 |
Date Created | date_created |
DateTime | true | The time that this item was originally created | 2022-06-01T12:21:06Z |
Date Updated | date_updated |
DateTime | false | The time that this item was last updated | 2022-06-06T21:23:19Z |
The Wellness BB integrates with the Notifications Building Block to send Notification Messages to remind users of their Todo Entries that are due on the current day. To enable this integration, the following environment variables must be configured:
- INTERNAL_API_KEY: The internal API key used to authenticate with the Notifications Building Block