TrackingTime API

Dashboard Stats

These are the API services that crunch the data for the dashboard widgets.

Available Endpoints

Team Hours

An overview of the hours worked by the team in different time periods: today, current week, current month or last month.

Action URL

/dashboard/team_hours


Type Parameter Description Required
Date from Use from and to if you want to get stats for a specific time period. NO
Date to NO
String filter Instead of using from and to, you can use a predefined filter: [ TODAY | THIS_WEEK | THIS_MONTH | LAST_MONTH ] YES

Response

{"response":{"status":200,"message":"Request completed successfully"},"data":{
  "users": [
    {
      "name": "Diego",
      "surname": "Wyllie",
      "avatar_url": "http://static.trackingtime.mobi/1.png",
      "worked_hours": 1461.42,
      "loc_worked_hours": "1461:25",
      "id": 1
    },
    {
      "name": "Eric",
      "surname": "Tulle",
      "avatar_url": "http://static.trackingtime.mobi/2.png",
      "worked_hours": 1061.42,
      "loc_worked_hours": "1061:25",
      "id": 1
    }
  ]
}}
                        

Company Hours

An overview of the total amount of hours the whole company worked in different time periods: today, this week, last month, this month and this year.

Action URL

/dashboard/company_hours

Response

{"response":{"status":200,"message":"Request completed successfully"},"data":{
  "today": {
    "worked_hours": 0.0,
    "loc_worked_hours": "00:00",
    "user_average": "0",
    "active_users": 0
  },
  "this_week": {
    "worked_hours": 0.0,
    "loc_worked_hours": "00:00",
    "user_average": "0",
    "active_users": 0
  },
  "this_month": {
    "worked_hours": 0.0,
    "loc_worked_hours": "00:00",
    "user_average": "0",
    "active_users": 0
  },
  "last_month": {
    "worked_hours": 0.0,
    "loc_worked_hours": "00:00",
    "user_average": "0",
    "active_users": 0
  },
  "this_year": {
    "worked_hours": 1061.42,
    "loc_worked_hours": "1061:25",
    "user_average": "1061.42",
    "active_users": 1
  }
}}