Stats

Stats

Allows a logged in user to get stats on all goals.

Path

GET /stats

Headers

FieldTypeDescription
Content-Typestringapplication/x-www-form-urlencoded

Body

FieldTypeDescription
AuthorizationstringJWT 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

FieldTypeDescription
Content-Typestringapplication/x-www-form-urlencoded

Body

FieldTypeDescription
AuthorizationstringJWT 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
  }
}