POST /api/authToken
Name | Type | Description |
---|---|---|
username | String | Username |
password | String | Plaintext Password |
POST /api/authenticate
Name | Type | Description |
---|---|---|
token | String | JWT token that was obtained from /api/authToken |
GET /api/users/:username
Name | Type | Description |
---|---|---|
username | String | Username of the user to be found |
POST /api/users
Saves a new user in the database. All user details are to be provided in the request body. The response status is set to 409 Conflict
if the username is already taken. 201 Created
is returned if the user is saved successfully.
GET /api/users/:username/badges
Name | Type | Description |
---|---|---|
username | String | Username of the user to be found |
GET /api/:username/metrics/heartRate
Name | Type | Description |
---|---|---|
username | String | Username of the user to be found |
GET /api/:username/playgrounds
Name | Type | Description |
---|---|---|
username | String | Username of the user |
POST /api/:username/badges
Name | Type | Description |
---|---|---|
username | String | Username of the user |
Name | Type | Description |
---|---|---|
badgeId | String | ID of the badge to be awarded |
POST /api/badges
Name | Type | Description |
---|---|---|
id | String | ID of the badge |
GET /api/badges/:id
Name | Type | Description |
---|---|---|
id | String | ID of the badge |
GET /api/playgrounds/:id
404 Not Found
is set as the status if the playground is not found.
Name | Type | Description |
---|---|---|
id | String | ID of the playground |
POST /api/playgrounds
Saves a new playground in the database. All playground details are to be provided in the request body. The response status is set to 409 Conflict
if the id is already taken. 201 Created
is returned if the playground is saved successfully.
POST /api/playgrounds/:id/users
201 Created
is returned if the user is successfully added.
Name | Type | Description |
---|---|---|
id | String | ID of the playground |
Name | Type | Description |
---|---|---|
userId | String | ID of the user to be added |
GET /api/playgrounds/:id/users
Name | Type | Description |
---|---|---|
id | String | ID of the playground |
GET /api/playgrounds/:id/inviteLink
Name | Type | Description |
---|---|---|
id | String | ID of the playground |
GET /api/playgrounds/inviteLink/:link
Name | Type | Description |
---|---|---|
link | String | A random 10 character code associated with a playground |
Name | Type | Description |
---|---|---|
username | String | Username of the user to be added |