Introduction

Welcome to the TimeWatchR API! You can use our API to access TimeWatchR API endpoints.
You can push and pull data to and from TimeWatchR, and integrate it with your systems by using TimeWatchR's REST-based API.
This is a standard RESTful API using a JSON body. Here we have explained, how can you use TimeWatchR APIs.

Authentication

In each requests, you have to include "X-Api-Key" in request header, which is your API Key.
You will find your API Key in settings.

http://timewatchr.azurewebsites.net/api/v1

Get Clients

Get Clients API is used to get clients details of perticular workspace.
Filters can be applied as query parameters listed below.

GET /Clients/GetClientsList?CurrentWorkSapceId={WorkSapceId}

Request Parameters

Parameter Type Description
PageNo int
Default: 1
Page
PageSize int
Default: 50
Page Size
Name string If provided, clients will be filtered by client name
Archived boolean

If true, you'll get only archived clients.
If false, you'll get only active clients.

SortColumn string Possible value: NAME
SortOrder string For ASCENDING: ASC
For DESCENDING: DESC
/Clients/GetClientsList?CurrentWorkSapceId=1&PageNo=2&PageSize=10&Name=jack&Archived=true&SortColumn=Name&SortOrder=asc

Response

200 OK OK
401 Unauthorized Unauthorized
403 Forbidden Forbidden
404 Not Found Not Found
[
    {
        "ClientId": 1,
        "ClientName": "jack",
        "WorkspaceId": 1,
        "Status": "Pending",
        "Type": "Active"
    },
    {
        "ClientId": 2,
        "ClientName": "Ben Bill",
        "WorkspaceId": 1,
        "Status": "InProcess",
        "Type": "Active"
    },
    {
        "ClientId": 60,
        "ClientName": "jack jill",
        "WorkspaceId": 1,
        "Status": "Pending",
        "Type": "Active"
    },
    {
        "ClientId": 68,
        "ClientName": "test client",
        "WorkspaceId": 1,
        "Status": "InProcess",
        "Type": "Active"
    }
]

Get Projects

Get Projects API is used to get Projects details of perticular workspace.
Filters can be applied as query parameters listed below.

GET /Projects/GetProjectsList?CurrentWorkSapceId={WorkSapceId}

Request Parameters

Parameter Type Description
PageNo int
Default: 1
Page
PageSize int
Default: 50
Page Size
ProjectName string If provided, projects will be filtered by project name
ProjectStatus boolean

If true, you'll get only active project.
If false, you'll get only OnHold project.

IsBillable boolean

If true, you'll get only billable projects.
If false, you'll get only Non-billable projects.

ClientId Array
< String>
you have to pass list of comma seprated ClientIds, ex:- 1,2,3
you will get project with perticular clients.
ClientType string Possible values: ACTIVE, ARCHIVED
SortColumn string Possible value: ProjectName
SortOrder string For ASCENDING: ASC
For DESCENDING: DESC
/Projects/GetProjectsList?CurrentWorkSapceId=1&PageNo=1&PageSize=5&ProjectName=API&ProjectStatus=false&IsBillable=false&ClientId=3,7&ClientType=ARCHIVED&SortColumn=projectname&SortOrder=asc

Response

200 OK OK
401 Unauthorized Unauthorized
403 Forbidden Forbidden
404 Not Found Not Found
[
    {
        "ProjectId": 105,
        "ProjectName": "test project",
        "WorkspaceId": 1,
        "Status": "Active",
        "Billing": "Non-billable",
        "Currency": "USD",
        "RateType": null,
        "Client": {
            "ClientId": 2,
            "ClientName": "Ben Bill",
            "WorkspaceId": 1,
            "Status": "InProcess",
            "Type": "Active"
        }
    },
    {
        "ProjectId": 8,
        "ProjectName": "Google API",
        "WorkspaceId": 1,
        "Status": "OnHold",
        "Billing": "Billable",
        "Currency": "USD",
        "RateType": "Fixed Rate",
        "Client": {
            "ClientId": 2,
            "ClientName": "Ben Bill",
            "WorkspaceId": 1,
            "Status": "InProcess",
            "Type": "Active"
        }
    },
    {
        "ProjectId": 7,
        "ProjectName": "Quickbooks",
        "WorkspaceId": 1,
        "Status": "Active",
        "Billing": "Billable",
        "Currency": "USD",
        "RateType": "Multi Rate",
        "Client": {
            "ClientId": 3,
            "ClientName": "shlomo",
            "WorkspaceId": 1,
            "Status": "Delivered",
            "Type": "Archive"
        }
    }
]

Get Projects

Get Projects API By Id is used to find Project detail by Project id in perticular workspace.
You have to pass ProjectId as query parameter.

GET /Projects/GetProjectsList?CurrentWorkSapceId={WorkSapceId}&ProjectId={ProjectId}

Request Parameters

Parameter Type Description
ProjectId int Project Id
/Projects/GetProjectsList?CurrentWorkSapceId=1&ProjectId=105

Response

200 OK OK
401 Unauthorized Unauthorized
403 Forbidden Forbidden
404 Not Found Not Found
[
    {
        "ProjectId": 105,
        "ProjectName": "test project",
        "WorkspaceId": 1,
        "Status": "Active",
        "Billing": "Non-billable",
        "Currency": "USD",
        "RateType": null,
        "Client": {
            "ClientId": 2,
            "ClientName": "Ben Bill",
            "WorkspaceId": 1,
            "Status": "InProcess",
            "Type": "Active"
        }
    }
]

Get Currrent User's Info

Get User Info API is used to get current user's info which X-Api-Key is passed(used in header).

GET /Users/GetUserInfo

Response

200 OK OK
401 Unauthorized Unauthorized
403 Forbidden Forbidden
404 Not Found Not Found
{
    "WorkspaceId": 101,
    "UserId": 101,
    "UserName": "User Name",
    "Email": "UserEmail@email.com",
    "ProfilePicture": "http://timewatchr.azurewebsites.net/UploadedImages/UserProfileImages/DefaultProfile.png",
    "Status": "Active"
}

Get All Users Info

Get All Users Info API is used to get all user's info in workspace.
Filters can be applied as query parameters listed below.

GET /Users/GetUserInfo?WorkSapceId={WorkSapceId}

Request Parameters

Parameter Type Description
PageNo int
Default: 1
Page
PageSize int
Default: 50
Page Size
Email string If provided, users will be filtered by email
Name string If provided, users will be filtered by name
ProjectId Array
< String>
you have to pass list of comma seprated ProjectIds, ex:- 1,2,3
you will get user with perticular assigned projects.
Status string Possible values: "ACTIVE", "DEACTIVE", "PENDING"
SortColumn string Possible value: UserId,UserName,Email
SortOrder string For ASCENDING: ASC
For DESCENDING: DESC
/Users/GetUserInfo?WorkSapceId=1&PageNo=9&PageSize=2&Email=dev&Name=33&ProjectId=134,8,1&Status=DEACTIVE&SortColumn=username&SortOrder=asc

Response

200 OK OK
401 Unauthorized Unauthorized
403 Forbidden Forbidden
404 Not Found Not Found
[
    {
        "WorkspaceId": 1,
        "UserId": 90,
        "UserName": "dev 1",
        "Email": "dev1@email.com",
        "ProfilePicture": "http://timewatchr.azurewebsites.net/UploadedImages/UserProfileImages/DefaultProfile.png",
        "Status": "ACTIVE"
    },
    {
        "WorkspaceId": 1,
        "UserId": 91,
        "UserName": "dev 2",
        "Email": "dev2@email.com",
        "ProfilePicture": "http://timewatchr.azurewebsites.net/UploadedImages/UserProfileImages/DefaultProfile.png",
        "Status": "ACTIVE"
    },
    {
        "WorkspaceId": 1,
        "UserId": 337,
        "UserName": "developer 33",
        "Email": "dev3@email.com",
        "ProfilePicture": "http://timewatchr.azurewebsites.net/UploadedImages/UserProfileImages/DefaultProfile.png",
        "Status": "ACTIVE"
    }
]

Get Currrent User's WorkSpaces Info

Get WorkSpace Info API is used to get current user's WorkSpaces info which X-Api-Key is passed(used in header).

GET /WorkSpaces/GetWorkSpaceInfo

Response

200 OK OK
401 Unauthorized Unauthorized
403 Forbidden Forbidden
404 Not Found Not Found
[
    {
        "WorkSpaceId": 00,
        "WorkSpaceName": "test api work",
        "WorkSpaceLogo": "http://timewatchr.azurewebsites.net/UploadedImages/WorkspaceImages/DefaultProfile.png",
        "IsTimeSheetActive": true,
        "TimeZone": "(GMT -7:00) Mountain Time (US & Canada)",
        "TimeFormat": "24-HOUR",
        "DurationFormat": "Full (hh:mm:ss)"
    },
    {
        "WorkSpaceId": 00,
        "WorkSpaceName": "demo workspace",
        "WorkSpaceLogo": "http://timewatchr.azurewebsites.net/UploadedImages/WorkspaceImages/DefaultProfile.png",
        "IsTimeSheetActive": false,
        "TimeZone": "(GMT +5:30) Bombay, Calcutta, Madras, New Delhi",
        "TimeFormat": "12-HOUR",
        "DurationFormat": "Full (hh:mm:ss)"
    }
]

Get Time Tracking Info

Get Time Tracking Info API is used to get Time Tracking details of particular workspace between the start and end DateTime.
Filters can be applied as query parameters listed below.

GET /TimeTracking/GetTimeTrackingInfo?StartDateTime={StartDateTime}&EndDateTime={EndDateTime}

Request Parameters

Parameter Type Description
StartDateTime string
Format:
dd/MM/yyyy HH:mm:ss
Start date time of time tracking, from where you want time track info
EndDateTime string
Format:
dd/MM/yyyy HH:mm:ss
End date time of time tracking, to(till) where you want time track info
ProjectName string If provided, time tracking will be filtered by Project Name, it is case sensitive, you have to provide the exact Project Name.
/GetTimeTrackingInfo?ProjectName=TimeWatchRProject&StartDateTime=01/11/2020 00:00:00&EndDateTime=30/11/2020 23:59:59

Response

200 OK OK
401 Unauthorized Unauthorized
403 Forbidden Forbidden
404 Not Found Not Found
[
    {
        "ProjectId": 00,
        "ProjectName": "Quickbooks",
        "StartDateTime": "01/11/2020 00:00:00",
        "EndDateTime": "04/12/2020 23:59:59",
        "TotalHours": "02:23:51"
    },
    {
        "ProjectId": 00,
        "ProjectName": "certificate showcase",
        "StartDateTime": "01/11/2020 00:00:00",
        "EndDateTime": "04/12/2020 23:59:59",
        "TotalHours": "38:50:06"
    },
    {
        "ProjectId": 00,
        "ProjectName": "TimeWatchR",
        "StartDateTime": "01/11/2020 00:00:00",
        "EndDateTime": "04/12/2020 23:59:59",
        "TotalHours": "01:00:30"
    },
    {
        "ProjectId": 00,
        "ProjectName": "Angular Project",
        "StartDateTime": "01/11/2020 00:00:00",
        "EndDateTime": "04/12/2020 23:59:59",
        "TotalHours": "02:09:01"
    },
    {
        "ProjectId": 00,
        "ProjectName": "Google API",
        "StartDateTime": "01/11/2020 00:00:00",
        "EndDateTime": "04/12/2020 23:59:59",
        "TotalHours": "04:00:54"
    }
]

Get Calendar Events

Get Calendar Events API is used to get Calendar Events between the start and end DateTime.
Filters can be applied as query parameters listed below.

GET /Calendar/GetCalendarEvents?StartDateTime={StartDateTime}&EndDateTime={EndDateTime}

Request Parameters

Parameter Type Description
StartDateTime string
Format:
dd/MM/yyyy HH:mm:ss
Start date time of Calendar Events, from where you want Calendar Events
EndDateTime string
Format:
dd/MM/yyyy HH:mm:ss
End date time of Calendar Events, to(till) where you want Calendar Events
/Calendar/GetCalendarEvents?StartDateTime=01/10/2020 00:00:00&EndDateTime=04/12/2020 23:59:59

Response

200 OK OK
401 Unauthorized Unauthorized
403 Forbidden Forbidden
404 Not Found Not Found
[
    {
        "EventId": 00,
        "EventTitle": "night shift meeting",
        "EventDescription": "night shift meeting",
        "StartDateTime": "01/10/2020 11:15:00",
        "EndDateTime": "01/10/2020 12:05:00",
        "ProjectId": 00,
        "ProjectName": "Google API",
        "TagId": null,
        "TagName": ""
    },
    {
        "EventId": 00,
        "EventTitle": "rerew",
        "EventDescription": "asdas",
        "StartDateTime": "03/10/2020 05:12:00",
        "EndDateTime": "03/10/2020 05:15:00",
        "ProjectId": 00,
        "ProjectName": "certificate showcase",
        "TagId": 00,
        "TagName": "QBD"
    },
    {
        "EventId": 0,
        "EventTitle": "test check tiner",
        "EventDescription": "sdasdsa",
        "StartDateTime": "05/10/2020 20:21:00",
        "EndDateTime": "05/10/2020 20:22:00",
        "ProjectId": 00,
        "ProjectName": "Quickbooks",
        "TagId": null,
        "TagName": ""
    }
]

Get Reports

Get Reports API is used to get different Reports in Json and Pdf format as well.

You can get 3 diffrent type of reports as below,

  • Summary
  • Daily
  • Weekly

You have to provide ReportType, ExportType(json/pdf) and Date Range(Start/End DateTime).
It's POST request, so you have to provide all parameters in the request body as JSON.
Filters can be applied in the request body listed below.

POST /Reports/GetReports

Request Body

Parameter Type Description
StartDateTime string
Format:
dd/MM/yyyy HH:mm:ss
Start date time, from where you want records
EndDateTime string
Format:
dd/MM/yyyy HH:mm:ss
End date time, to(till) where you want records
ReportType string Possible values: "summary", "daily", "weekly"
ExportType string Possible values: "json", "pdf"
{
  "StartDateTime": "01/10/2020 00:00:00",
  "EndDateTime": "07/12/2020 23:59:59",
  "ReportType": "daily",
  "ExportType": "pdf"
}

----------------------
----------------------

{
  "StartDateTime": "01/10/2020 00:00:00",
  "EndDateTime": "07/12/2020 23:59:59",
  "ReportType": "weekly",
  "ExportType": "Json"
}

----------------------
----------------------

{
  "StartDateTime": "01/10/2020 00:00:00",
  "EndDateTime": "07/12/2020 23:59:59",
  "ReportType": "weekly",
  "ExportType": "Json",
  "ProjectName":"TimeWatchR"
}

Response

200 OK OK
401 Unauthorized Unauthorized
403 Forbidden Forbidden
404 Not Found Not Found


{
    "StartDateTime": "01/10/2020 00:00:00",
    "EndDateTime": "05/10/2020 23:59:59",
    "ReportType": "daily",
    "TotalDailyTime": "43:33:43",
    "DailyReportVMList": [
        {
            "TimeTrackId": 1154,
            "Description": "another project work",
            "ProjectId": 1,
            "ProjectName": "certificate showcase",
            "ClientId": 7,
            "ProjectStatus": 1,
            "TagId": null,
            "TagName": null,
            "UserId": 1,
            "Name": "tabish",
            "Email": "tabishzrangrej.vision@gmail.com",
            "StartDateTime": "05/10/2020 10:30:45",
            "EndDateTime": "05/10/2020 11:17:27",
            "TotalTime": "00:46:42"
        }
        {
            "TimeTrackId": 1079,
            "Description": "dsfsdfds",
            "ProjectId": 7,
            "ProjectName": "Quickbooks",
            "ClientId": 3,
            "ProjectStatus": 1,
            "TagId": null,
            "TagName": null,
            "UserId": 1,
            "Name": "tabish",
            "Email": "tabishzrangrej.vision@gmail.com",
            "StartDateTime": "05/10/2020 09:19:16",
            "EndDateTime": "05/10/2020 09:20:59",
            "TotalTime": "00:01:43"
        },
        {
            "TimeTrackId": 1639,
            "Description": "meeting",
            "ProjectId": 1,
            "ProjectName": "certificate showcase",
            "ClientId": 7,
            "ProjectStatus": 1,
            "TagId": 1,
            "TagName": "QBO",
            "UserId": 31,
            "Name": "tab outlook",
            "Email": "tabishzrangrej.vision@outlook.com",
            "StartDateTime": "02/10/2020 18:35:00",
            "EndDateTime": "02/10/2020 18:40:00",
            "TotalTime": "00:05:00"
        }
    ]
}

----------------------
----------------------

{
    "StartDateTime": "09/11/2020 00:00:00",
    "EndDateTime": "15/11/2020 23:59:59",
    "ReportType": "weekly",
    "WeeklyReportVMList": [
        {
            "ProjectId": 12,
            "ProjectName": "Eponti",
            "WeeklyReportDetailList": [
                {
                    "ProjectId": 12,
                    "ProjectName": "Eponti",
                    "TrackDateTime": "09/11/2020",
                    "TotalTime": "01:00:00"
                },
                {
                    "ProjectId": 12,
                    "ProjectName": "Eponti",
                    "TrackDateTime": "11/11/2020",
                    "TotalTime": "00:57:28"
                },
                {
                    "ProjectId": 12,
                    "ProjectName": "Eponti",
                    "TrackDateTime": "12/11/2020",
                    "TotalTime": "00:11:33"
                }
            ]
        },
        {
            "ProjectId": 8,
            "ProjectName": "Google API",
            "WeeklyReportDetailList": [
                {
                    "ProjectId": 8,
                    "ProjectName": "Google API",
                    "TrackDateTime": "09/11/2020",
                    "TotalTime": "02:30:02"
                },
                {
                    "ProjectId": 8,
                    "ProjectName": "Google API",
                    "TrackDateTime": "11/11/2020",
                    "TotalTime": "01:30:42"
                }
            ]
        },
        {
            "ProjectId": 1,
            "ProjectName": "certificate showcase",
            "WeeklyReportDetailList": [
                {
                    "ProjectId": 1,
                    "ProjectName": "certificate showcase",
                    "TrackDateTime": "09/11/2020",
                    "TotalTime": "00:10:20"
                },
                {
                    "ProjectId": 1,
                    "ProjectName": "certificate showcase",
                    "TrackDateTime": "10/11/2020",
                    "TotalTime": "22:45:47"
                },
                {
                    "ProjectId": 1,
                    "ProjectName": "certificate showcase",
                    "TrackDateTime": "11/11/2020",
                    "TotalTime": "00:37:39"
                },
                {
                    "ProjectId": 1,
                    "ProjectName": "certificate showcase",
                    "TrackDateTime": "12/11/2020",
                    "TotalTime": "08:27:18"
                }
            ]
        },
        {
            "ProjectId": 134,
            "ProjectName": "TimeWatchR",
            "WeeklyReportDetailList": [
                {
                    "ProjectId": 134,
                    "ProjectName": "TimeWatchR",
                    "TrackDateTime": "09/11/2020",
                    "TotalTime": "01:00:30"
                }
            ]
        },
        {
            "ProjectId": 7,
            "ProjectName": "Quickbooks",
            "WeeklyReportDetailList": [
                {
                    "ProjectId": 7,
                    "ProjectName": "Quickbooks",
                    "TrackDateTime": "11/11/2020",
                    "TotalTime": "00:33:29"
                }
            ]
        }
    ]
}

----------------------
----------------------

{
    "StartDateTime": "01/11/2020 00:00:00",
    "EndDateTime": "06/11/2020 23:59:59",
    "ReportType": "summary",
    "BarChartSummaryVMList": [
        {
            "Date": "Sunday, November 01",
            "TotalTime": "00:00:00"
        },
        {
            "Date": "Monday, November 02",
            "TotalTime": "00:00:00"
        },
        {
            "Date": "Tuesday, November 03",
            "TotalTime": "00:00:00"
        },
        {
            "Date": "Wednesday, November 04",
            "TotalTime": "00:00:00"
        },
        {
            "Date": "Thursday, November 05",
            "TotalTime": "00:00:00"
        },
        {
            "Date": "Friday, November 06",
            "TotalTime": "02:35:58"
        }
    ],
    "PieChartSummaryVMList": [
        {
            "ProjectName": "Quickbooks",
            "TotalTime": "01:02:20"
        },
        {
            "ProjectName": "certificate showcase",
            "TotalTime": "01:33:38"
        }
    ]
}