Stats
Stats
Allows a logged in user to get stats on all goals.
Path
GET /stats
Headers
Field | Type | Description |
---|---|---|
Content-Type | string | application/x-www-form-urlencoded |
Body
Field | Type | Description |
---|---|---|
Authorization | string | JWT access token. |
Example
curl --location --request GET 'https://www.example.com/api/stats' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiI1ZjRiZmYxMjEwMzdlNDI0YTE3YTNlYmMiLCJpYXQiOjE1OTkyNDE1OTMsImV4cCI6MTU5OTI0MzM5M30.FuLUNEc_lE8jI2KEur0KsQzZFjIh5kymnLdR0Udycxk'
{
"code": 200,
"weekly": {
"completed": 1,
"notCompleted": 1,
"total": 2
}
}
Weekly Goals
Allows a logged in user to get stats on weekly goals.
Path
GET /stats/weekly
Headers
Field | Type | Description |
---|---|---|
Content-Type | string | application/x-www-form-urlencoded |
Body
Field | Type | Description |
---|---|---|
Authorization | string | JWT access token. |
Example
curl --location --request GET 'https://www.example.com/api/stats/weekly' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiI1ZjRiZmYxMjEwMzdlNDI0YTE3YTNlYmMiLCJpYXQiOjE1OTkyNDE1OTMsImV4cCI6MTU5OTI0MzM5M30.FuLUNEc_lE8jI2KEur0KsQzZFjIh5kymnLdR0Udycxk'
{
"code": 200,
"weekly": {
"completed": 1,
"notCompleted": 1,
"total": 2
}
}