Time Doctor API (1.0.0)

Download OpenAPI specification:Download

Introduction

Time Doctor provides an API that can be used to retrieve most of its reports and resources. Please reach out to support@timedoctor.com if you need any help with the API or have any suggestions regarding it.

RESTful APIs

The APIs use REST principles to create a standard and familiar interface. REST, which stands for REpresentational State Transformation, defines a set of principles for organizing web services using the HTTP protocol and a specific set of HTTP verbs or methods. The methods used in the Time Doctor API are:

POST: Create a resource GET: Read a resource PUT: Update a resource DELETE: Delete a resource

Together these are often known as CRUD operations – Create, Read, Update, and Delete.

HTTPS

Time doctor API calls actually use the HTTPS protocol, the secure form of HTTP. All calls for version 1.0 begin with the prefix:

https://timedoctor.redoc.ly/

The request header for all API calls must include the following parameters: "accept: application/json" "content: application/json"

If the request body is not empty, it consists of a sequence of parameters given in JSON format. If a response body is returned, its content is given in JSON format as well.

Auth Token/Key

Note: Every call to a Time Doctor API must be authenticated using a “bearer token” based on OAuth 2.0. Tokens are generated by the following APIs:

  • Login
  • Register

The token is valid for six months. After this, you will need to create a new token. Once your token is generated, it must be provided as a header parameter under "Authorization" in every subsequent API call, with format JWT {token}.

API Version

1.0.0

Request/Response Format

  • Dates are returned in ISO format e.g. 2019-08-24T14:15:22Z
  • Time is returned in seconds and by default, it is in the UTC timezone
  • Blank fields are generally included as a null or empty string instead of being omitted

Frequently Asked Questions

1) What are the date and time formats I should use when using the API?

Time Doctor API support ISO date and time format i.e. YYYY-MM-DDT00:00:00Z (Z refers to UTC timezone)

2) How can I get the data in a different timezone than UTC?

Having timezone offset can result in performance issues for reasons such as daylight savings changes. Time Doctor stores and returns data only in the UTC timezone. You will need to convert the local time into UTC timezone before you pass it as a query parameter in the API call. For example Jul 2nd, 2021 06:36 AM UTC+8 = Jul 1st, 2021 10:36 PM UTC time

3) What date range should I use when running a report for the same day?

Time Doctor API supports ISO date and time format. If you are running the report for the same day, you’ll need to provide the date range as below.

For example from=2021-07-02T00:00:00Z & to=2021-07-02T23:59:59Z OR from=2021-07-02T00:00:00Z & to=2021-07-03T00:00:00Z

4) What is the reason for blank titles for web & app activity records in the API result?

This could be due to an issue with the specific application permissions that the data wasn’t captured. It could also be that the web & app tracking was disabled before it was enabled, so the black titles are from the time when the setting was disabled.

5) What is meant by “Tags” in the Time Doctor API documentation?

The tags refer to Groups in Time Doctor.

6) What is meant by “Files” in the Time Doctor API documentation?

Files refer to the screencasts (screenshots and screen videos) in Time Doctor.

7) What is meant by “Categories” in the Time Doctor API documentation?

Categories refer to the productivity ratings in Time Doctor.

8) Why is the Disconnectivity report API not showing any data?

The Disconnectivity report works with Time Doctor application v3.4.8 and above. Please make sure the users are using this app version or the newest. Send an email to support@timedoctor.com in case you still experience any issues after upgrading the application version.

9) Does the API provide or support webhooks?

We don’t currently have webhooks. You may create custom scripts to call the API endpoints. Feel free to email support@timedoctor.com in case you have any questions.

10) How can I filter out response data for an API call?

Time Doctor API supports the filtering of data in some of the API calls. You can specify using the filter keyword and provide multiple data points that you want to get in the response, i.e., filter=name, user ID, email, etc. You will see the filters query parameters in some of the API calls where you can use them.

Authentication

ApiKeyAuth

JWT {token}

Security Scheme Type API Key
Header parameter name: Authorization

Auth

login, register, authorization

login

Login and get access token

Request Body schema: application/json
email
required
string

An email, which was used for registration

password
required
string

A password, specified on registration

totpCode
string

TOTP code for 2FA (if enabled)

permissions
string
Default: "write"

API permissions. There are two states: "read" or "write" allows the bearer of the token to perform actions that can change state (POST, PUT, PATCH, DELETE).

Responses

Request samples

Content type
application/json
{
  • "email": "string",
  • "password": "string",
  • "totpCode": "string",
  • "permissions": "write"
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

register

Register account

Request Body schema: application/json
name
required
string

User full name

email
required
string

User email to register

timezone
string

User timezone self setting

password
required
string

Desired password, must meet password policy (at least 6 characters)

twoFactorAuth
boolean
Default: false

Enable 2FA

referrer
string

If specified, a referrer, where the user was brought from

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "email": "string",
  • "timezone": "string",
  • "password": "string",
  • "twoFactorAuth": false,
  • "referrer": "string"
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

registerSignup

Register account

Request Body schema: application/json
name
required
string

User full name

email
required
string

User email to register

timezone
string

If specified, specifies which time zone company works on. Etc/UTC by default

password
required
string

Desired password, must meet password policy (at least 6 characters)

referrer
string

If specified, a referrer, where the user was brought from

company
string

If specified, is a name for newly created company, default: "Someone's company"

trackingMode
required
string

Tracking mode of company

Enum: "mixed" "interactive" "silent"
interactiveTrackingMode
string

Interactive tracking mode of company

Enum: "manual" "automated"
pricingPlan
string
Default: "standard_new"

Pricing plan of company

Enum: "basic" "standard_new" "premium" "basic_annual" "standard_new_annual" "premium_annual"

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "email": "string",
  • "timezone": "string",
  • "password": "string",
  • "referrer": "string",
  • "company": "string",
  • "trackingMode": "mixed",
  • "interactiveTrackingMode": "manual",
  • "pricingPlan": "standard_new"
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

profile

Modify profile data

Authorizations:
ApiKeyAuth (apiKey)
Request Body schema: application/json
name
required
string

User full name

email
required
string

User email to register

timezone
string

User timezone self setting

password
required
string

Desired password, must meet password policy (at least 6 characters)

twoFactorAuth
boolean
Default: false

Enable 2FA

referrer
string

If specified, a referrer, where the user was brought from

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "email": "string",
  • "timezone": "string",
  • "password": "string",
  • "twoFactorAuth": false,
  • "referrer": "string"
}

Response samples

Content type
application/json
{
  • "data": { }
}

restorePassword

Get an email to restore (reset) your password

query Parameters
email
required
string

Responses

Request samples

const fetch = require('node-fetch');

const query = new URLSearchParams({email: 'string'}).toString();

const resp = await fetch(
  `https://api2.timedoctor.com/api/1.0/profile/restore-password?${query}`,
  {method: 'GET'}
);

const data = await resp.text();
console.log(data);

Response samples

Content type
application/json
{
  • "data": { }
}

authorization

Get the following details:

  1. Company details and settings

  2. Details of the logged-in user and the user settings
Authorizations:
ApiKeyAuth (apiKey)
query Parameters
company
string

If specified, ID of company, which workspaces to list in companies; otherwise lists companies

task-project-names
string

If specified, the method will resolve the names for tasks and projects

Enum: "true" "false"
has-managed-screencasts
string

If specified, resolve whether screencasts enabled for you and your managed users

Enum: "true" "false"

Responses

Request samples

const fetch = require('node-fetch');

const query = new URLSearchParams({
  company: 'string',
  'task-project-names': 'true',
  'has-managed-screencasts': 'true'
}).toString();

const resp = await fetch(
  `https://api2.timedoctor.com/api/1.0/authorization?${query}`,
  {
    method: 'GET',
    headers: {
      Authorization: 'YOUR_API_KEY_HERE'
    }
  }
);

const data = await resp.text();
console.log(data);

Response samples

Content type
application/json
{
  • "data": {
    }
}

authorizationLogin

Login, get access token and get authorization

Request Body schema: application/json
email
required
string

An email, which was used for registration

password
required
string

A password, specified on registration

totpCode
string

TOTP code for 2FA (if enabled)

permissions
string
Default: "write"

API permissions. There are two states: "read" or "write" allows the bearer of the token to perform actions that can change state (POST, PUT, PATCH, DELETE).

Responses

Request samples

Content type
application/json
{
  • "email": "string",
  • "password": "string",
  • "totpCode": "string",
  • "permissions": "write"
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

logout

Logout and invalidate access token

Authorizations:
ApiKeyAuth (apiKey)

Responses

Request samples

const fetch = require('node-fetch');

const resp = await fetch(
  `https://api2.timedoctor.com/api/1.0/logout`,
  {
    method: 'GET',
    headers: {
      Authorization: 'YOUR_API_KEY_HERE'
    }
  }
);

const data = await resp.text();
console.log(data);

Response samples

Content type
application/json
{
  • "data": { }
}

logoutById

Logout and invalidate access token, identified by ID

Authorizations:
ApiKeyAuth (apiKey)
query Parameters
id
string

token ID, returned by GET /api/1.0/users/tokens API

Responses

Request samples

const fetch = require('node-fetch');

const query = new URLSearchParams({id: 'string'}).toString();

const resp = await fetch(
  `https://api2.timedoctor.com/api/1.0/logout/by-id?${query}`,
  {
    method: 'GET',
    headers: {
      Authorization: 'YOUR_API_KEY_HERE'
    }
  }
);

const data = await resp.text();
console.log(data);

Response samples

Content type
application/json
{
  • "data": { }
}

Companies

companies

companies

Get list of own administered companies or workspaces in a company. In case there is no owned company record for this auth token, it will return an empty list.

Authorizations:
ApiKeyAuth (apiKey)
query Parameters
no-workspaces
string

If specified, result will contain directly tracking companies/workspaces

Enum: "true" "false"

Responses

Request samples

const fetch = require('node-fetch');

const query = new URLSearchParams({'no-workspaces': 'true'}).toString();

const resp = await fetch(
  `https://api2.timedoctor.com/api/1.0/companies?${query}`,
  {
    method: 'GET',
    headers: {
      Authorization: 'YOUR_API_KEY_HERE'
    }
  }
);

const data = await resp.text();
console.log(data);

Response samples

Content type
application/json
{
  • "data": [
    ]
}

addCompany

Add a company or a workspace

Authorizations:
ApiKeyAuth (apiKey)
query Parameters
company
string

If specified, ID of Company or Workspace, user refers to. If omitted, the operation refers to global

Request Body schema: application/json
noWorkspaces
boolean
name
required
string

Name of the company/workspace

description
string

Optional description of company/workspace

creator
string

ID of User who created

timezone
string

Name of timezone, it works by (default: "Etc/UTC")

pricingPlan
string

Pricing plan of company

Enum: "basic" "standard_new" "premium" "basic_annual" "standard_new_annual" "premium_annual"
newOwnerId
string

New company owner

object

Tracking time information for silent companies

whoCanAccessScreenshots
string

Access level required for screenshots page

Enum: "none" "owner" "owner_admin" "owner_manager" "owner_admin_manager" "owner_guest" "owner_admin_guest" "owner_manager_guest" "owner_admin_manager_guest"
allowLeavesForRegularUsers
boolean

Allow regular users to apply for the leaves

Responses

Request samples

Content type
application/json
{
  • "noWorkspaces": true,
  • "name": "string",
  • "description": "string",
  • "creator": "string",
  • "timezone": "string",
  • "pricingPlan": "basic",
  • "newOwnerId": "string",
  • "silentTrackingTimes": {
    },
  • "whoCanAccessScreenshots": "none",
  • "allowLeavesForRegularUsers": true
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

company

Get company by ID

Authorizations:
ApiKeyAuth (apiKey)
path Parameters
companyId
required
string

ID of Company or Workspace

Responses

Request samples

const fetch = require('node-fetch');

const companyId = 'YOUR_companyId_PARAMETER';
const resp = await fetch(
  `https://api2.timedoctor.com/api/1.0/companies/${companyId}`,
  {
    method: 'GET',
    headers: {
      Authorization: 'YOUR_API_KEY_HERE'
    }
  }
);

const data = await resp.text();
console.log(data);

Response samples

Content type
application/json
{
  • "data": {
    }
}

putCompany

Modify details of a company

Authorizations:
ApiKeyAuth (apiKey)
path Parameters
companyId
required
string

ID of Company or Workspace

Request Body schema: application/json
noWorkspaces
boolean
name
required
string

Name of the company/workspace

description
string

Optional description of company/workspace

creator
string

ID of User who created

timezone
string

Name of timezone, it works by (default: "Etc/UTC")

pricingPlan
string

Pricing plan of company

Enum: "basic" "standard_new" "premium" "basic_annual" "standard_new_annual" "premium_annual"
newOwnerId
string

New company owner

object

Tracking time information for silent companies

whoCanAccessScreenshots
string

Access level required for screenshots page

Enum: "none" "owner" "owner_admin" "owner_manager" "owner_admin_manager" "owner_guest" "owner_admin_guest" "owner_manager_guest" "owner_admin_manager_guest"
allowLeavesForRegularUsers
boolean

Allow regular users to apply for the leaves

Responses

Request samples

Content type
application/json
{
  • "noWorkspaces": true,
  • "name": "string",
  • "description": "string",
  • "creator": "string",
  • "timezone": "string",
  • "pricingPlan": "basic",
  • "newOwnerId": "string",
  • "silentTrackingTimes": {
    },
  • "whoCanAccessScreenshots": "none",
  • "allowLeavesForRegularUsers": true
}

Response samples

Content type
application/json
{
  • "data": { }
}

getCompanyTimezone

Get all the timezones for all company users

Authorizations:
ApiKeyAuth (apiKey)
path Parameters
companyId
required
string

ID of Company or Workspace

Responses

Request samples

const fetch = require('node-fetch');

const companyId = 'YOUR_companyId_PARAMETER';
const resp = await fetch(
  `https://api2.timedoctor.com/api/1.0/companies/${companyId}/timezones`,
  {
    method: 'GET',
    headers: {
      Authorization: 'YOUR_API_KEY_HERE'
    }
  }
);

const data = await resp.text();
console.log(data);

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Users

users, invitations

getManagedUsers

Get list of own administered companies

Authorizations:
ApiKeyAuth (apiKey)
path Parameters
userId
required
string

ID of User (me or empty means caller)

query Parameters
company
required
string

ID of Company or Workspace, user refers to.

self
string

If specified, returns user data of userId in self reply field

Enum: "true" "false"
detail
string

Level of detail in reply

Enum: "id" "name" "info" "alias" "tags" "settings" "managers"
task-project-names
string

If specified, the method will resolve the names for tasks and projects

Enum: "true" "false"
no-tag
string

Return only users without tags

Enum: "true" "false"
include-archived-users
boolean
Default: false

include archived user ids in user param

page
string

if specified, page ID to get results for; or first page by default

limit
string

if specified, maximum number of items to be returned; or use API-specific hard limit by default

sort
string

which field to sort by, prepend it with "_" for descending sorting

Enum: "id" "email" "name" "tag" "keywords" "role" "showOnReports" "invitePending" "inviteAccepted" "payrollAccess" "screenshots" "videos" "created" "hostName" "os" "hiredAt" "lastTrack" "lastActiveTrack" "clientVersion" "ip" "show-on-reports" "payroll-access" "host-name" "hired-at" "last-track" "last-active-track" "client-version" "invite-pending" "invite-accepted" "tag-count" "_id" "_email" "_name" "_tag" "_keywords" "_role" "_showOnReports" "_invitePending" "_inviteAccepted" "_payrollAccess" "_screenshots" "_videos" "_created" "_hostName" "_os" "_hiredAt" "_lastTrack" "_lastActiveTrack" "_clientVersion" "_ip" "_show-on-reports" "_payroll-access" "_host-name" "_hired-at" "_last-track" "_last-active-track" "_client-version" "_invite-pending" "_invite-accepted" "_tag-count"
filter[id]
string

"string" -- exact match

filter[email]
string

"string" -- starts with

filter[name]
string

"string" -- starts with

filter[tag]
string

"string" -- exact match

filter[keywords]
string

match string

filter[role]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[showOnReports]
boolean

boolean value

filter[invitePending]
boolean

boolean value

filter[inviteAccepted]
boolean

boolean value

filter[payrollAccess]
boolean

boolean value

filter[screenshots]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[videos]
string

"string" -- exact match

filter[created]
string

"ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[hostName]
string

"string" -- starts with

filter[os]
string

"string" -- exact match

filter[hiredAt]
string

"ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[lastTrack]
string

"ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[lastActiveTrack]
string

"ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[clientVersion]
string

"string" -- exact match

filter[ip]
string

"string" -- starts with

filter[show-on-reports]
boolean

boolean value

filter[payroll-access]
boolean

boolean value

filter[host-name]
string

"string" -- starts with

filter[hired-at]
string

"ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[last-track]
string

"ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[last-active-track]
string

"ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[client-version]
string

"string" -- exact match

filter[invite-pending]
boolean

boolean value

filter[invite-accepted]
boolean

boolean value

filter[tag-count]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

Responses

Request samples

const fetch = require('node-fetch');

const query = new URLSearchParams({
  company: 'string',
  self: 'true',
  detail: 'id',
  'task-project-names': 'true',
  'no-tag': 'true',
  'include-archived-users': 'false',
  page: 'string',
  limit: 'string',
  sort: 'id',
  'filter[id]': 'string',
  'filter[email]': 'string',
  'filter[name]': 'string',
  'filter[tag]': 'string',
  'filter[keywords]': 'string',
  'filter[role]': 'string',
  'filter[showOnReports]': 'true',
  'filter[invitePending]': 'true',
  'filter[inviteAccepted]': 'true',
  'filter[payrollAccess]': 'true',
  'filter[screenshots]': 'string',
  'filter[videos]': 'string',
  'filter[created]': 'string',
  'filter[hostName]': 'string',
  'filter[os]': 'string',
  'filter[hiredAt]': 'string',
  'filter[lastTrack]': 'string',
  'filter[lastActiveTrack]': 'string',
  'filter[clientVersion]': 'string',
  'filter[ip]': 'string',
  'filter[show-on-reports]': 'true',
  'filter[payroll-access]': 'true',
  'filter[host-name]': 'string',
  'filter[hired-at]': 'string',
  'filter[last-track]': 'string',
  'filter[last-active-track]': 'string',
  'filter[client-version]': 'string',
  'filter[invite-pending]': 'true',
  'filter[invite-accepted]': 'true',
  'filter[tag-count]': 'string'
}).toString();

const userId = 'YOUR_userId_PARAMETER';
const resp = await fetch(
  `https://api2.timedoctor.com/api/1.0/users/${userId}/managed?${query}`,
  {
    method: 'GET',
    headers: {
      Authorization: 'YOUR_API_KEY_HERE'
    }
  }
);

const data = await resp.text();
console.log(data);

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "page": {
    },
  • "self": {
    }
}

getUsers

Get/resolve list of users

Authorizations:
ApiKeyAuth (apiKey)
query Parameters
company
string

If specified, ID of Company or Workspace, user refers to. If omitted, the operation refers to global

user
string

If specified, a comma-separated list of user IDs to resolve with same array indexes in reply as indexes in list (alias of this param is id)

manager
string

If specified, a user ID of a manager, the only managed users of whom to return

tag
string

If specified, an ID of a tag, the only members of which to return

self
string

If specified, returns user data of userId in self reply field

Enum: "true" "false"
detail
string

Level of detail in reply

Enum: "id" "name" "info" "alias" "tags" "settings" "managers"
task-project-names
string

If specified, the method will resolve the names for tasks and projects

Enum: "true" "false"
no-tag
string

Return only users without tags

Enum: "true" "false"
include-archived-users
boolean
Default: false

include archived user ids in user param

deleted
string

Operate on active or disabled (deleted) user

Enum: "true" "false"
page
string

if specified, page ID to get results for; or first page by default

limit
string

if specified, maximum number of items to be returned; or use API-specific hard limit by default

sort
string

which field to sort by, prepend it with "_" for descending sorting

Enum: "id" "email" "name" "tag" "keywords" "role" "showOnReports" "invitePending" "inviteAccepted" "payrollAccess" "screenshots" "videos" "created" "hostName" "os" "hiredAt" "lastTrack" "lastActiveTrack" "clientVersion" "ip" "show-on-reports" "payroll-access" "host-name" "hired-at" "last-track" "last-active-track" "client-version" "invite-pending" "invite-accepted" "tag-count" "_id" "_email" "_name" "_tag" "_keywords" "_role" "_showOnReports" "_invitePending" "_inviteAccepted" "_payrollAccess" "_screenshots" "_videos" "_created" "_hostName" "_os" "_hiredAt" "_lastTrack" "_lastActiveTrack" "_clientVersion" "_ip" "_show-on-reports" "_payroll-access" "_host-name" "_hired-at" "_last-track" "_last-active-track" "_client-version" "_invite-pending" "_invite-accepted" "_tag-count"
filter[id]
string

"string" -- exact match

filter[email]
string

"string" -- starts with

filter[name]
string

"string" -- starts with

filter[tag]
string

"string" -- exact match

filter[keywords]
string

match string

filter[role]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[showOnReports]
boolean

boolean value

filter[invitePending]
boolean

boolean value

filter[inviteAccepted]
boolean

boolean value

filter[payrollAccess]
boolean

boolean value

filter[screenshots]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[videos]
string

"string" -- exact match

filter[created]
string

"ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[hostName]
string

"string" -- starts with

filter[os]
string

"string" -- exact match

filter[hiredAt]
string

"ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[lastTrack]
string

"ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[lastActiveTrack]
string

"ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[clientVersion]
string

"string" -- exact match

filter[ip]
string

"string" -- starts with

filter[show-on-reports]
boolean

boolean value

filter[payroll-access]
boolean

boolean value

filter[host-name]
string

"string" -- starts with

filter[hired-at]
string

"ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[last-track]
string

"ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[last-active-track]
string

"ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[client-version]
string

"string" -- exact match

filter[invite-pending]
boolean

boolean value

filter[invite-accepted]
boolean

boolean value

filter[tag-count]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

Responses

Request samples

const fetch = require('node-fetch');

const query = new URLSearchParams({
  company: 'string',
  user: 'string',
  manager: 'string',
  tag: 'string',
  self: 'true',
  detail: 'id',
  'task-project-names': 'true',
  'no-tag': 'true',
  'include-archived-users': 'false',
  deleted: 'true',
  page: 'string',
  limit: 'string',
  sort: 'id',
  'filter[id]': 'string',
  'filter[email]': 'string',
  'filter[name]': 'string',
  'filter[tag]': 'string',
  'filter[keywords]': 'string',
  'filter[role]': 'string',
  'filter[showOnReports]': 'true',
  'filter[invitePending]': 'true',
  'filter[inviteAccepted]': 'true',
  'filter[payrollAccess]': 'true',
  'filter[screenshots]': 'string',
  'filter[videos]': 'string',
  'filter[created]': 'string',
  'filter[hostName]': 'string',
  'filter[os]': 'string',
  'filter[hiredAt]': 'string',
  'filter[lastTrack]': 'string',
  'filter[lastActiveTrack]': 'string',
  'filter[clientVersion]': 'string',
  'filter[ip]': 'string',
  'filter[show-on-reports]': 'true',
  'filter[payroll-access]': 'true',
  'filter[host-name]': 'string',
  'filter[hired-at]': 'string',
  'filter[last-track]': 'string',
  'filter[last-active-track]': 'string',
  'filter[client-version]': 'string',
  'filter[invite-pending]': 'true',
  'filter[invite-accepted]': 'true',
  'filter[tag-count]': 'string'
}).toString();

const resp = await fetch(
  `https://api2.timedoctor.com/api/1.0/users?${query}`,
  {
    method: 'GET',
    headers: {
      Authorization: 'YOUR_API_KEY_HERE'
    }
  }
);

const data = await resp.text();
console.log(data);

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "page": {
    },
  • "self": {
    }
}

getUser

Get user by ID

Authorizations:
ApiKeyAuth (apiKey)
path Parameters
userId
required
string

ID of User (me or empty means caller)

query Parameters
company
string

If specified, ID of Company or Workspace, user refers to. If omitted, the operation refers to global

detail
string

Level of detail in reply

Enum: "id" "name" "info" "alias" "tags" "settings" "managers"
task-project-names
string

If specified, the method will resolve the names for tasks and projects

Enum: "true" "false"
no-tag
string

Return only users without tags

Enum: "true" "false"
include-archived-users
boolean
Default: false

include archived user ids in user param

deleted
string

Operate on active or disabled (deleted) user

Enum: "true" "false"
page
string

if specified, page ID to get results for; or first page by default

limit
string

if specified, maximum number of items to be returned; or use API-specific hard limit by default

sort
string

which field to sort by, prepend it with "_" for descending sorting

Enum: "id" "email" "name" "tag" "keywords" "role" "showOnReports" "invitePending" "inviteAccepted" "payrollAccess" "screenshots" "videos" "created" "hostName" "os" "hiredAt" "lastTrack" "lastActiveTrack" "clientVersion" "ip" "show-on-reports" "payroll-access" "host-name" "hired-at" "last-track" "last-active-track" "client-version" "invite-pending" "invite-accepted" "tag-count" "_id" "_email" "_name" "_tag" "_keywords" "_role" "_showOnReports" "_invitePending" "_inviteAccepted" "_payrollAccess" "_screenshots" "_videos" "_created" "_hostName" "_os" "_hiredAt" "_lastTrack" "_lastActiveTrack" "_clientVersion" "_ip" "_show-on-reports" "_payroll-access" "_host-name" "_hired-at" "_last-track" "_last-active-track" "_client-version" "_invite-pending" "_invite-accepted" "_tag-count"
filter[id]
string

"string" -- exact match

filter[email]
string

"string" -- starts with

filter[name]
string

"string" -- starts with

filter[tag]
string

"string" -- exact match

filter[keywords]
string

match string

filter[role]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[showOnReports]
boolean

boolean value

filter[invitePending]
boolean

boolean value

filter[inviteAccepted]
boolean

boolean value

filter[payrollAccess]
boolean

boolean value

filter[screenshots]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[videos]
string

"string" -- exact match

filter[created]
string

"ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[hostName]
string

"string" -- starts with

filter[os]
string

"string" -- exact match

filter[hiredAt]
string

"ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[lastTrack]
string

"ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[lastActiveTrack]
string

"ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[clientVersion]
string

"string" -- exact match

filter[ip]
string

"string" -- starts with

filter[show-on-reports]
boolean

boolean value

filter[payroll-access]
boolean

boolean value

filter[host-name]
string

"string" -- starts with

filter[hired-at]
string

"ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[last-track]
string

"ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[last-active-track]
string

"ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[client-version]
string

"string" -- exact match

filter[invite-pending]
boolean

boolean value

filter[invite-accepted]
boolean

boolean value

filter[tag-count]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

Responses

Request samples

const fetch = require('node-fetch');

const query = new URLSearchParams({
  company: 'string',
  detail: 'id',
  'task-project-names': 'true',
  'no-tag': 'true',
  'include-archived-users': 'false',
  deleted: 'true',
  page: 'string',
  limit: 'string',
  sort: 'id',
  'filter[id]': 'string',
  'filter[email]': 'string',
  'filter[name]': 'string',
  'filter[tag]': 'string',
  'filter[keywords]': 'string',
  'filter[role]': 'string',
  'filter[showOnReports]': 'true',
  'filter[invitePending]': 'true',
  'filter[inviteAccepted]': 'true',
  'filter[payrollAccess]': 'true',
  'filter[screenshots]': 'string',
  'filter[videos]': 'string',
  'filter[created]': 'string',
  'filter[hostName]': 'string',
  'filter[os]': 'string',
  'filter[hiredAt]': 'string',
  'filter[lastTrack]': 'string',
  'filter[lastActiveTrack]': 'string',
  'filter[clientVersion]': 'string',
  'filter[ip]': 'string',
  'filter[show-on-reports]': 'true',
  'filter[payroll-access]': 'true',
  'filter[host-name]': 'string',
  'filter[hired-at]': 'string',
  'filter[last-track]': 'string',
  'filter[last-active-track]': 'string',
  'filter[client-version]': 'string',
  'filter[invite-pending]': 'true',
  'filter[invite-accepted]': 'true',
  'filter[tag-count]': 'string'
}).toString();

const userId = 'YOUR_userId_PARAMETER';
const resp = await fetch(
  `https://api2.timedoctor.com/api/1.0/users/${userId}?${query}`,
  {
    method: 'GET',
    headers: {
      Authorization: 'YOUR_API_KEY_HERE'
    }
  }
);

const data = await resp.text();
console.log(data);

Response samples

Content type
application/json
{
  • "data": {
    }
}

putUser

Modify user data in company

Authorizations:
ApiKeyAuth (apiKey)
path Parameters
userId
required
string

ID of User (me or empty means caller)

query Parameters
company
required
string

ID of Company or Workspace, user refers to.

deleted
string

Operate on active or disabled (deleted) user

Enum: "true" "false"
Request Body schema: application/json
name
string

User's name

role
string

User role in company

Enum: "owner" "admin" "guest" "manager" "user"
onlyProjectIds
Array of strings

If specified, will replace project access, use empty array to allow all access

employeeId
string

The ID of the employee at the company where they work

exists
boolean
active
boolean

Determines if the invited user is ready to work without post-confirmaton

screenshots
integer <int32>

The interval (in seconds) at which screenshots are taken of the user's screen(s) while they're working.

videos
string

"Video" means that a continuous video of the user's computer screen(s) will be taken while working, broken into 3-minute chunks. "Off" means that no videos will be recorded.

workCheckInterval
integer <int32>

How many seconds interval before checking if the user is working

canEditTime
string

Regular users edit their own time, managers edit their own time and the time of the people they manage while admins edit anyone's time.

poorTimeusePopup
boolean

Show pop up if the user is not making proper use of their time

allowDeleteScreenshots
boolean

Allows users to delete screenshots and video recordings that are taken of their screen. When one is deleted, the associated work time is also removed.

tasksMode
string

Determines if a user is allowed to track tasks or not. There are two options: "preset" and "off"

trackingMode
string

Determines how the user's time is tracked. There are two settings: "silent" and "interactive". Interactive mode allows the user select the tasks to track time on. Silent mode just records all activities non-stop.

interactiveTrackingMode
string

Determines how the user's time is tracked. There are two settings: "automated" and "manual". Manual mode allows the user select the tasks to track time on. Automated mode start time tracking automatically.

emailSubCount
integer <int32>

Count of email subscriptions

showOnReports
boolean

Sets if the user should show on the report like the Daily Report email

emailReports
string

Sets if the admin will get email report

weeklyEmailReports
boolean

Sets if the user will get weekly email report

jobTitle
string

The job title of the employee at the company

blurScreenshots
boolean

Screenshots taken of the user's computer and activity will be blurred.

allowNoBreak
boolean

When a user is using certain call/video applications like Zoom for work, do not put the user on break

trackInternetConnectivity
boolean

Monitor user internet connectivity and notify them if it is poor

stripUrlQuery
boolean

This removes query parameters from visited URLs (everything after “?”) that are stored and shown in reports. You might want to enable it due to privacy and security concerns.

allowAdminSID
boolean

Allow app to run on administrator accounts

hideScreencasts
boolean

Allow the user see screencasts or not

payrollAccess
boolean

Allow the user access the payroll feature. Only the company owner can set this for a user

payrollFeature
boolean

Only the company owner can turn the Payroll feature on or off.

workScheduleFeature
boolean

Turn the Work Schedule feature on or off for a company.

trackConnectivity
boolean

Start tracking connectivity data for the company.

allowManagerTagCategories
boolean

Allow managers to set productivity ratings

allowManagerProjectsTasks
boolean

Allow managers to create projects and tasks

allowManagerInviteUsers
boolean

Allow managers to invite new users

allowManagerWorkSchedules
boolean

Allow managers to set their work schedules and the schedules of people they manage

allowUsersActivitySummaryReport
boolean

Allow end-users to see Activity Summary reports

allowLeavesForRegularUsers
boolean

Allow regular users to apply for the leaves

forceAutostart
boolean

Force desktop apps to start tracking automatically at the start of each day

firstDayOfWeek
boolean

Set first day of week (0=Sunday; 1 by default)

webAndAppTracking
string

Set tracking type (extended by default)

Enum: "off" "basic" "extended" "custom"

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "role": "owner",
  • "onlyProjectIds": [
    ],
  • "employeeId": "string",
  • "exists": true,
  • "active": true,
  • "screenshots": 0,
  • "videos": "string",
  • "workCheckInterval": 0,
  • "canEditTime": "string",
  • "poorTimeusePopup": true,
  • "allowDeleteScreenshots": true,
  • "tasksMode": "string",
  • "trackingMode": "string",
  • "interactiveTrackingMode": "string",
  • "emailSubCount": 0,
  • "showOnReports": true,
  • "emailReports": "string",
  • "weeklyEmailReports": true,
  • "jobTitle": "string",
  • "blurScreenshots": true,
  • "allowNoBreak": true,
  • "trackInternetConnectivity": true,
  • "stripUrlQuery": true,
  • "allowAdminSID": true,
  • "hideScreencasts": true,
  • "payrollAccess": true,
  • "payrollFeature": true,
  • "workScheduleFeature": true,
  • "trackConnectivity": true,
  • "allowManagerTagCategories": true,
  • "allowManagerProjectsTasks": true,
  • "allowManagerInviteUsers": true,
  • "allowManagerWorkSchedules": true,
  • "allowUsersActivitySummaryReport": true,
  • "allowLeavesForRegularUsers": true,
  • "forceAutostart": true,
  • "firstDayOfWeek": true,
  • "webAndAppTracking": "off"
}

Response samples

Content type
application/json
{
  • "data": { }
}

deleteUser

Delete user from a company

Authorizations:
ApiKeyAuth (apiKey)
path Parameters
userId
required
string

ID of User (me or empty means caller)

query Parameters
company
required
string

ID of Company or Workspace, user refers to.

deleted
string

Operate on active or disabled (deleted) user

Enum: "true" "false"
delete-permanently
string

Permanently delete the user from the system

Enum: "true" "false"
reason
string

Reason for deleting the user

Responses

Request samples

const fetch = require('node-fetch');

const query = new URLSearchParams({
  company: 'string',
  deleted: 'true',
  'delete-permanently': 'true',
  reason: 'string'
}).toString();

const userId = 'YOUR_userId_PARAMETER';
const resp = await fetch(
  `https://api2.timedoctor.com/api/1.0/users/${userId}?${query}`,
  {
    method: 'DELETE',
    headers: {
      Authorization: 'YOUR_API_KEY_HERE'
    }
  }
);

const data = await resp.text();
console.log(data);

Response samples

Content type
application/json
{
  • "data": { }
}

invite

Invite new user to company
NOTE: If you have paid for the month and then you add more users to the account later, you’ll be charged a prorated amount for the remainder of the month for each new user added.

Authorizations:
ApiKeyAuth (apiKey)
query Parameters
company
required
string

ID of Company or Workspace, user refers to.

Request Body schema: application/json
name
string

Optional full name of invited user

email
required
string

Email of invited user

role
string

A role of invited user in company

Enum: "owner" "admin" "guest" "manager" "user"
employeeId
string

Optional employee ID of invited user

noSendEmail
string

Don't send invitation email

Enum: "true" "false"
onlyProjectIds
Array of strings

If specified, allows only specified project IDs to be accessed

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "email": "string",
  • "role": "owner",
  • "employeeId": "string",
  • "noSendEmail": "true",
  • "onlyProjectIds": [
    ]
}

Response samples

Content type
application/json
{
  • "data": { }
}

getInvitations

Get list of user's invitations (TODO:)

Authorizations:
ApiKeyAuth (apiKey)
query Parameters
company
required
string

ID of Company or Workspace, user refers to.

email
required
string

Responses

Request samples

const fetch = require('node-fetch');

const query = new URLSearchParams({
  company: 'string',
  email: 'string'
}).toString();

const resp = await fetch(
  `https://api2.timedoctor.com/api/1.0/invitations/exists?${query}`,
  {
    method: 'GET',
    headers: {
      Authorization: 'YOUR_API_KEY_HERE'
    }
  }
);

const data = await resp.text();
console.log(data);

Response samples

Content type
application/json
{
  • "data": {
    }
}

postBulkInvitations

Send a BULK of user invitations

Authorizations:
ApiKeyAuth (apiKey)
query Parameters
company
required
string

ID of Company or Workspace, user refers to.

Request Body schema: application/json
required
Array of objects

Invited Users

noSendEmail
string

Don't send invitation email

Enum: "true" "false"
onlyProjectIds
Array of strings

If specified, allows only specified project IDs to be accessed

tagIds
Array of strings

Responses

Request samples

Content type
application/json
{
  • "users": [
    ],
  • "noSendEmail": "true",
  • "onlyProjectIds": [
    ],
  • "tagIds": [
    ]
}

Response samples

Content type
application/json
{
  • "data": [
    ]
}

getCompanyConfig

Get details of all users configurations for a company

Authorizations:
ApiKeyAuth (apiKey)
query Parameters
company
string

If specified, ID of Company or Workspace, user refers to. If omitted, the operation refers to global

self
string

If specified, returns user data of userId in self reply field

Enum: "true" "false"
detail
string

Level of detail in reply

Enum: "id" "name" "info" "alias" "tags" "settings" "managers"
task-project-names
string

If specified, the method will resolve the names for tasks and projects

Enum: "true" "false"
no-tag
string

Return only users without tags

Enum: "true" "false"
include-archived-users
boolean
Default: false

include archived user ids in user param

page
string

if specified, page ID to get results for; or first page by default

limit
string

if specified, maximum number of items to be returned; or use API-specific hard limit by default

sort
string

which field to sort by, prepend it with "_" for descending sorting

Enum: "id" "email" "name" "tag" "keywords" "role" "showOnReports" "invitePending" "inviteAccepted" "payrollAccess" "screenshots" "videos" "created" "hostName" "os" "hiredAt" "lastTrack" "lastActiveTrack" "clientVersion" "ip" "show-on-reports" "payroll-access" "host-name" "hired-at" "last-track" "last-active-track" "client-version" "invite-pending" "invite-accepted" "tag-count" "_id" "_email" "_name" "_tag" "_keywords" "_role" "_showOnReports" "_invitePending" "_inviteAccepted" "_payrollAccess" "_screenshots" "_videos" "_created" "_hostName" "_os" "_hiredAt" "_lastTrack" "_lastActiveTrack" "_clientVersion" "_ip" "_show-on-reports" "_payroll-access" "_host-name" "_hired-at" "_last-track" "_last-active-track" "_client-version" "_invite-pending" "_invite-accepted" "_tag-count"
filter[id]
string

"string" -- exact match

filter[email]
string

"string" -- starts with

filter[name]
string

"string" -- starts with

filter[tag]
string

"string" -- exact match

filter[keywords]
string

match string

filter[role]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[showOnReports]
boolean

boolean value

filter[invitePending]
boolean

boolean value

filter[inviteAccepted]
boolean

boolean value

filter[payrollAccess]
boolean

boolean value

filter[screenshots]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[videos]
string

"string" -- exact match

filter[created]
string

"ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[hostName]
string

"string" -- starts with

filter[os]
string

"string" -- exact match

filter[hiredAt]
string

"ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[lastTrack]
string

"ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[lastActiveTrack]
string

"ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[clientVersion]
string

"string" -- exact match

filter[ip]
string

"string" -- starts with

filter[show-on-reports]
boolean

boolean value

filter[payroll-access]
boolean

boolean value

filter[host-name]
string

"string" -- starts with

filter[hired-at]
string

"ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[last-track]
string

"ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[last-active-track]
string

"ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[client-version]
string

"string" -- exact match

filter[invite-pending]
boolean

boolean value

filter[invite-accepted]
boolean

boolean value

filter[tag-count]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

Responses

Request samples

const fetch = require('node-fetch');

const query = new URLSearchParams({
  company: 'string',
  self: 'true',
  detail: 'id',
  'task-project-names': 'true',
  'no-tag': 'true',
  'include-archived-users': 'false',
  page: 'string',
  limit: 'string',
  sort: 'id',
  'filter[id]': 'string',
  'filter[email]': 'string',
  'filter[name]': 'string',
  'filter[tag]': 'string',
  'filter[keywords]': 'string',
  'filter[role]': 'string',
  'filter[showOnReports]': 'true',
  'filter[invitePending]': 'true',
  'filter[inviteAccepted]': 'true',
  'filter[payrollAccess]': 'true',
  'filter[screenshots]': 'string',
  'filter[videos]': 'string',
  'filter[created]': 'string',
  'filter[hostName]': 'string',
  'filter[os]': 'string',
  'filter[hiredAt]': 'string',
  'filter[lastTrack]': 'string',
  'filter[lastActiveTrack]': 'string',
  'filter[clientVersion]': 'string',
  'filter[ip]': 'string',
  'filter[show-on-reports]': 'true',
  'filter[payroll-access]': 'true',
  'filter[host-name]': 'string',
  'filter[hired-at]': 'string',
  'filter[last-track]': 'string',
  'filter[last-active-track]': 'string',
  'filter[client-version]': 'string',
  'filter[invite-pending]': 'true',
  'filter[invite-accepted]': 'true',
  'filter[tag-count]': 'string'
}).toString();

const resp = await fetch(
  `https://api2.timedoctor.com/api/1.0/users/totals?${query}`,
  {
    method: 'GET',
    headers: {
      Authorization: 'YOUR_API_KEY_HERE'
    }
  }
);

const data = await resp.text();
console.log(data);

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "page": {
    },
  • "self": {
    }
}

getUsersTokens

Get info about all active user tokens

Authorizations:
ApiKeyAuth (apiKey)
query Parameters
page
string

if specified, page ID to get results for; or first page by default

limit
string

if specified, maximum number of items to be returned; or use API-specific hard limit by default

sort
string

which field to sort by, prepend it with "_" for descending sorting

Enum: "createdAt" "expiresAt" "_createdAt" "_expiresAt"
filter[createdAt]
string

"ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[expiresAt]
string

"ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

Responses

Request samples

const fetch = require('node-fetch');

const query = new URLSearchParams({
  page: 'string',
  limit: 'string',
  sort: 'createdAt',
  'filter[createdAt]': 'string',
  'filter[expiresAt]': 'string'
}).toString();

const resp = await fetch(
  `https://api2.timedoctor.com/api/1.0/users/tokens?${query}`,
  {
    method: 'GET',
    headers: {
      Authorization: 'YOUR_API_KEY_HERE'
    }
  }
);

const data = await resp.text();
console.log(data);

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Projects

status, activity, stats

projects

Get list of projects in company

Authorizations:
ApiKeyAuth (apiKey)
query Parameters
company
required
string

ID of Company or Workspace, user refers to.

projects
string

If specified, comma-separated list of IDs of projects to resolve

all
string

If specified, returns all projects instead of assigned

Enum: "true" "false"
show-integration
string

If set, integration projects will be also listed

Enum: "true" "false"
allow-unassigned
string

If set, unassigned projects will also be listed

Enum: "true" "false"
detail
string

Level of details (basic by default)

Enum: "basic" "users"
user
string

If specified, a comma-separated list of user IDs to resolve the accessible projects for; it's for yourself by default

page
string

if specified, page ID to get results for; or first page by default

limit
string

if specified, maximum number of items to be returned; or use API-specific hard limit by default

sort
string

which field to sort by, prepend it with "_" for descending sorting

Enum: "id" "name" "keywords" "_id" "_name" "_keywords"
filter[id]
string

"string" -- exact match

filter[name]
string

"string" -- starts with

filter[keywords]
string

set of keywords to be matched

page
string

if specified, page ID to get results for; or first page by default

limit
string

if specified, maximum number of items to be returned; or use API-specific hard limit by default

sort
string

which field to sort by, prepend it with "_" for descending sorting

Enum: "keyphrase" "_keyphrase"
filter[keyphrase]
string

A keyphrase for searching by keywords

Responses

Request samples

const fetch = require('node-fetch');

const query = new URLSearchParams({
  company: 'string',
  projects: 'string',
  all: 'true',
  'show-integration': 'true',
  'allow-unassigned': 'true',
  detail: 'basic',
  user: 'string',
  page: ['string', 'string'],
  limit: ['string', 'string'],
  sort: ['id', 'keyphrase'],
  'filter[id]': 'string',
  'filter[name]': 'string',
  'filter[keywords]': 'string',
  'filter[keyphrase]': 'string'
}).toString();

const resp = await fetch(
  `https://api2.timedoctor.com/api/1.0/projects?${query}`,
  {
    method: 'GET',
    headers: {
      Authorization: 'YOUR_API_KEY_HERE'
    }
  }
);

const data = await resp.text();
console.log(data);

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "page": {
    }
}

newProject

Add a project

Authorizations:
ApiKeyAuth (apiKey)
query Parameters
company
required
string

ID of Company or Workspace, user refers to.

Request Body schema: application/json
scope
string

Scope of project

Enum: "workspace" "user" "tag"
Array of objects

Details of users who have access to user-scope project

cloneTasksFromId
string

If specified, all the tasks for new project will be cloned from project with given ID

cloneAccessFromId
string

If specified, users access will be cloned from project with given ID

name
string

Project name

description
string

Project description

deleted
boolean

Is project deleted (archived)?

weight
number

Priority measure

Responses

Request samples

Content type
application/json
{
  • "scope": "workspace",
  • "users": [
    ],
  • "cloneTasksFromId": "string",
  • "cloneAccessFromId": "string",
  • "name": "string",
  • "description": "string",
  • "deleted": true,
  • "weight": 0
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

project

Get details of a project

Authorizations:
ApiKeyAuth (apiKey)
path Parameters
projectId
required
string

ID of Project

query Parameters
company
required
string

ID of Company or Workspace, user refers to.

deleted
string

If specified, operates on deleted project instead of active.

Enum: "true" "false"

Responses

Request samples

const fetch = require('node-fetch');

const query = new URLSearchParams({
  company: 'string',
  deleted: 'true'
}).toString();

const projectId = 'YOUR_projectId_PARAMETER';
const resp = await fetch(
  `https://api2.timedoctor.com/api/1.0/projects/${projectId}?${query}`,
  {
    method: 'GET',
    headers: {
      Authorization: 'YOUR_API_KEY_HERE'
    }
  }
);

const data = await resp.text();
console.log(data);

Response samples

Content type
application/json
{
  • "data": {
    }
}

putProject

Modify details of a project

Authorizations:
ApiKeyAuth (apiKey)
path Parameters
projectId
required
string

ID of Project

query Parameters
company
required
string

ID of Company or Workspace, user refers to.

deleted
string

If specified, operates on deleted project instead of active.

Enum: "true" "false"
Request Body schema: application/json
name
string

Project name

description
string

Project description

deleted
boolean

Is project deleted (archived)?

weight
number

Priority measure

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "description": "string",
  • "deleted": true,
  • "weight": 0
}

Response samples

Content type
application/json
{
  • "data": { }
}

deleteProject

Delete a project

Authorizations:
ApiKeyAuth (apiKey)
path Parameters
projectId
required
string

ID of Project

query Parameters
company
required
string

ID of Company or Workspace, user refers to.

deleted
string

If specified, operates on deleted project instead of active.

Enum: "true" "false"

Responses

Request samples

const fetch = require('node-fetch');

const query = new URLSearchParams({
  company: 'string',
  deleted: 'true'
}).toString();

const projectId = 'YOUR_projectId_PARAMETER';
const resp = await fetch(
  `https://api2.timedoctor.com/api/1.0/projects/${projectId}?${query}`,
  {
    method: 'DELETE',
    headers: {
      Authorization: 'YOUR_API_KEY_HERE'
    }
  }
);

const data = await resp.text();
console.log(data);

Response samples

Content type
application/json
{ }

putProjectUser

Make project private and add/change user access

Authorizations:
ApiKeyAuth (apiKey)
path Parameters
projectId
required
string

ID of Project

userId
required
string

ID of User which access shall be changed

query Parameters
company
required
string

ID of Company or Workspace, user refers to.

deleted
string

If specified, operates on deleted project instead of active.

Enum: "true" "false"
Request Body schema: application/json
role
string

Role of user in project (user by default)

Enum: "user" "tag"

Responses

Request samples

Content type
application/json
{
  • "role": "user"
}

Response samples

Content type
application/json
{ }

deleteProjectUser

Delete a project user access

Authorizations:
ApiKeyAuth (apiKey)
path Parameters
projectId
required
string

ID of Project

userId
required
string

ID of User which access shall be changed

query Parameters
company
required
string

ID of Company or Workspace, user refers to.

deleted
string

If specified, operates on deleted project instead of active.

Enum: "true" "false"

Responses

Request samples

const fetch = require('node-fetch');

const query = new URLSearchParams({
  company: 'string',
  deleted: 'true'
}).toString();

const projectId = 'YOUR_projectId_PARAMETER';
const userId = 'YOUR_userId_PARAMETER';
const resp = await fetch(
  `https://api2.timedoctor.com/api/1.0/projects/${projectId}/users/${userId}?${query}`,
  {
    method: 'DELETE',
    headers: {
      Authorization: 'YOUR_API_KEY_HERE'
    }
  }
);

const data = await resp.text();
console.log(data);

Response samples

Content type
application/json
{ }

deleteProjectUsers

Make project public access

Authorizations:
ApiKeyAuth (apiKey)
path Parameters
projectId
required
string

ID of Project

query Parameters
company
required
string

ID of Company or Workspace, user refers to.

deleted
string

If specified, operates on deleted project instead of active.

Enum: "true" "false"

Responses

Request samples

const fetch = require('node-fetch');

const query = new URLSearchParams({
  company: 'string',
  deleted: 'true'
}).toString();

const projectId = 'YOUR_projectId_PARAMETER';
const resp = await fetch(
  `https://api2.timedoctor.com/api/1.0/projects/${projectId}/users?${query}`,
  {
    method: 'DELETE',
    headers: {
      Authorization: 'YOUR_API_KEY_HERE'
    }
  }
);

const data = await resp.text();
console.log(data);

Response samples

Content type
application/json
{ }

projects1_1

Get list of projects in company with an added support for socket streamable chunks

Authorizations:
ApiKeyAuth (apiKey)
query Parameters
company
required
string

ID of Company or Workspace, user refers to.

projects
string

If specified, comma-separated list of IDs of projects to resolve

all
string

If specified, returns all projects instead of assigned

Enum: "true" "false"
show-integration
string

If set, integration projects will be also listed

Enum: "true" "false"
allow-unassigned
string

If set, unassigned projects will also be listed

Enum: "true" "false"
detail
string

Level of details (basic by default)

Enum: "basic" "users"
user
string

If specified, a comma-separated list of user IDs to resolve the accessible projects for; it's for yourself by default

page
string

if specified, page ID to get results for; or first page by default

limit
string

if specified, maximum number of items to be returned; or use API-specific hard limit by default

sort
string

which field to sort by, prepend it with "_" for descending sorting

Enum: "id" "name" "keywords" "_id" "_name" "_keywords"
filter[id]
string

"string" -- exact match

filter[name]
string

"string" -- starts with

filter[keywords]
string

set of keywords to be matched

page
string

if specified, page ID to get results for; or first page by default

limit
string

if specified, maximum number of items to be returned; or use API-specific hard limit by default

sort
string

which field to sort by, prepend it with "_" for descending sorting

Enum: "keyphrase" "_keyphrase"
filter[keyphrase]
string

A keyphrase for searching by keywords

Responses

Request samples

const fetch = require('node-fetch');

const query = new URLSearchParams({
  company: 'string',
  projects: 'string',
  all: 'true',
  'show-integration': 'true',
  'allow-unassigned': 'true',
  detail: 'basic',
  user: 'string',
  page: ['string', 'string'],
  limit: ['string', 'string'],
  sort: ['id', 'keyphrase'],
  'filter[id]': 'string',
  'filter[name]': 'string',
  'filter[keywords]': 'string',
  'filter[keyphrase]': 'string'
}).toString();

const resp = await fetch(
  `https://api2.timedoctor.com/api/1.1/projects?${query}`,
  {
    method: 'GET',
    headers: {
      Authorization: 'YOUR_API_KEY_HERE'
    }
  }
);

const data = await resp.text();
console.log(data);

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "page": {
    }
}

Tasks

tasks

tasks

Get list of tasks in company

Authorizations:
ApiKeyAuth (apiKey)
query Parameters
company
required
string

ID of Company or Workspace, user refers to.

tasks
string

If specified, comma-separated list of IDs of tasks to resolve.

projects
string

Comma-separated IDs of Projects to filter tasks by.

folders
string

Comma-separated IDs of Folders to filter tasks by.

show-integration
string

If set, integration tasks will be also listed

Enum: "true" "false"
public-only
string

If set, only the public tasks will be listed

Enum: "true" "false"
deleted
string

Set to get deleted tasks instead of active.

Enum: "true" "false"
projectless
string

If set, only tasks without a project assigned will be listed

Enum: "true" "false"
page
string

if specified, page ID to get results for; or first page by default

limit
string

if specified, maximum number of items to be returned; or use API-specific hard limit by default

sort
string

which field to sort by, prepend it with "_" for descending sorting

Enum: "id" "name" "folder" "project" "keywords" "status" "assignedTo" "_id" "_name" "_folder" "_project" "_keywords" "_status" "_assignedTo"
filter[id]
string

"string" -- exact match

filter[name]
string

"string" -- starts with

filter[folder]
string

"string" -- exact match

filter[project]
string

"string" -- exact match

filter[keywords]
string

set of keywords to be matched

filter[status]
string

options from open, closed

filter[assignedTo]
string

"string" -- exact match

page
string

if specified, page ID to get results for; or first page by default

limit
string

if specified, maximum number of items to be returned; or use API-specific hard limit by default

sort
string

which field to sort by, prepend it with "_" for descending sorting

Enum: "keyphrase" "_keyphrase"
filter[keyphrase]
string

A keyphrase for searching by keywords

Responses

Request samples

const fetch = require('node-fetch');

const query = new URLSearchParams({
  company: 'string',
  tasks: 'string',
  projects: 'string',
  folders: 'string',
  'show-integration': 'true',
  'public-only': 'true',
  deleted: 'true',
  projectless: 'true',
  page: ['string', 'string'],
  limit: ['string', 'string'],
  sort: ['id', 'keyphrase'],
  'filter[id]': 'string',
  'filter[name]': 'string',
  'filter[folder]': 'string',
  'filter[project]': 'string',
  'filter[keywords]': 'string',
  'filter[status]': 'string',
  'filter[assignedTo]': 'string',
  'filter[keyphrase]': 'string'
}).toString();

const resp = await fetch(
  `https://api2.timedoctor.com/api/1.0/tasks?${query}`,
  {
    method: 'GET',
    headers: {
      Authorization: 'YOUR_API_KEY_HERE'
    }
  }
);

const data = await resp.text();
console.log(data);

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "page": {
    }
}

newTask

Add a task

Authorizations:
ApiKeyAuth (apiKey)
query Parameters
company
required
string

ID of Company or Workspace, user refers to.

Request Body schema: application/json
object
name
string

Task name

description
string

Task description

weight
number

Priority measure

deleted
boolean

Is task deleted?

status
string

Status of the task, used for filtering

public
boolean

Make the task public when requested as admin, manager or owner

Responses

Request samples

Content type
application/json
{
  • "project": {
    },
  • "name": "string",
  • "description": "string",
  • "weight": 0,
  • "deleted": true,
  • "status": "string",
  • "public": true
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

task

Get details of a task

Authorizations:
ApiKeyAuth (apiKey)
path Parameters
taskId
required
string

ID of Task

query Parameters
company
required
string

ID of Company or Workspace, user refers to.

Responses

Request samples

const fetch = require('node-fetch');

const query = new URLSearchParams({company: 'string'}).toString();

const taskId = 'YOUR_taskId_PARAMETER';
const resp = await fetch(
  `https://api2.timedoctor.com/api/1.0/tasks/${taskId}?${query}`,
  {
    method: 'GET',
    headers: {
      Authorization: 'YOUR_API_KEY_HERE'
    }
  }
);

const data = await resp.text();
console.log(data);

Response samples

Content type
application/json
{
  • "data": {
    }
}

putTask

Modify details of a task

Authorizations:
ApiKeyAuth (apiKey)
path Parameters
taskId
required
string

ID of Task

query Parameters
company
required
string

ID of Company or Workspace, user refers to.

Request Body schema: application/json
object
name
string

Task name

description
string

Task description

weight
number

Priority measure

deleted
boolean

Is task deleted?

status
string

Status of the task, used for filtering

public
boolean

Make the task public when requested as admin, manager or owner

Responses

Request samples

Content type
application/json
{
  • "project": {
    },
  • "name": "string",
  • "description": "string",
  • "weight": 0,
  • "deleted": true,
  • "status": "string",
  • "public": true
}

Response samples

Content type
application/json
{
  • "data": { }
}

deleteTask

Set to restore (unarchive) the task instead of archiving it.

Authorizations:
ApiKeyAuth (apiKey)
path Parameters
taskId
required
string

ID of Task

query Parameters
company
required
string

ID of Company or Workspace, user refers to.

deleted
string

Set to restore (unarchive) the task instead of archiving it.

Enum: "true" "false"

Responses

Request samples

const fetch = require('node-fetch');

const query = new URLSearchParams({
  company: 'string',
  deleted: 'true'
}).toString();

const taskId = 'YOUR_taskId_PARAMETER';
const resp = await fetch(
  `https://api2.timedoctor.com/api/1.0/tasks/${taskId}?${query}`,
  {
    method: 'DELETE',
    headers: {
      Authorization: 'YOUR_API_KEY_HERE'
    }
  }
);

const data = await resp.text();
console.log(data);

Response samples

Content type
application/json
{
  • "data": { }
}

tasks1_1

Get list of tasks in company with an added support for socket streamable chunks

Authorizations:
ApiKeyAuth (apiKey)
query Parameters
company
required
string

ID of Company or Workspace, user refers to.

tasks
string

If specified, comma-separated list of IDs of tasks to resolve.

projects
string

Comma-separated IDs of Projects to filter tasks by.

folders
string

Comma-separated IDs of Folders to filter tasks by.

show-integration
string

If set, integration tasks will be also listed

Enum: "true" "false"
public-only
string

If set, only the public tasks will be listed

Enum: "true" "false"
deleted
string

Set to get deleted tasks instead of active.

Enum: "true" "false"
projectless
string

If set, only tasks without a project assigned will be listed

Enum: "true" "false"
page
string

if specified, page ID to get results for; or first page by default

limit
string

if specified, maximum number of items to be returned; or use API-specific hard limit by default

sort
string

which field to sort by, prepend it with "_" for descending sorting

Enum: "id" "name" "folder" "project" "keywords" "status" "assignedTo" "_id" "_name" "_folder" "_project" "_keywords" "_status" "_assignedTo"
filter[id]
string

"string" -- exact match

filter[name]
string

"string" -- starts with

filter[folder]
string

"string" -- exact match

filter[project]
string

"string" -- exact match

filter[keywords]
string

set of keywords to be matched

filter[status]
string

options from open, closed

filter[assignedTo]
string

"string" -- exact match

page
string

if specified, page ID to get results for; or first page by default

limit
string

if specified, maximum number of items to be returned; or use API-specific hard limit by default

sort
string

which field to sort by, prepend it with "_" for descending sorting

Enum: "keyphrase" "_keyphrase"
filter[keyphrase]
string

A keyphrase for searching by keywords

Responses

Request samples

const fetch = require('node-fetch');

const query = new URLSearchParams({
  company: 'string',
  tasks: 'string',
  projects: 'string',
  folders: 'string',
  'show-integration': 'true',
  'public-only': 'true',
  deleted: 'true',
  projectless: 'true',
  page: ['string', 'string'],
  limit: ['string', 'string'],
  sort: ['id', 'keyphrase'],
  'filter[id]': 'string',
  'filter[name]': 'string',
  'filter[folder]': 'string',
  'filter[project]': 'string',
  'filter[keywords]': 'string',
  'filter[status]': 'string',
  'filter[assignedTo]': 'string',
  'filter[keyphrase]': 'string'
}).toString();

const resp = await fetch(
  `https://api2.timedoctor.com/api/1.1/tasks?${query}`,
  {
    method: 'GET',
    headers: {
      Authorization: 'YOUR_API_KEY_HERE'
    }
  }
);

const data = await resp.text();
console.log(data);

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "page": {
    }
}

Activity

status, stats, worklog, timeuse, timesheet, edit-time

getActivityWorklog

Get detailed worklog for a user
NOTE: It is recommended to run this API call for 7 days at a time to avoid performance issues.

Authorizations:
ApiKeyAuth (apiKey)
query Parameters
company
required
string

ID of Company or Workspace, user refers to.

user
string

Comma-separated list of user IDs

from
string <date-time>

ISO Date of range beginning (inclusive); (to minus 30mins) by default

to
string <date-time>

ISO Date of range ending (exclusive); current by default

detail
string

If specified, the method will return detailed activities with device IDs and comments

Enum: "true" "false"
exclude-fields
string

Comma-separated list of fields to exclude from results

include-modes
string

Comma-separated list of worklog modes to include optional modes like unpaidLeave in the results

task-project-names
string

If specified, the method will resolve the names for tasks and projects

Enum: "true" "false"

Responses

Request samples

const fetch = require('node-fetch');

const query = new URLSearchParams({
  company: 'string',
  user: 'string',
  from: '2019-08-24T14:15:22Z',
  to: '2019-08-24T14:15:22Z',
  detail: 'true',
  'exclude-fields': 'string',
  'include-modes': 'string',
  'task-project-names': 'true'
}).toString();

const resp = await fetch(
  `https://api2.timedoctor.com/api/1.0/activity/worklog?${query}`,
  {
    method: 'GET',
    headers: {
      Authorization: 'YOUR_API_KEY_HERE'
    }
  }
);

const data = await resp.text();
console.log(data);

Response samples

Content type
application/json
{
  • "data": [
    ]
}

getActivityTimeuse

Get detailed timeuse for a user

Authorizations:
ApiKeyAuth (apiKey)
query Parameters
company
required
string

ID of Company or Workspace, user refers to.

user
string

Comma-separated list of user IDs

from
string <date-time>

ISO Date of range beginning (inclusive); (to minus 30mins) by default

to
string <date-time>

ISO Date of range ending (exclusive); current by default

detail
string

If specified, the method will return detailed activities with device IDs and comments

Enum: "true" "false"
exclude-fields
string

Comma-separated list of fields to exclude from results

include-modes
string

Comma-separated list of worklog modes to include optional modes like unpaidLeave in the results

category
string

If specified, ID of category to filter by

category-details
string

If specified, the method will resolve the details for categories

Enum: "true" "false"

Responses

Request samples

const fetch = require('node-fetch');

const query = new URLSearchParams({
  company: 'string',
  user: 'string',
  from: '2019-08-24T14:15:22Z',
  to: '2019-08-24T14:15:22Z',
  detail: 'true',
  'exclude-fields': 'string',
  'include-modes': 'string',
  category: 'string',
  'category-details': 'true'
}).toString();

const resp = await fetch(
  `https://api2.timedoctor.com/api/1.0/activity/timeuse?${query}`,
  {
    method: 'GET',
    headers: {
      Authorization: 'YOUR_API_KEY_HERE'
    }
  }
);

const data = await resp.text();
console.log(data);

Response samples

Content type
application/json
{
  • "data": [
    ]
}

timeuseStats

Get timeise stats of user

Authorizations:
ApiKeyAuth (apiKey)
query Parameters
company
required
string

ID of Company or Workspace, user refers to.

from
string <date-time>

ISO Date of range beginning (inclusive); (to minus 30mins) by default

to
string <date-time>

ISO Date of range ending (exclusive); current by default

user
string

Comma-separated list of user IDs

category
string

Category to fetch report for

page
string

if specified, page ID to get results for; or first page by default

limit
string

if specified, maximum number of items to be returned; or use API-specific hard limit by default

sort
string

which field to sort by, prepend it with "_" for descending sorting

Enum: "time" "score" "category" "_time" "_score" "_category"
filter[time]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[score]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[category]
string

"string" -- exact match

Responses

Request samples

const fetch = require('node-fetch');

const query = new URLSearchParams({
  company: 'string',
  from: '2019-08-24T14:15:22Z',
  to: '2019-08-24T14:15:22Z',
  user: 'string',
  category: 'string',
  page: 'string',
  limit: 'string',
  sort: 'time',
  'filter[time]': 'string',
  'filter[score]': 'string',
  'filter[category]': 'string'
}).toString();

const resp = await fetch(
  `https://api2.timedoctor.com/api/1.0/activity/timeuse/stats?${query}`,
  {
    method: 'GET',
    headers: {
      Authorization: 'YOUR_API_KEY_HERE'
    }
  }
);

const data = await resp.text();
console.log(data);

Response samples

Content type
application/json
{
  • "data": [
    ]
}

getActivityEditTime

Get edit time ranges for a user(s)

Authorizations:
ApiKeyAuth (apiKey)
query Parameters
company
required
string

ID of Company or Workspace, user refers to.

user
string

Comma-separated list of user IDs

from
string <date-time>

ISO Date of range beginning (inclusive); (to minus 30mins) by default

to
string <date-time>

ISO Date of range ending (exclusive); current by default

exclude-fields
string

Comma-separated list of fields to exclude from results

include-modes
string

Comma-separated list of worklog modes to include optional modes like unpaidLeave in the results

approved
string

If specified, the method will filter by approval

Enum: "pending" "approved" "disapproved"
tag
string

comma separated value of tag ids

include-auto-approved
boolean
Default: true

include auto approved edit time records

resolve-names
boolean
Default: false

include reviewer name, project name, task name & user name

page-user
string

continue listing from the user with specified ID

sort-user
string

sort users by specified field ("_" prefix = descending)

Enum: "name" "_name"

Responses

Request samples

const fetch = require('node-fetch');

const query = new URLSearchParams({
  company: 'string',
  user: 'string',
  from: '2019-08-24T14:15:22Z',
  to: '2019-08-24T14:15:22Z',
  'exclude-fields': 'string',
  'include-modes': 'string',
  approved: 'pending',
  tag: 'string',
  'include-auto-approved': 'true',
  'resolve-names': 'false',
  'page-user': 'string',
  'sort-user': 'name'
}).toString();

const resp = await fetch(
  `https://api2.timedoctor.com/api/1.0/activity/edit-time?${query}`,
  {
    method: 'GET',
    headers: {
      Authorization: 'YOUR_API_KEY_HERE'
    }
  }
);

const data = await resp.text();
console.log(data);

Response samples

Content type
application/json
{
  • "data": [
    ]
}

postActivityEditTime

Add edit time range for a user

Authorizations:
ApiKeyAuth (apiKey)
query Parameters
company
required
string

ID of Company or Workspace, user refers to.

Request Body schema: application/json
userId
string

ID of the user

start
required
string <date-time>

ISO date of beginning

taskId
required
string

ID of Task.

projectId
required
string

ID of Project.

end
string <date-time>

ISO date of ending (a moment of ending, f.x. a minute interval ends on a moment of next 00-th second)

operation
required
string

Edit Time Operation

Enum: "add" "remove"
reason
required
string
approved
required
boolean

Responses

Request samples

Content type
application/json
{
  • "userId": "string",
  • "start": "2019-08-24T14:15:22Z",
  • "taskId": "string",
  • "projectId": "string",
  • "end": "2019-08-24T14:15:22Z",
  • "operation": "add",
  • "reason": "string",
  • "approved": true
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

putBulkEditTime

update edit time records in bulk

Authorizations:
ApiKeyAuth (apiKey)
query Parameters
company
required
string

ID of Company or Workspace, user refers to.

Request Body schema: application/json
Array ()
userId
string

ID of the user

start
required
string <date-time>

ISO date of beginning

taskId
required
string

ID of Task.

projectId
required
string

ID of Project.

end
string <date-time>

ISO date of ending (a moment of ending, f.x. a minute interval ends on a moment of next 00-th second)

operation
required
string

Edit Time Operation

Enum: "add" "remove"
reason
required
string
approved
required
boolean

Responses

Request samples

Content type
application/json
[
  • {
    }
]

Response samples

Content type
application/json
{
  • "data": {
    }
}

putActivityEditTime

Modify edit time range for a user

Authorizations:
ApiKeyAuth (apiKey)
path Parameters
id
required
string

ID of the time to edit

query Parameters
company
required
string

ID of Company or Workspace, user refers to.

Request Body schema: application/json
userId
string

ID of the user

start
required
string <date-time>

ISO date of beginning

taskId
required
string

ID of Task.

projectId
required
string

ID of Project.

end
string <date-time>

ISO date of ending (a moment of ending, f.x. a minute interval ends on a moment of next 00-th second)

operation
required
string

Edit Time Operation

Enum: "add" "remove"
reason
required
string
approved
required
boolean

Responses

Request samples

Content type
application/json
{
  • "userId": "string",
  • "start": "2019-08-24T14:15:22Z",
  • "taskId": "string",
  • "projectId": "string",
  • "end": "2019-08-24T14:15:22Z",
  • "operation": "add",
  • "reason": "string",
  • "approved": true
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

getDisconnectivity

Get detailed disconnectivity data for a user

Authorizations:
ApiKeyAuth (apiKey)
query Parameters
company
required
string

ID of Company or Workspace, user refers to.

user
string

Comma-separated list of user IDs

from
string <date-time>

ISO Date of range beginning (inclusive); (to minus 30mins) by default

to
string <date-time>

ISO Date of range ending (exclusive); current by default

Responses

Request samples

const fetch = require('node-fetch');

const query = new URLSearchParams({
  company: 'string',
  user: 'string',
  from: '2019-08-24T14:15:22Z',
  to: '2019-08-24T14:15:22Z'
}).toString();

const resp = await fetch(
  `https://api2.timedoctor.com/api/1.0/activity/disconnectivity?${query}`,
  {
    method: 'GET',
    headers: {
      Authorization: 'YOUR_API_KEY_HERE'
    }
  }
);

const data = await resp.text();
console.log(data);

Response samples

Content type
application/json
{
  • "data": [
    ]
}

stats1_1_total

Get total stats v1.1.
NOTE: This documentation uses ratio=score and sort=modeTotal as an example. As such, you can get responses that contain score and modeTotal, depending on the parameters you specify when making the request. It is important to understand that score will be replaced by the value you specify for the ratio param and modeTotal will be replaced by the value you specify for sort.
For work range use 1.1/stats/total?fields=start,end,workRange

Authorizations:
ApiKeyAuth (apiKey)
query Parameters
company
required
string

ID of Company or Workspace, user refers to.

from
string <date-time>

ISO Date of range beginning (inclusive); (to minus 30mins) by default

to
string <date-time>

ISO Date of range ending (exclusive); current by default

user
string

Comma-separated list of User IDs yourself if omitted; all -- to get totals for workspace

tag
string

Comma-separated list of Tag IDs. If specified, users will be filtered by these tags

task
string

If specified, return only statistics on this task

unpaid
integer

If set to 1, includes unpaid time (from unpaid breaks) into report

breaks
string

Specifies breaks to get. This may not be combined with "task" parameter

Enum: "all" "paid" "unpaid"
fields
string

Optional comma-separated list of field names to return.

group-by
string

If specified, will group the results by given field (if such grouping is supported).

resolve
string

Optional comma-separated list of field names to resolve.

ratio
string

Optional comma-separated list of field names to get total ratio of.

level
string

Level of information ("user" by default)

Enum: "company" "user"
timezone
string

Timezone of ranges breaks. Etc/UTC by default

period
string
Default: "days"

Period unit of ranges subdivision. days by default

Enum: "minutes" "hours" "days" "months" "years"
interval
integer <int32> >= 1

Number of period units. 1 by default

page
string

if specified, page ID to get results for; or first page by default

limit
string

if specified, maximum number of items to be returned; or use API-specific hard limit by default

sort
string

which field to sort by, prepend it with "_" for descending sorting

Enum: "offcomputer" "computer" "mobile" "manual" "mobMan" "paidBreak" "unpaidBreak" "paidLeave" "unpaidLeave" "offcomputerRatio" "computerRatio" "mobileRatio" "manualRatio" "mobManRatio" "paidBreakRatio" "unpaidBreakRatio" "paidLeaveRatio" "unpaidLeaveRatio" "unratedHis" "unprodHis" "neutralHis" "prodHis" "unratedHisRatio" "unprodHisRatio" "neutralHisRatio" "prodHisRatio" "unrated" "unprod" "neutral" "prod" "unratedRatio" "unprodRatio" "neutralRatio" "prodRatio" "standardActiveSec" "activeBias" "activeBiasRatio" "standardActiveSecRatio" "clicks" "idleSec" "keys" "moves" "totalSec" "activeSec" "clicksRatio" "idleSecRatio" "keysRatio" "movesRatio" "totalSecRatio" "activeSecRatio" "totalMins" "idleMins" "idleMinsRatio" "outShift" "outShiftRatio" "project" "task" "shift" "projectRatio" "taskRatio" "shiftRatio" "comCat" "comCatRatio" "scoreTotal" "scoreTotalRatio" "workRange" "workRangeRatio" "modeTotal" "total" "userId" "userObjPrePos" "userObjPos" "userName" "userNameNorm" "userArchived" "currentTagId" "currentTagObj" "currentTagName" "currentTagNameNorm" "projectId" "projectObj" "projectName" "projectNameNorm" "projectIntegrationProvider" "projectIntegrationName" "projectIntegrationNameNorm" "taskId" "taskObj" "taskName" "taskNameNorm" "taskIntegrationProvider" "taskIntegrationName" "taskIntegrationNameNorm" "taskIntegrationLink" "taskIntegrationLastTracked" "date" "timezone" "start" "end" "item" "ratio" "ratioTotal" "count" "quants" "offsets" "quant0" "quant1" "quant2" "_offcomputer" "_computer" "_mobile" "_manual" "_mobMan" "_paidBreak" "_unpaidBreak" "_paidLeave" "_unpaidLeave" "_offcomputerRatio" "_computerRatio" "_mobileRatio" "_manualRatio" "_mobManRatio" "_paidBreakRatio" "_unpaidBreakRatio" "_paidLeaveRatio" "_unpaidLeaveRatio" "_unratedHis" "_unprodHis" "_neutralHis" "_prodHis" "_unratedHisRatio" "_unprodHisRatio" "_neutralHisRatio" "_prodHisRatio" "_unrated" "_unprod" "_neutral" "_prod" "_unratedRatio" "_unprodRatio" "_neutralRatio" "_prodRatio" "_standardActiveSec" "_activeBias" "_activeBiasRatio" "_standardActiveSecRatio" "_clicks" "_idleSec" "_keys" "_moves" "_totalSec" "_activeSec" "_clicksRatio" "_idleSecRatio" "_keysRatio" "_movesRatio" "_totalSecRatio" "_activeSecRatio" "_totalMins" "_idleMins" "_idleMinsRatio" "_outShift" "_outShiftRatio" "_project" "_task" "_shift" "_projectRatio" "_taskRatio" "_shiftRatio" "_comCat" "_comCatRatio" "_scoreTotal" "_scoreTotalRatio" "_workRange" "_workRangeRatio" "_modeTotal" "_total" "_userId" "_userObjPrePos" "_userObjPos" "_userName" "_userNameNorm" "_userArchived" "_currentTagId" "_currentTagObj" "_currentTagName" "_currentTagNameNorm" "_projectId" "_projectObj" "_projectName" "_projectNameNorm" "_projectIntegrationProvider" "_projectIntegrationName" "_projectIntegrationNameNorm" "_taskId" "_taskObj" "_taskName" "_taskNameNorm" "_taskIntegrationProvider" "_taskIntegrationName" "_taskIntegrationNameNorm" "_taskIntegrationLink" "_taskIntegrationLastTracked" "_date" "_timezone" "_start" "_end" "_item" "_ratio" "_ratioTotal" "_count" "_quants" "_offsets" "_quant0" "_quant1" "_quant2"
filter[offcomputer]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[computer]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[mobile]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[manual]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[mobMan]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[paidBreak]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[unpaidBreak]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[paidLeave]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[unpaidLeave]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[offcomputerRatio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[computerRatio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[mobileRatio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[manualRatio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[mobManRatio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[paidBreakRatio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[unpaidBreakRatio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[paidLeaveRatio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[unpaidLeaveRatio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[unratedHis]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[unprodHis]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[neutralHis]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[prodHis]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[unratedHisRatio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[unprodHisRatio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[neutralHisRatio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[prodHisRatio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[unrated]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[unprod]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[neutral]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[prod]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[unratedRatio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[unprodRatio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[neutralRatio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[prodRatio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[standardActiveSec]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[activeBias]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[activeBiasRatio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[standardActiveSecRatio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[clicks]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[idleSec]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[keys]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[moves]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[totalSec]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[activeSec]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[clicksRatio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[idleSecRatio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[keysRatio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[movesRatio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[totalSecRatio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[activeSecRatio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[totalMins]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[idleMins]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[idleMinsRatio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[outShift]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[outShiftRatio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[project]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[task]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[shift]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[projectRatio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[taskRatio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[shiftRatio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[comCat]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[comCatRatio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[scoreTotal]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[scoreTotalRatio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[workRange]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[workRangeRatio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[modeTotal]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[total]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

prefilter[userId]
string

"string" -- exact match

prefilter[userObjPrePos]
string

"string" -- exact match

prefilter[userObjPos]
string

"string" -- exact match

prefilter[userName]
string

"string" -- exact match

prefilter[userNameNorm]
string

unknown API-defined value

prefilter[userArchived]
string

"string" -- exact match

prefilter[currentTagId]
string

"string" -- exact match

prefilter[currentTagObj]
string

"string" -- exact match

prefilter[currentTagName]
string

"string" -- exact match

prefilter[currentTagNameNorm]
string

"string" -- exact match

prefilter[projectId]
string

"string" -- exact match

prefilter[projectObj]
string

"string" -- exact match

prefilter[projectName]
string

"string" -- exact match

prefilter[projectNameNorm]
string

"string" -- exact match

prefilter[projectIntegrationProvider]
string

"string" -- exact match

prefilter[projectIntegrationName]
string

"string" -- exact match

prefilter[projectIntegrationNameNorm]
string

"string" -- exact match

prefilter[taskId]
string

"string" -- exact match

prefilter[taskObj]
string

"string" -- exact match

prefilter[taskName]
string

"string" -- exact match

prefilter[taskNameNorm]
string

"string" -- exact match

prefilter[taskIntegrationProvider]
string

"string" -- exact match

prefilter[taskIntegrationName]
string

"string" -- exact match

prefilter[taskIntegrationNameNorm]
string

"string" -- exact match

prefilter[taskIntegrationLink]
string

"string" -- exact match

prefilter[taskIntegrationLastTracked]
string

"ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

prefilter[date]
string

"ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

prefilter[timezone]
string

"string" -- exact match

prefilter[start]
string

"ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

prefilter[end]
string

"ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

prefilter[item]
string

"string" -- exact match

filter[ratio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[ratioTotal]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[count]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

prefilter[quants]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

prefilter[offsets]
string

"ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[quant0]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[quant1]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[quant2]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

ratio-page
string

if specified, page ID to get results for; or first page by default

ratio-limit
string

if specified, maximum number of items to be returned; or use API-specific hard limit by default

ratio-sort
string

which field to sort by, prepend it with "_" for descending sorting

Enum: "offcomputer" "computer" "mobile" "manual" "mobMan" "paidBreak" "unpaidBreak" "paidLeave" "unpaidLeave" "offcomputerRatio" "computerRatio" "mobileRatio" "manualRatio" "mobManRatio" "paidBreakRatio" "unpaidBreakRatio" "paidLeaveRatio" "unpaidLeaveRatio" "unratedHis" "unprodHis" "neutralHis" "prodHis" "unratedHisRatio" "unprodHisRatio" "neutralHisRatio" "prodHisRatio" "unrated" "unprod" "neutral" "prod" "unratedRatio" "unprodRatio" "neutralRatio" "prodRatio" "standardActiveSec" "activeBias" "activeBiasRatio" "standardActiveSecRatio" "clicks" "idleSec" "keys" "moves" "totalSec" "activeSec" "clicksRatio" "idleSecRatio" "keysRatio" "movesRatio" "totalSecRatio" "activeSecRatio" "totalMins" "idleMins" "idleMinsRatio" "outShift" "outShiftRatio" "project" "task" "shift" "projectRatio" "taskRatio" "shiftRatio" "comCat" "comCatRatio" "scoreTotal" "scoreTotalRatio" "workRange" "workRangeRatio" "modeTotal" "total" "userId" "userObjPrePos" "userObjPos" "userName" "userNameNorm" "userArchived" "currentTagId" "currentTagObj" "currentTagName" "currentTagNameNorm" "projectId" "projectObj" "projectName" "projectNameNorm" "projectIntegrationProvider" "projectIntegrationName" "projectIntegrationNameNorm" "taskId" "taskObj" "taskName" "taskNameNorm" "taskIntegrationProvider" "taskIntegrationName" "taskIntegrationNameNorm" "taskIntegrationLink" "taskIntegrationLastTracked" "date" "timezone" "start" "end" "item" "ratio" "ratioTotal" "count" "quants" "offsets" "quant0" "quant1" "quant2" "_offcomputer" "_computer" "_mobile" "_manual" "_mobMan" "_paidBreak" "_unpaidBreak" "_paidLeave" "_unpaidLeave" "_offcomputerRatio" "_computerRatio" "_mobileRatio" "_manualRatio" "_mobManRatio" "_paidBreakRatio" "_unpaidBreakRatio" "_paidLeaveRatio" "_unpaidLeaveRatio" "_unratedHis" "_unprodHis" "_neutralHis" "_prodHis" "_unratedHisRatio" "_unprodHisRatio" "_neutralHisRatio" "_prodHisRatio" "_unrated" "_unprod" "_neutral" "_prod" "_unratedRatio" "_unprodRatio" "_neutralRatio" "_prodRatio" "_standardActiveSec" "_activeBias" "_activeBiasRatio" "_standardActiveSecRatio" "_clicks" "_idleSec" "_keys" "_moves" "_totalSec" "_activeSec" "_clicksRatio" "_idleSecRatio" "_keysRatio" "_movesRatio" "_totalSecRatio" "_activeSecRatio" "_totalMins" "_idleMins" "_idleMinsRatio" "_outShift" "_outShiftRatio" "_project" "_task" "_shift" "_projectRatio" "_taskRatio" "_shiftRatio" "_comCat" "_comCatRatio" "_scoreTotal" "_scoreTotalRatio" "_workRange" "_workRangeRatio" "_modeTotal" "_total" "_userId" "_userObjPrePos" "_userObjPos" "_userName" "_userNameNorm" "_userArchived" "_currentTagId" "_currentTagObj" "_currentTagName" "_currentTagNameNorm" "_projectId" "_projectObj" "_projectName" "_projectNameNorm" "_projectIntegrationProvider" "_projectIntegrationName" "_projectIntegrationNameNorm" "_taskId" "_taskObj" "_taskName" "_taskNameNorm" "_taskIntegrationProvider" "_taskIntegrationName" "_taskIntegrationNameNorm" "_taskIntegrationLink" "_taskIntegrationLastTracked" "_date" "_timezone" "_start" "_end" "_item" "_ratio" "_ratioTotal" "_count" "_quants" "_offsets" "_quant0" "_quant1" "_quant2"
ratio-filter[total]
string

Prefilter ratio totals.

ratio-field
string

A field to specify for "ratio" paging. Default is first specified in "ratio" param

ratio-id
string

ID of ratio item for "ratio" paging. Default is top first in ratio array.

date-page
string

if specified, page ID to get results for; or first page by default

date-limit
string

if specified, maximum number of items to be returned; or use API-specific hard limit by default

Responses

Request samples

const fetch = require('node-fetch');

const query = new URLSearchParams({
  company: 'string',
  from: '2019-08-24T14:15:22Z',
  to: '2019-08-24T14:15:22Z',
  user: 'string',
  tag: 'string',
  task: 'string',
  unpaid: '0',
  breaks: 'all',
  fields: 'string',
  'group-by': 'string',
  resolve: 'string',
  ratio: 'string',
  level: 'company',
  timezone: 'string',
  period: 'days',
  interval: '1',
  page: 'string',
  limit: 'string',
  sort: 'offcomputer',
  'filter[offcomputer]': 'string',
  'filter[computer]': 'string',
  'filter[mobile]': 'string',
  'filter[manual]': 'string',
  'filter[mobMan]': 'string',
  'filter[paidBreak]': 'string',
  'filter[unpaidBreak]': 'string',
  'filter[paidLeave]': 'string',
  'filter[unpaidLeave]': 'string',
  'filter[offcomputerRatio]': 'string',
  'filter[computerRatio]': 'string',
  'filter[mobileRatio]': 'string',
  'filter[manualRatio]': 'string',
  'filter[mobManRatio]': 'string',
  'filter[paidBreakRatio]': 'string',
  'filter[unpaidBreakRatio]': 'string',
  'filter[paidLeaveRatio]': 'string',
  'filter[unpaidLeaveRatio]': 'string',
  'filter[unratedHis]': 'string',
  'filter[unprodHis]': 'string',
  'filter[neutralHis]': 'string',
  'filter[prodHis]': 'string',
  'filter[unratedHisRatio]': 'string',
  'filter[unprodHisRatio]': 'string',
  'filter[neutralHisRatio]': 'string',
  'filter[prodHisRatio]': 'string',
  'filter[unrated]': 'string',
  'filter[unprod]': 'string',
  'filter[neutral]': 'string',
  'filter[prod]': 'string',
  'filter[unratedRatio]': 'string',
  'filter[unprodRatio]': 'string',
  'filter[neutralRatio]': 'string',
  'filter[prodRatio]': 'string',
  'filter[standardActiveSec]': 'string',
  'filter[activeBias]': 'string',
  'filter[activeBiasRatio]': 'string',
  'filter[standardActiveSecRatio]': 'string',
  'filter[clicks]': 'string',
  'filter[idleSec]': 'string',
  'filter[keys]': 'string',
  'filter[moves]': 'string',
  'filter[totalSec]': 'string',
  'filter[activeSec]': 'string',
  'filter[clicksRatio]': 'string',
  'filter[idleSecRatio]': 'string',
  'filter[keysRatio]': 'string',
  'filter[movesRatio]': 'string',
  'filter[totalSecRatio]': 'string',
  'filter[activeSecRatio]': 'string',
  'filter[totalMins]': 'string',
  'filter[idleMins]': 'string',
  'filter[idleMinsRatio]': 'string',
  'filter[outShift]': 'string',
  'filter[outShiftRatio]': 'string',
  'filter[project]': 'string',
  'filter[task]': 'string',
  'filter[shift]': 'string',
  'filter[projectRatio]': 'string',
  'filter[taskRatio]': 'string',
  'filter[shiftRatio]': 'string',
  'filter[comCat]': 'string',
  'filter[comCatRatio]': 'string',
  'filter[scoreTotal]': 'string',
  'filter[scoreTotalRatio]': 'string',
  'filter[workRange]': 'string',
  'filter[workRangeRatio]': 'string',
  'filter[modeTotal]': 'string',
  'filter[total]': 'string',
  'prefilter[userId]': 'string',
  'prefilter[userObjPrePos]': 'string',
  'prefilter[userObjPos]': 'string',
  'prefilter[userName]': 'string',
  'prefilter[userNameNorm]': 'string',
  'prefilter[userArchived]': 'string',
  'prefilter[currentTagId]': 'string',
  'prefilter[currentTagObj]': 'string',
  'prefilter[currentTagName]': 'string',
  'prefilter[currentTagNameNorm]': 'string',
  'prefilter[projectId]': 'string',
  'prefilter[projectObj]': 'string',
  'prefilter[projectName]': 'string',
  'prefilter[projectNameNorm]': 'string',
  'prefilter[projectIntegrationProvider]': 'string',
  'prefilter[projectIntegrationName]': 'string',
  'prefilter[projectIntegrationNameNorm]': 'string',
  'prefilter[taskId]': 'string',
  'prefilter[taskObj]': 'string',
  'prefilter[taskName]': 'string',
  'prefilter[taskNameNorm]': 'string',
  'prefilter[taskIntegrationProvider]': 'string',
  'prefilter[taskIntegrationName]': 'string',
  'prefilter[taskIntegrationNameNorm]': 'string',
  'prefilter[taskIntegrationLink]': 'string',
  'prefilter[taskIntegrationLastTracked]': 'string',
  'prefilter[date]': 'string',
  'prefilter[timezone]': 'string',
  'prefilter[start]': 'string',
  'prefilter[end]': 'string',
  'prefilter[item]': 'string',
  'filter[ratio]': 'string',
  'filter[ratioTotal]': 'string',
  'filter[count]': 'string',
  'prefilter[quants]': 'string',
  'prefilter[offsets]': 'string',
  'filter[quant0]': 'string',
  'filter[quant1]': 'string',
  'filter[quant2]': 'string',
  'ratio-page': 'string',
  'ratio-limit': 'string',
  'ratio-sort': 'offcomputer',
  'ratio-filter[total]': 'string',
  'ratio-field': 'string',
  'ratio-id': 'string',
  'date-page': 'string',
  'date-limit': 'string'
}).toString();

const resp = await fetch(
  `https://api2.timedoctor.com/api/1.1/stats/total?${query}`,
  {
    method: 'GET',
    headers: {
      Authorization: 'YOUR_API_KEY_HERE'
    }
  }
);

const data = await resp.text();
console.log(data);

Response samples

Content type
application/json
{
  • "data": [
    ]
}

stats1_1_category

Get category stats v1.1.
NOTE: This documentation uses ratio=score and sort=modeTotal as an example. As such, you can get responses that contain score and modeTotal, depending on the parameters you specify when making the request. It is important to understand that score will be replaced by the value you specify for the ratio param and modeTotal will be replaced by the value you specify for sort.

Authorizations:
ApiKeyAuth (apiKey)
query Parameters
company
required
string

ID of Company or Workspace, user refers to.

from
string <date-time>

ISO Date of range beginning (inclusive); (to minus 30mins) by default

to
string <date-time>

ISO Date of range ending (exclusive); current by default

user
string

Comma-separated list of User IDs yourself if omitted; all -- to get totals for workspace

tag
string

Comma-separated list of Tag IDs. If specified, users will be filtered by these tags

task
string

If specified, return only statistics on this task

unpaid
integer

If set to 1, includes unpaid time (from unpaid breaks) into report

breaks
string

Specifies breaks to get. This may not be combined with "task" parameter

Enum: "all" "paid" "unpaid"
fields
string

Optional comma-separated list of field names to return.

group-by
string

If specified, will group the results by given field (if such grouping is supported).

resolve
string

Optional comma-separated list of field names to resolve.

ratio
string

Optional comma-separated list of field names to get total ratio of.

level
string

Level of information ("user" by default)

Enum: "company" "user"
timezone
string

Timezone of ranges breaks. Etc/UTC by default

period
string
Default: "days"

Period unit of ranges subdivision. days by default

Enum: "minutes" "hours" "days" "months" "years"
interval
integer <int32> >= 1

Number of period units. 1 by default

page
string

if specified, page ID to get results for; or first page by default

limit
string

if specified, maximum number of items to be returned; or use API-specific hard limit by default

sort
string

which field to sort by, prepend it with "_" for descending sorting

Enum: "userId" "userObjPrePos" "userObjPos" "userName" "userNameNorm" "userArchived" "currentTagId" "currentTagObj" "currentTagName" "currentTagNameNorm" "projectId" "projectObj" "projectName" "projectNameNorm" "projectIntegrationProvider" "projectIntegrationName" "projectIntegrationNameNorm" "taskId" "taskObj" "taskName" "taskNameNorm" "taskIntegrationProvider" "taskIntegrationName" "taskIntegrationNameNorm" "taskIntegrationLink" "taskIntegrationLastTracked" "date" "timezone" "start" "end" "item" "ratio" "ratioTotal" "count" "quants" "offsets" "quant0" "quant1" "quant2" "total" "comCat" "comCatObj" "entity" "name" "score" "tagId" "userCat" "clicks" "moves" "keys" "totalMins" "idleSec" "idleSecRatio" "idleMins" "idleMinsRatio" "totalSec" "activeSec" "activeSecRatio" "standardActiveSec" "activeBias" "activeBiasRatio" "standardActiveSecRatio" "_userId" "_userObjPrePos" "_userObjPos" "_userName" "_userNameNorm" "_userArchived" "_currentTagId" "_currentTagObj" "_currentTagName" "_currentTagNameNorm" "_projectId" "_projectObj" "_projectName" "_projectNameNorm" "_projectIntegrationProvider" "_projectIntegrationName" "_projectIntegrationNameNorm" "_taskId" "_taskObj" "_taskName" "_taskNameNorm" "_taskIntegrationProvider" "_taskIntegrationName" "_taskIntegrationNameNorm" "_taskIntegrationLink" "_taskIntegrationLastTracked" "_date" "_timezone" "_start" "_end" "_item" "_ratio" "_ratioTotal" "_count" "_quants" "_offsets" "_quant0" "_quant1" "_quant2" "_total" "_comCat" "_comCatObj" "_entity" "_name" "_score" "_tagId" "_userCat" "_clicks" "_moves" "_keys" "_totalMins" "_idleSec" "_idleSecRatio" "_idleMins" "_idleMinsRatio" "_totalSec" "_activeSec" "_activeSecRatio" "_standardActiveSec" "_activeBias" "_activeBiasRatio" "_standardActiveSecRatio"
prefilter[userId]
string

"string" -- exact match

prefilter[userObjPrePos]
string

"string" -- exact match

prefilter[userObjPos]
string

"string" -- exact match

prefilter[userName]
string

"string" -- exact match

prefilter[userNameNorm]
string

unknown API-defined value

prefilter[userArchived]
string

"string" -- exact match

prefilter[currentTagId]
string

"string" -- exact match

prefilter[currentTagObj]
string

"string" -- exact match

prefilter[currentTagName]
string

"string" -- exact match

prefilter[currentTagNameNorm]
string

"string" -- exact match

prefilter[projectId]
string

"string" -- exact match

prefilter[projectObj]
string

"string" -- exact match

prefilter[projectName]
string

"string" -- exact match

prefilter[projectNameNorm]
string

"string" -- exact match

prefilter[projectIntegrationProvider]
string

"string" -- exact match

prefilter[projectIntegrationName]
string

"string" -- exact match

prefilter[projectIntegrationNameNorm]
string

"string" -- exact match

prefilter[taskId]
string

"string" -- exact match

prefilter[taskObj]
string

"string" -- exact match

prefilter[taskName]
string

"string" -- exact match

prefilter[taskNameNorm]
string

"string" -- exact match

prefilter[taskIntegrationProvider]
string

"string" -- exact match

prefilter[taskIntegrationName]
string

"string" -- exact match

prefilter[taskIntegrationNameNorm]
string

"string" -- exact match

prefilter[taskIntegrationLink]
string

"string" -- exact match

prefilter[taskIntegrationLastTracked]
string

"ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

prefilter[date]
string

"ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

prefilter[timezone]
string

"string" -- exact match

prefilter[start]
string

"ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

prefilter[end]
string

"ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

prefilter[item]
string

"string" -- exact match

filter[ratio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[ratioTotal]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[count]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

prefilter[quants]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

prefilter[offsets]
string

"ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[quant0]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[quant1]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[quant2]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[total]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

prefilter[comCat]
string

"string" -- exact match

filter[comCatObj]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

prefilter[entity]
string

"string" -- exact match

prefilter[name]
string

unknown API-defined value

prefilter[score]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

prefilter[tagId]
string

"string" -- exact match

prefilter[userCat]
string

"string" -- exact match

filter[clicks]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[moves]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[keys]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[totalMins]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[idleSec]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[idleSecRatio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[idleMins]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[idleMinsRatio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[totalSec]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[activeSec]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[activeSecRatio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[standardActiveSec]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[activeBias]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[activeBiasRatio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[standardActiveSecRatio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

ratio-page
string

if specified, page ID to get results for; or first page by default

ratio-limit
string

if specified, maximum number of items to be returned; or use API-specific hard limit by default

ratio-sort
string

which field to sort by, prepend it with "_" for descending sorting

Enum: "userId" "userObjPrePos" "userObjPos" "userName" "userNameNorm" "userArchived" "currentTagId" "currentTagObj" "currentTagName" "currentTagNameNorm" "projectId" "projectObj" "projectName" "projectNameNorm" "projectIntegrationProvider" "projectIntegrationName" "projectIntegrationNameNorm" "taskId" "taskObj" "taskName" "taskNameNorm" "taskIntegrationProvider" "taskIntegrationName" "taskIntegrationNameNorm" "taskIntegrationLink" "taskIntegrationLastTracked" "date" "timezone" "start" "end" "item" "ratio" "ratioTotal" "count" "quants" "offsets" "quant0" "quant1" "quant2" "total" "comCat" "comCatObj" "entity" "name" "score" "tagId" "userCat" "clicks" "moves" "keys" "totalMins" "idleSec" "idleSecRatio" "idleMins" "idleMinsRatio" "totalSec" "activeSec" "activeSecRatio" "standardActiveSec" "activeBias" "activeBiasRatio" "standardActiveSecRatio" "_userId" "_userObjPrePos" "_userObjPos" "_userName" "_userNameNorm" "_userArchived" "_currentTagId" "_currentTagObj" "_currentTagName" "_currentTagNameNorm" "_projectId" "_projectObj" "_projectName" "_projectNameNorm" "_projectIntegrationProvider" "_projectIntegrationName" "_projectIntegrationNameNorm" "_taskId" "_taskObj" "_taskName" "_taskNameNorm" "_taskIntegrationProvider" "_taskIntegrationName" "_taskIntegrationNameNorm" "_taskIntegrationLink" "_taskIntegrationLastTracked" "_date" "_timezone" "_start" "_end" "_item" "_ratio" "_ratioTotal" "_count" "_quants" "_offsets" "_quant0" "_quant1" "_quant2" "_total" "_comCat" "_comCatObj" "_entity" "_name" "_score" "_tagId" "_userCat" "_clicks" "_moves" "_keys" "_totalMins" "_idleSec" "_idleSecRatio" "_idleMins" "_idleMinsRatio" "_totalSec" "_activeSec" "_activeSecRatio" "_standardActiveSec" "_activeBias" "_activeBiasRatio" "_standardActiveSecRatio"
ratio-filter[total]
string

Prefilter ratio totals.

ratio-field
string

A field to specify for "ratio" paging. Default is first specified in "ratio" param

ratio-id
string

ID of ratio item for "ratio" paging. Default is top first in ratio array.

date-page
string

if specified, page ID to get results for; or first page by default

date-limit
string

if specified, maximum number of items to be returned; or use API-specific hard limit by default

Responses

Request samples

const fetch = require('node-fetch');

const query = new URLSearchParams({
  company: 'string',
  from: '2019-08-24T14:15:22Z',
  to: '2019-08-24T14:15:22Z',
  user: 'string',
  tag: 'string',
  task: 'string',
  unpaid: '0',
  breaks: 'all',
  fields: 'string',
  'group-by': 'string',
  resolve: 'string',
  ratio: 'string',
  level: 'company',
  timezone: 'string',
  period: 'days',
  interval: '1',
  page: 'string',
  limit: 'string',
  sort: 'userId',
  'prefilter[userId]': 'string',
  'prefilter[userObjPrePos]': 'string',
  'prefilter[userObjPos]': 'string',
  'prefilter[userName]': 'string',
  'prefilter[userNameNorm]': 'string',
  'prefilter[userArchived]': 'string',
  'prefilter[currentTagId]': 'string',
  'prefilter[currentTagObj]': 'string',
  'prefilter[currentTagName]': 'string',
  'prefilter[currentTagNameNorm]': 'string',
  'prefilter[projectId]': 'string',
  'prefilter[projectObj]': 'string',
  'prefilter[projectName]': 'string',
  'prefilter[projectNameNorm]': 'string',
  'prefilter[projectIntegrationProvider]': 'string',
  'prefilter[projectIntegrationName]': 'string',
  'prefilter[projectIntegrationNameNorm]': 'string',
  'prefilter[taskId]': 'string',
  'prefilter[taskObj]': 'string',
  'prefilter[taskName]': 'string',
  'prefilter[taskNameNorm]': 'string',
  'prefilter[taskIntegrationProvider]': 'string',
  'prefilter[taskIntegrationName]': 'string',
  'prefilter[taskIntegrationNameNorm]': 'string',
  'prefilter[taskIntegrationLink]': 'string',
  'prefilter[taskIntegrationLastTracked]': 'string',
  'prefilter[date]': 'string',
  'prefilter[timezone]': 'string',
  'prefilter[start]': 'string',
  'prefilter[end]': 'string',
  'prefilter[item]': 'string',
  'filter[ratio]': 'string',
  'filter[ratioTotal]': 'string',
  'filter[count]': 'string',
  'prefilter[quants]': 'string',
  'prefilter[offsets]': 'string',
  'filter[quant0]': 'string',
  'filter[quant1]': 'string',
  'filter[quant2]': 'string',
  'filter[total]': 'string',
  'prefilter[comCat]': 'string',
  'filter[comCatObj]': 'string',
  'prefilter[entity]': 'string',
  'prefilter[name]': 'string',
  'prefilter[score]': 'string',
  'prefilter[tagId]': 'string',
  'prefilter[userCat]': 'string',
  'filter[clicks]': 'string',
  'filter[moves]': 'string',
  'filter[keys]': 'string',
  'filter[totalMins]': 'string',
  'filter[idleSec]': 'string',
  'filter[idleSecRatio]': 'string',
  'filter[idleMins]': 'string',
  'filter[idleMinsRatio]': 'string',
  'filter[totalSec]': 'string',
  'filter[activeSec]': 'string',
  'filter[activeSecRatio]': 'string',
  'filter[standardActiveSec]': 'string',
  'filter[activeBias]': 'string',
  'filter[activeBiasRatio]': 'string',
  'filter[standardActiveSecRatio]': 'string',
  'ratio-page': 'string',
  'ratio-limit': 'string',
  'ratio-sort': 'userId',
  'ratio-filter[total]': 'string',
  'ratio-field': 'string',
  'ratio-id': 'string',
  'date-page': 'string',
  'date-limit': 'string'
}).toString();

const resp = await fetch(
  `https://api2.timedoctor.com/api/1.1/stats/category?${query}`,
  {
    method: 'GET',
    headers: {
      Authorization: 'YOUR_API_KEY_HERE'
    }
  }
);

const data = await resp.text();
console.log(data);

Response samples

Content type
application/json
{
  • "data": [
    ]
}

stats1_1_summary

Get summary stats v1.1.
NOTE: This documentation uses ratio=score and sort=modeTotal as an example. As such, you can get responses that contain score and modeTotal, depending on the parameters you specify when making the request. It is important to understand that score will be replaced by the value you specify for the ratio param and modeTotal will be replaced by the value you specify for sort. You have to specify sort param for this API to work.

Authorizations:
ApiKeyAuth (apiKey)
query Parameters
company
required
string

ID of Company or Workspace, user refers to.

from
string <date-time>

ISO Date of range beginning (inclusive); (to minus 30mins) by default

to
string <date-time>

ISO Date of range ending (exclusive); current by default

user
string

Comma-separated list of User IDs yourself if omitted; all -- to get totals for workspace

tag
string

Comma-separated list of Tag IDs. If specified, users will be filtered by these tags

task
string

If specified, return only statistics on this task

unpaid
integer

If set to 1, includes unpaid time (from unpaid breaks) into report

breaks
string

Specifies breaks to get. This may not be combined with "task" parameter

Enum: "all" "paid" "unpaid"
fields
string

Optional comma-separated list of field names to return.

group-by
string

If specified, will group the results by given field (if such grouping is supported).

resolve
string

Optional comma-separated list of field names to resolve.

ratio
string

Optional comma-separated list of field names to get total ratio of.

level
string

Level of information ("user" by default)

Enum: "company" "user"
timezone
string

Timezone of ranges breaks. Etc/UTC by default

period
string
Default: "days"

Period unit of ranges subdivision. days by default

Enum: "minutes" "hours" "days" "months" "years"
interval
integer <int32> >= 1

Number of period units. 1 by default

page
string

if specified, page ID to get results for; or first page by default

limit
string

if specified, maximum number of items to be returned; or use API-specific hard limit by default

sort
string

which field to sort by, prepend it with "_" for descending sorting

Enum: "userId" "userObjPrePos" "userObjPos" "userName" "userNameNorm" "userArchived" "currentTagId" "currentTagObj" "currentTagName" "currentTagNameNorm" "projectId" "projectObj" "projectName" "projectNameNorm" "projectIntegrationProvider" "projectIntegrationName" "projectIntegrationNameNorm" "taskId" "taskObj" "taskName" "taskNameNorm" "taskIntegrationProvider" "taskIntegrationName" "taskIntegrationNameNorm" "taskIntegrationLink" "taskIntegrationLastTracked" "date" "timezone" "start" "end" "item" "ratio" "ratioTotal" "count" "quants" "offsets" "quant0" "quant1" "quant2" "total" "comCat" "comCatObj" "entity" "name" "score" "tagId" "userCat" "clicks" "moves" "keys" "totalMins" "idleSec" "idleSecRatio" "idleMins" "idleMinsRatio" "totalSec" "activeSec" "activeSecRatio" "standardActiveSec" "activeBias" "activeBiasRatio" "standardActiveSecRatio" "offcomputer" "computer" "mobile" "manual" "mobMan" "paidBreak" "unpaidBreak" "paidLeave" "unpaidLeave" "offcomputerRatio" "computerRatio" "mobileRatio" "manualRatio" "mobManRatio" "paidBreakRatio" "unpaidBreakRatio" "paidLeaveRatio" "unpaidLeaveRatio" "unratedHis" "unprodHis" "neutralHis" "prodHis" "unratedHisRatio" "unprodHisRatio" "neutralHisRatio" "prodHisRatio" "unrated" "unprod" "neutral" "prod" "unratedRatio" "unprodRatio" "neutralRatio" "prodRatio" "clicksRatio" "keysRatio" "movesRatio" "totalSecRatio" "outShift" "outShiftRatio" "project" "task" "shift" "projectRatio" "taskRatio" "shiftRatio" "comCatRatio" "scoreTotal" "scoreTotalRatio" "workRange" "workRangeRatio" "modeTotal" "_userId" "_userObjPrePos" "_userObjPos" "_userName" "_userNameNorm" "_userArchived" "_currentTagId" "_currentTagObj" "_currentTagName" "_currentTagNameNorm" "_projectId" "_projectObj" "_projectName" "_projectNameNorm" "_projectIntegrationProvider" "_projectIntegrationName" "_projectIntegrationNameNorm" "_taskId" "_taskObj" "_taskName" "_taskNameNorm" "_taskIntegrationProvider" "_taskIntegrationName" "_taskIntegrationNameNorm" "_taskIntegrationLink" "_taskIntegrationLastTracked" "_date" "_timezone" "_start" "_end" "_item" "_ratio" "_ratioTotal" "_count" "_quants" "_offsets" "_quant0" "_quant1" "_quant2" "_total" "_comCat" "_comCatObj" "_entity" "_name" "_score" "_tagId" "_userCat" "_clicks" "_moves" "_keys" "_totalMins" "_idleSec" "_idleSecRatio" "_idleMins" "_idleMinsRatio" "_totalSec" "_activeSec" "_activeSecRatio" "_standardActiveSec" "_activeBias" "_activeBiasRatio" "_standardActiveSecRatio" "_offcomputer" "_computer" "_mobile" "_manual" "_mobMan" "_paidBreak" "_unpaidBreak" "_paidLeave" "_unpaidLeave" "_offcomputerRatio" "_computerRatio" "_mobileRatio" "_manualRatio" "_mobManRatio" "_paidBreakRatio" "_unpaidBreakRatio" "_paidLeaveRatio" "_unpaidLeaveRatio" "_unratedHis" "_unprodHis" "_neutralHis" "_prodHis" "_unratedHisRatio" "_unprodHisRatio" "_neutralHisRatio" "_prodHisRatio" "_unrated" "_unprod" "_neutral" "_prod" "_unratedRatio" "_unprodRatio" "_neutralRatio" "_prodRatio" "_clicksRatio" "_keysRatio" "_movesRatio" "_totalSecRatio" "_outShift" "_outShiftRatio" "_project" "_task" "_shift" "_projectRatio" "_taskRatio" "_shiftRatio" "_comCatRatio" "_scoreTotal" "_scoreTotalRatio" "_workRange" "_workRangeRatio" "_modeTotal"
prefilter[userId]
string

"string" -- exact match

prefilter[userObjPrePos]
string

"string" -- exact match

prefilter[userObjPos]
string

"string" -- exact match

prefilter[userName]
string

"string" -- exact match

prefilter[userNameNorm]
string

unknown API-defined value

prefilter[userArchived]
string

"string" -- exact match

prefilter[currentTagId]
string

"string" -- exact match

prefilter[currentTagObj]
string

"string" -- exact match

prefilter[currentTagName]
string

"string" -- exact match

prefilter[currentTagNameNorm]
string

"string" -- exact match

prefilter[projectId]
string

"string" -- exact match

prefilter[projectObj]
string

"string" -- exact match

prefilter[projectName]
string

"string" -- exact match

prefilter[projectNameNorm]
string

"string" -- exact match

prefilter[projectIntegrationProvider]
string

"string" -- exact match

prefilter[projectIntegrationName]
string

"string" -- exact match

prefilter[projectIntegrationNameNorm]
string

"string" -- exact match

prefilter[taskId]
string

"string" -- exact match

prefilter[taskObj]
string

"string" -- exact match

prefilter[taskName]
string

"string" -- exact match

prefilter[taskNameNorm]
string

"string" -- exact match

prefilter[taskIntegrationProvider]
string

"string" -- exact match

prefilter[taskIntegrationName]
string

"string" -- exact match

prefilter[taskIntegrationNameNorm]
string

"string" -- exact match

prefilter[taskIntegrationLink]
string

"string" -- exact match

prefilter[taskIntegrationLastTracked]
string

"ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

prefilter[date]
string

"ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

prefilter[timezone]
string

"string" -- exact match

prefilter[start]
string

"ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

prefilter[end]
string

"ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

prefilter[item]
string

"string" -- exact match

filter[ratio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[ratioTotal]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[count]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

prefilter[quants]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

prefilter[offsets]
string

"ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[quant0]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[quant1]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[quant2]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[total]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[comCat]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[comCatObj]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

prefilter[entity]
string

"string" -- exact match

prefilter[name]
string

unknown API-defined value

prefilter[score]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

prefilter[tagId]
string

"string" -- exact match

prefilter[userCat]
string

"string" -- exact match

filter[clicks]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[moves]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[keys]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[totalMins]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[idleSec]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[idleSecRatio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[idleMins]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[idleMinsRatio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[totalSec]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[activeSec]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[activeSecRatio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[standardActiveSec]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[activeBias]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[activeBiasRatio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[standardActiveSecRatio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[offcomputer]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[computer]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[mobile]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[manual]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[mobMan]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[paidBreak]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[unpaidBreak]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[paidLeave]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[unpaidLeave]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[offcomputerRatio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[computerRatio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[mobileRatio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[manualRatio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[mobManRatio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[paidBreakRatio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[unpaidBreakRatio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[paidLeaveRatio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[unpaidLeaveRatio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[unratedHis]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[unprodHis]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[neutralHis]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[prodHis]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[unratedHisRatio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[unprodHisRatio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[neutralHisRatio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[prodHisRatio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[unrated]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[unprod]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[neutral]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[prod]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[unratedRatio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[unprodRatio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[neutralRatio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[prodRatio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[clicksRatio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[keysRatio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[movesRatio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[totalSecRatio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[outShift]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[outShiftRatio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[project]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[task]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[shift]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[projectRatio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[taskRatio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[shiftRatio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[comCatRatio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[scoreTotal]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[scoreTotalRatio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[workRange]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[workRangeRatio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[modeTotal]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

ratio-page
string

if specified, page ID to get results for; or first page by default

ratio-limit
string

if specified, maximum number of items to be returned; or use API-specific hard limit by default

ratio-sort
string

which field to sort by, prepend it with "_" for descending sorting

Enum: "userId" "userObjPrePos" "userObjPos" "userName" "userNameNorm" "userArchived" "currentTagId" "currentTagObj" "currentTagName" "currentTagNameNorm" "projectId" "projectObj" "projectName" "projectNameNorm" "projectIntegrationProvider" "projectIntegrationName" "projectIntegrationNameNorm" "taskId" "taskObj" "taskName" "taskNameNorm" "taskIntegrationProvider" "taskIntegrationName" "taskIntegrationNameNorm" "taskIntegrationLink" "taskIntegrationLastTracked" "date" "timezone" "start" "end" "item" "ratio" "ratioTotal" "count" "quants" "offsets" "quant0" "quant1" "quant2" "total" "comCat" "comCatObj" "entity" "name" "score" "tagId" "userCat" "clicks" "moves" "keys" "totalMins" "idleSec" "idleSecRatio" "idleMins" "idleMinsRatio" "totalSec" "activeSec" "activeSecRatio" "standardActiveSec" "activeBias" "activeBiasRatio" "standardActiveSecRatio" "offcomputer" "computer" "mobile" "manual" "mobMan" "paidBreak" "unpaidBreak" "paidLeave" "unpaidLeave" "offcomputerRatio" "computerRatio" "mobileRatio" "manualRatio" "mobManRatio" "paidBreakRatio" "unpaidBreakRatio" "paidLeaveRatio" "unpaidLeaveRatio" "unratedHis" "unprodHis" "neutralHis" "prodHis" "unratedHisRatio" "unprodHisRatio" "neutralHisRatio" "prodHisRatio" "unrated" "unprod" "neutral" "prod" "unratedRatio" "unprodRatio" "neutralRatio" "prodRatio" "clicksRatio" "keysRatio" "movesRatio" "totalSecRatio" "outShift" "outShiftRatio" "project" "task" "shift" "projectRatio" "taskRatio" "shiftRatio" "comCatRatio" "scoreTotal" "scoreTotalRatio" "workRange" "workRangeRatio" "modeTotal" "_userId" "_userObjPrePos" "_userObjPos" "_userName" "_userNameNorm" "_userArchived" "_currentTagId" "_currentTagObj" "_currentTagName" "_currentTagNameNorm" "_projectId" "_projectObj" "_projectName" "_projectNameNorm" "_projectIntegrationProvider" "_projectIntegrationName" "_projectIntegrationNameNorm" "_taskId" "_taskObj" "_taskName" "_taskNameNorm" "_taskIntegrationProvider" "_taskIntegrationName" "_taskIntegrationNameNorm" "_taskIntegrationLink" "_taskIntegrationLastTracked" "_date" "_timezone" "_start" "_end" "_item" "_ratio" "_ratioTotal" "_count" "_quants" "_offsets" "_quant0" "_quant1" "_quant2" "_total" "_comCat" "_comCatObj" "_entity" "_name" "_score" "_tagId" "_userCat" "_clicks" "_moves" "_keys" "_totalMins" "_idleSec" "_idleSecRatio" "_idleMins" "_idleMinsRatio" "_totalSec" "_activeSec" "_activeSecRatio" "_standardActiveSec" "_activeBias" "_activeBiasRatio" "_standardActiveSecRatio" "_offcomputer" "_computer" "_mobile" "_manual" "_mobMan" "_paidBreak" "_unpaidBreak" "_paidLeave" "_unpaidLeave" "_offcomputerRatio" "_computerRatio" "_mobileRatio" "_manualRatio" "_mobManRatio" "_paidBreakRatio" "_unpaidBreakRatio" "_paidLeaveRatio" "_unpaidLeaveRatio" "_unratedHis" "_unprodHis" "_neutralHis" "_prodHis" "_unratedHisRatio" "_unprodHisRatio" "_neutralHisRatio" "_prodHisRatio" "_unrated" "_unprod" "_neutral" "_prod" "_unratedRatio" "_unprodRatio" "_neutralRatio" "_prodRatio" "_clicksRatio" "_keysRatio" "_movesRatio" "_totalSecRatio" "_outShift" "_outShiftRatio" "_project" "_task" "_shift" "_projectRatio" "_taskRatio" "_shiftRatio" "_comCatRatio" "_scoreTotal" "_scoreTotalRatio" "_workRange" "_workRangeRatio" "_modeTotal"
ratio-filter[total]
string

Prefilter ratio totals.

ratio-field
string

A field to specify for "ratio" paging. Default is first specified in "ratio" param

ratio-id
string

ID of ratio item for "ratio" paging. Default is top first in ratio array.

date-page
string

if specified, page ID to get results for; or first page by default

date-limit
string

if specified, maximum number of items to be returned; or use API-specific hard limit by default

Responses

Request samples

const fetch = require('node-fetch');

const query = new URLSearchParams({
  company: 'string',
  from: '2019-08-24T14:15:22Z',
  to: '2019-08-24T14:15:22Z',
  user: 'string',
  tag: 'string',
  task: 'string',
  unpaid: '0',
  breaks: 'all',
  fields: 'string',
  'group-by': 'string',
  resolve: 'string',
  ratio: 'string',
  level: 'company',
  timezone: 'string',
  period: 'days',
  interval: '1',
  page: 'string',
  limit: 'string',
  sort: 'userId',
  'prefilter[userId]': 'string',
  'prefilter[userObjPrePos]': 'string',
  'prefilter[userObjPos]': 'string',
  'prefilter[userName]': 'string',
  'prefilter[userNameNorm]': 'string',
  'prefilter[userArchived]': 'string',
  'prefilter[currentTagId]': 'string',
  'prefilter[currentTagObj]': 'string',
  'prefilter[currentTagName]': 'string',
  'prefilter[currentTagNameNorm]': 'string',
  'prefilter[projectId]': 'string',
  'prefilter[projectObj]': 'string',
  'prefilter[projectName]': 'string',
  'prefilter[projectNameNorm]': 'string',
  'prefilter[projectIntegrationProvider]': 'string',
  'prefilter[projectIntegrationName]': 'string',
  'prefilter[projectIntegrationNameNorm]': 'string',
  'prefilter[taskId]': 'string',
  'prefilter[taskObj]': 'string',
  'prefilter[taskName]': 'string',
  'prefilter[taskNameNorm]': 'string',
  'prefilter[taskIntegrationProvider]': 'string',
  'prefilter[taskIntegrationName]': 'string',
  'prefilter[taskIntegrationNameNorm]': 'string',
  'prefilter[taskIntegrationLink]': 'string',
  'prefilter[taskIntegrationLastTracked]': 'string',
  'prefilter[date]': 'string',
  'prefilter[timezone]': 'string',
  'prefilter[start]': 'string',
  'prefilter[end]': 'string',
  'prefilter[item]': 'string',
  'filter[ratio]': 'string',
  'filter[ratioTotal]': 'string',
  'filter[count]': 'string',
  'prefilter[quants]': 'string',
  'prefilter[offsets]': 'string',
  'filter[quant0]': 'string',
  'filter[quant1]': 'string',
  'filter[quant2]': 'string',
  'filter[total]': 'string',
  'filter[comCat]': 'string',
  'filter[comCatObj]': 'string',
  'prefilter[entity]': 'string',
  'prefilter[name]': 'string',
  'prefilter[score]': 'string',
  'prefilter[tagId]': 'string',
  'prefilter[userCat]': 'string',
  'filter[clicks]': 'string',
  'filter[moves]': 'string',
  'filter[keys]': 'string',
  'filter[totalMins]': 'string',
  'filter[idleSec]': 'string',
  'filter[idleSecRatio]': 'string',
  'filter[idleMins]': 'string',
  'filter[idleMinsRatio]': 'string',
  'filter[totalSec]': 'string',
  'filter[activeSec]': 'string',
  'filter[activeSecRatio]': 'string',
  'filter[standardActiveSec]': 'string',
  'filter[activeBias]': 'string',
  'filter[activeBiasRatio]': 'string',
  'filter[standardActiveSecRatio]': 'string',
  'filter[offcomputer]': 'string',
  'filter[computer]': 'string',
  'filter[mobile]': 'string',
  'filter[manual]': 'string',
  'filter[mobMan]': 'string',
  'filter[paidBreak]': 'string',
  'filter[unpaidBreak]': 'string',
  'filter[paidLeave]': 'string',
  'filter[unpaidLeave]': 'string',
  'filter[offcomputerRatio]': 'string',
  'filter[computerRatio]': 'string',
  'filter[mobileRatio]': 'string',
  'filter[manualRatio]': 'string',
  'filter[mobManRatio]': 'string',
  'filter[paidBreakRatio]': 'string',
  'filter[unpaidBreakRatio]': 'string',
  'filter[paidLeaveRatio]': 'string',
  'filter[unpaidLeaveRatio]': 'string',
  'filter[unratedHis]': 'string',
  'filter[unprodHis]': 'string',
  'filter[neutralHis]': 'string',
  'filter[prodHis]': 'string',
  'filter[unratedHisRatio]': 'string',
  'filter[unprodHisRatio]': 'string',
  'filter[neutralHisRatio]': 'string',
  'filter[prodHisRatio]': 'string',
  'filter[unrated]': 'string',
  'filter[unprod]': 'string',
  'filter[neutral]': 'string',
  'filter[prod]': 'string',
  'filter[unratedRatio]': 'string',
  'filter[unprodRatio]': 'string',
  'filter[neutralRatio]': 'string',
  'filter[prodRatio]': 'string',
  'filter[clicksRatio]': 'string',
  'filter[keysRatio]': 'string',
  'filter[movesRatio]': 'string',
  'filter[totalSecRatio]': 'string',
  'filter[outShift]': 'string',
  'filter[outShiftRatio]': 'string',
  'filter[project]': 'string',
  'filter[task]': 'string',
  'filter[shift]': 'string',
  'filter[projectRatio]': 'string',
  'filter[taskRatio]': 'string',
  'filter[shiftRatio]': 'string',
  'filter[comCatRatio]': 'string',
  'filter[scoreTotal]': 'string',
  'filter[scoreTotalRatio]': 'string',
  'filter[workRange]': 'string',
  'filter[workRangeRatio]': 'string',
  'filter[modeTotal]': 'string',
  'ratio-page': 'string',
  'ratio-limit': 'string',
  'ratio-sort': 'userId',
  'ratio-filter[total]': 'string',
  'ratio-field': 'string',
  'ratio-id': 'string',
  'date-page': 'string',
  'date-limit': 'string'
}).toString();

const resp = await fetch(
  `https://api2.timedoctor.com/api/1.1/stats/summary?${query}`,
  {
    method: 'GET',
    headers: {
      Authorization: 'YOUR_API_KEY_HERE'
    }
  }
);

const data = await resp.text();
console.log(data);

Response samples

Content type
application/json
{
  • "data": [
    ]
}

stats1_1_work-life

Get work-life stats v1.1.
NOTE: This documentation uses ratio=score and sort=modeTotal as an example. As such, you can get responses that contain score and modeTotal, depending on the parameters you specify when making the request. It is important to understand that score will be replaced by the value you specify for the ratio param and modeTotal will be replaced by the value you specify for sort.

Authorizations:
ApiKeyAuth (apiKey)
query Parameters
company
required
string

ID of Company or Workspace, user refers to.

from
string <date-time>

ISO Date of range beginning (inclusive); (to minus 30mins) by default

to
string <date-time>

ISO Date of range ending (exclusive); current by default

user
string

Comma-separated list of User IDs yourself if omitted; all -- to get totals for workspace

tag
string

Comma-separated list of Tag IDs. If specified, users will be filtered by these tags

task
string

If specified, return only statistics on this task

unpaid
integer

If set to 1, includes unpaid time (from unpaid breaks) into report

breaks
string

Specifies breaks to get. This may not be combined with "task" parameter

Enum: "all" "paid" "unpaid"
fields
string

Optional comma-separated list of field names to return.

group-by
string

If specified, will group the results by given field (if such grouping is supported).

resolve
string

Optional comma-separated list of field names to resolve.

ratio
string

Optional comma-separated list of field names to get total ratio of.

level
string

Level of information ("user" by default)

Enum: "company" "user"
timezone
string

Timezone of ranges breaks. Etc/UTC by default

period
string
Default: "days"

Period unit of ranges subdivision. days by default

Enum: "minutes" "hours" "days" "months" "years"
interval
integer <int32> >= 1

Number of period units. 1 by default

page
string

if specified, page ID to get results for; or first page by default

limit
string

if specified, maximum number of items to be returned; or use API-specific hard limit by default

sort
string

which field to sort by, prepend it with "_" for descending sorting

Enum: "total" "totalHours" "lastHour" "outShift" "day" "tooManyHours" "lateHours" "outOfShiftWork" "weekendWork" "totalIssues" "dailyIssues" "userId" "userObjPrePos" "userObjPos" "userName" "userNameNorm" "userArchived" "currentTagId" "currentTagObj" "currentTagName" "currentTagNameNorm" "projectId" "projectObj" "projectName" "projectNameNorm" "projectIntegrationProvider" "projectIntegrationName" "projectIntegrationNameNorm" "taskId" "taskObj" "taskName" "taskNameNorm" "taskIntegrationProvider" "taskIntegrationName" "taskIntegrationNameNorm" "taskIntegrationLink" "taskIntegrationLastTracked" "date" "timezone" "start" "end" "item" "ratio" "ratioTotal" "count" "quants" "offsets" "quant0" "quant1" "quant2" "_total" "_totalHours" "_lastHour" "_outShift" "_day" "_tooManyHours" "_lateHours" "_outOfShiftWork" "_weekendWork" "_totalIssues" "_dailyIssues" "_userId" "_userObjPrePos" "_userObjPos" "_userName" "_userNameNorm" "_userArchived" "_currentTagId" "_currentTagObj" "_currentTagName" "_currentTagNameNorm" "_projectId" "_projectObj" "_projectName" "_projectNameNorm" "_projectIntegrationProvider" "_projectIntegrationName" "_projectIntegrationNameNorm" "_taskId" "_taskObj" "_taskName" "_taskNameNorm" "_taskIntegrationProvider" "_taskIntegrationName" "_taskIntegrationNameNorm" "_taskIntegrationLink" "_taskIntegrationLastTracked" "_date" "_timezone" "_start" "_end" "_item" "_ratio" "_ratioTotal" "_count" "_quants" "_offsets" "_quant0" "_quant1" "_quant2"
filter[total]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[totalHours]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

prefilter[lastHour]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[outShift]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

prefilter[day]
string

"string" -- exact match

filter[tooManyHours]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[lateHours]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[outOfShiftWork]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[weekendWork]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[totalIssues]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[dailyIssues]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

prefilter[userId]
string

"string" -- exact match

prefilter[userObjPrePos]
string

"string" -- exact match

prefilter[userObjPos]
string

"string" -- exact match

prefilter[userName]
string

"string" -- exact match

prefilter[userNameNorm]
string

unknown API-defined value

prefilter[userArchived]
string

"string" -- exact match

prefilter[currentTagId]
string

"string" -- exact match

prefilter[currentTagObj]
string

"string" -- exact match

prefilter[currentTagName]
string

"string" -- exact match

prefilter[currentTagNameNorm]
string

"string" -- exact match

prefilter[projectId]
string

"string" -- exact match

prefilter[projectObj]
string

"string" -- exact match

prefilter[projectName]
string

"string" -- exact match

prefilter[projectNameNorm]
string

"string" -- exact match

prefilter[projectIntegrationProvider]
string

"string" -- exact match

prefilter[projectIntegrationName]
string

"string" -- exact match

prefilter[projectIntegrationNameNorm]
string

"string" -- exact match

prefilter[taskId]
string

"string" -- exact match

prefilter[taskObj]
string

"string" -- exact match

prefilter[taskName]
string

"string" -- exact match

prefilter[taskNameNorm]
string

"string" -- exact match

prefilter[taskIntegrationProvider]
string

"string" -- exact match

prefilter[taskIntegrationName]
string

"string" -- exact match

prefilter[taskIntegrationNameNorm]
string

"string" -- exact match

prefilter[taskIntegrationLink]
string

"string" -- exact match

prefilter[taskIntegrationLastTracked]
string

"ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

prefilter[date]
string

"ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

prefilter[timezone]
string

"string" -- exact match

prefilter[start]
string

"ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

prefilter[end]
string

"ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

prefilter[item]
string

"string" -- exact match

filter[ratio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[ratioTotal]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[count]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

prefilter[quants]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

prefilter[offsets]
string

"ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[quant0]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[quant1]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[quant2]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

ratio-page
string

if specified, page ID to get results for; or first page by default

ratio-limit
string

if specified, maximum number of items to be returned; or use API-specific hard limit by default

ratio-sort
string

which field to sort by, prepend it with "_" for descending sorting

Enum: "total" "totalHours" "lastHour" "outShift" "day" "tooManyHours" "lateHours" "outOfShiftWork" "weekendWork" "totalIssues" "dailyIssues" "userId" "userObjPrePos" "userObjPos" "userName" "userNameNorm" "userArchived" "currentTagId" "currentTagObj" "currentTagName" "currentTagNameNorm" "projectId" "projectObj" "projectName" "projectNameNorm" "projectIntegrationProvider" "projectIntegrationName" "projectIntegrationNameNorm" "taskId" "taskObj" "taskName" "taskNameNorm" "taskIntegrationProvider" "taskIntegrationName" "taskIntegrationNameNorm" "taskIntegrationLink" "taskIntegrationLastTracked" "date" "timezone" "start" "end" "item" "ratio" "ratioTotal" "count" "quants" "offsets" "quant0" "quant1" "quant2" "_total" "_totalHours" "_lastHour" "_outShift" "_day" "_tooManyHours" "_lateHours" "_outOfShiftWork" "_weekendWork" "_totalIssues" "_dailyIssues" "_userId" "_userObjPrePos" "_userObjPos" "_userName" "_userNameNorm" "_userArchived" "_currentTagId" "_currentTagObj" "_currentTagName" "_currentTagNameNorm" "_projectId" "_projectObj" "_projectName" "_projectNameNorm" "_projectIntegrationProvider" "_projectIntegrationName" "_projectIntegrationNameNorm" "_taskId" "_taskObj" "_taskName" "_taskNameNorm" "_taskIntegrationProvider" "_taskIntegrationName" "_taskIntegrationNameNorm" "_taskIntegrationLink" "_taskIntegrationLastTracked" "_date" "_timezone" "_start" "_end" "_item" "_ratio" "_ratioTotal" "_count" "_quants" "_offsets" "_quant0" "_quant1" "_quant2"
ratio-filter[total]
string

Prefilter ratio totals.

ratio-field
string

A field to specify for "ratio" paging. Default is first specified in "ratio" param

ratio-id
string

ID of ratio item for "ratio" paging. Default is top first in ratio array.

date-page
string

if specified, page ID to get results for; or first page by default

date-limit
string

if specified, maximum number of items to be returned; or use API-specific hard limit by default

Responses

Request samples

const fetch = require('node-fetch');

const query = new URLSearchParams({
  company: 'string',
  from: '2019-08-24T14:15:22Z',
  to: '2019-08-24T14:15:22Z',
  user: 'string',
  tag: 'string',
  task: 'string',
  unpaid: '0',
  breaks: 'all',
  fields: 'string',
  'group-by': 'string',
  resolve: 'string',
  ratio: 'string',
  level: 'company',
  timezone: 'string',
  period: 'days',
  interval: '1',
  page: 'string',
  limit: 'string',
  sort: 'total',
  'filter[total]': 'string',
  'filter[totalHours]': 'string',
  'prefilter[lastHour]': 'string',
  'filter[outShift]': 'string',
  'prefilter[day]': 'string',
  'filter[tooManyHours]': 'string',
  'filter[lateHours]': 'string',
  'filter[outOfShiftWork]': 'string',
  'filter[weekendWork]': 'string',
  'filter[totalIssues]': 'string',
  'filter[dailyIssues]': 'string',
  'prefilter[userId]': 'string',
  'prefilter[userObjPrePos]': 'string',
  'prefilter[userObjPos]': 'string',
  'prefilter[userName]': 'string',
  'prefilter[userNameNorm]': 'string',
  'prefilter[userArchived]': 'string',
  'prefilter[currentTagId]': 'string',
  'prefilter[currentTagObj]': 'string',
  'prefilter[currentTagName]': 'string',
  'prefilter[currentTagNameNorm]': 'string',
  'prefilter[projectId]': 'string',
  'prefilter[projectObj]': 'string',
  'prefilter[projectName]': 'string',
  'prefilter[projectNameNorm]': 'string',
  'prefilter[projectIntegrationProvider]': 'string',
  'prefilter[projectIntegrationName]': 'string',
  'prefilter[projectIntegrationNameNorm]': 'string',
  'prefilter[taskId]': 'string',
  'prefilter[taskObj]': 'string',
  'prefilter[taskName]': 'string',
  'prefilter[taskNameNorm]': 'string',
  'prefilter[taskIntegrationProvider]': 'string',
  'prefilter[taskIntegrationName]': 'string',
  'prefilter[taskIntegrationNameNorm]': 'string',
  'prefilter[taskIntegrationLink]': 'string',
  'prefilter[taskIntegrationLastTracked]': 'string',
  'prefilter[date]': 'string',
  'prefilter[timezone]': 'string',
  'prefilter[start]': 'string',
  'prefilter[end]': 'string',
  'prefilter[item]': 'string',
  'filter[ratio]': 'string',
  'filter[ratioTotal]': 'string',
  'filter[count]': 'string',
  'prefilter[quants]': 'string',
  'prefilter[offsets]': 'string',
  'filter[quant0]': 'string',
  'filter[quant1]': 'string',
  'filter[quant2]': 'string',
  'ratio-page': 'string',
  'ratio-limit': 'string',
  'ratio-sort': 'total',
  'ratio-filter[total]': 'string',
  'ratio-field': 'string',
  'ratio-id': 'string',
  'date-page': 'string',
  'date-limit': 'string'
}).toString();

const resp = await fetch(
  `https://api2.timedoctor.com/api/1.1/stats/work-life?${query}`,
  {
    method: 'GET',
    headers: {
      Authorization: 'YOUR_API_KEY_HERE'
    }
  }
);

const data = await resp.text();
console.log(data);

Response samples

Content type
application/json
{
  • "data": { }
}

stats1_1_shift

Get shift stats v1.1.
NOTE: This documentation uses ratio=score and sort=modeTotal as an example. As such, you can get responses that contain score and modeTotal, depending on the parameters you specify when making the request. It is important to understand that score will be replaced by the value you specify for the ratio param and modeTotal will be replaced by the value you specify for sort.

Authorizations:
ApiKeyAuth (apiKey)
query Parameters
company
required
string

ID of Company or Workspace, user refers to.

from
string <date-time>

ISO Date of range beginning (inclusive); (to minus 30mins) by default

to
string <date-time>

ISO Date of range ending (exclusive); current by default

user
string

Comma-separated list of User IDs yourself if omitted; all -- to get totals for workspace

tag
string

Comma-separated list of Tag IDs. If specified, users will be filtered by these tags

task
string

If specified, return only statistics on this task

unpaid
integer

If set to 1, includes unpaid time (from unpaid breaks) into report

breaks
string

Specifies breaks to get. This may not be combined with "task" parameter

Enum: "all" "paid" "unpaid"
fields
string

Optional comma-separated list of field names to return.

group-by
string

If specified, will group the results by given field (if such grouping is supported).

resolve
string

Optional comma-separated list of field names to resolve.

ratio
string

Optional comma-separated list of field names to get total ratio of.

level
string

Level of information ("user" by default)

Enum: "company" "user"
timezone
string

Timezone of ranges breaks. Etc/UTC by default

period
string
Default: "days"

Period unit of ranges subdivision. days by default

Enum: "minutes" "hours" "days" "months" "years"
interval
integer <int32> >= 1

Number of period units. 1 by default

page
string

if specified, page ID to get results for; or first page by default

limit
string

if specified, maximum number of items to be returned; or use API-specific hard limit by default

sort
string

which field to sort by, prepend it with "_" for descending sorting

Enum: "userId" "userObjPrePos" "userObjPos" "userName" "userNameNorm" "userArchived" "currentTagId" "currentTagObj" "currentTagName" "currentTagNameNorm" "projectId" "projectObj" "projectName" "projectNameNorm" "projectIntegrationProvider" "projectIntegrationName" "projectIntegrationNameNorm" "taskId" "taskObj" "taskName" "taskNameNorm" "taskIntegrationProvider" "taskIntegrationName" "taskIntegrationNameNorm" "taskIntegrationLink" "taskIntegrationLastTracked" "date" "timezone" "start" "end" "item" "ratio" "ratioTotal" "count" "quants" "offsets" "quant0" "quant1" "quant2" "total" "shiftId" "shiftObj" "shiftStart" "shiftEnd" "minHours" "_userId" "_userObjPrePos" "_userObjPos" "_userName" "_userNameNorm" "_userArchived" "_currentTagId" "_currentTagObj" "_currentTagName" "_currentTagNameNorm" "_projectId" "_projectObj" "_projectName" "_projectNameNorm" "_projectIntegrationProvider" "_projectIntegrationName" "_projectIntegrationNameNorm" "_taskId" "_taskObj" "_taskName" "_taskNameNorm" "_taskIntegrationProvider" "_taskIntegrationName" "_taskIntegrationNameNorm" "_taskIntegrationLink" "_taskIntegrationLastTracked" "_date" "_timezone" "_start" "_end" "_item" "_ratio" "_ratioTotal" "_count" "_quants" "_offsets" "_quant0" "_quant1" "_quant2" "_total" "_shiftId" "_shiftObj" "_shiftStart" "_shiftEnd" "_minHours"
prefilter[userId]
string

"string" -- exact match

prefilter[userObjPrePos]
string

"string" -- exact match

prefilter[userObjPos]
string

"string" -- exact match

prefilter[userName]
string

"string" -- exact match

prefilter[userNameNorm]
string

unknown API-defined value

prefilter[userArchived]
string

"string" -- exact match

prefilter[currentTagId]
string

"string" -- exact match

prefilter[currentTagObj]
string

"string" -- exact match

prefilter[currentTagName]
string

"string" -- exact match

prefilter[currentTagNameNorm]
string

"string" -- exact match

prefilter[projectId]
string

"string" -- exact match

prefilter[projectObj]
string

"string" -- exact match

prefilter[projectName]
string

"string" -- exact match

prefilter[projectNameNorm]
string

"string" -- exact match

prefilter[projectIntegrationProvider]
string

"string" -- exact match

prefilter[projectIntegrationName]
string

"string" -- exact match

prefilter[projectIntegrationNameNorm]
string

"string" -- exact match

prefilter[taskId]
string

"string" -- exact match

prefilter[taskObj]
string

"string" -- exact match

prefilter[taskName]
string

"string" -- exact match

prefilter[taskNameNorm]
string

"string" -- exact match

prefilter[taskIntegrationProvider]
string

"string" -- exact match

prefilter[taskIntegrationName]
string

"string" -- exact match

prefilter[taskIntegrationNameNorm]
string

"string" -- exact match

prefilter[taskIntegrationLink]
string

"string" -- exact match

prefilter[taskIntegrationLastTracked]
string

"ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

prefilter[date]
string

"ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

prefilter[timezone]
string

"string" -- exact match

prefilter[start]
string

"ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

prefilter[end]
string

"ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

prefilter[item]
string

"string" -- exact match

filter[ratio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[ratioTotal]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[count]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

prefilter[quants]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

prefilter[offsets]
string

"ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[quant0]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[quant1]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[quant2]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[total]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

prefilter[shiftId]
string

"string" -- exact match

filter[shiftObj]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

prefilter[shiftStart]
string

"ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

prefilter[shiftEnd]
string

"ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[minHours]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

ratio-page
string

if specified, page ID to get results for; or first page by default

ratio-limit
string

if specified, maximum number of items to be returned; or use API-specific hard limit by default

ratio-sort
string

which field to sort by, prepend it with "_" for descending sorting

Enum: "userId" "userObjPrePos" "userObjPos" "userName" "userNameNorm" "userArchived" "currentTagId" "currentTagObj" "currentTagName" "currentTagNameNorm" "projectId" "projectObj" "projectName" "projectNameNorm" "projectIntegrationProvider" "projectIntegrationName" "projectIntegrationNameNorm" "taskId" "taskObj" "taskName" "taskNameNorm" "taskIntegrationProvider" "taskIntegrationName" "taskIntegrationNameNorm" "taskIntegrationLink" "taskIntegrationLastTracked" "date" "timezone" "start" "end" "item" "ratio" "ratioTotal" "count" "quants" "offsets" "quant0" "quant1" "quant2" "total" "shiftId" "shiftObj" "shiftStart" "shiftEnd" "minHours" "_userId" "_userObjPrePos" "_userObjPos" "_userName" "_userNameNorm" "_userArchived" "_currentTagId" "_currentTagObj" "_currentTagName" "_currentTagNameNorm" "_projectId" "_projectObj" "_projectName" "_projectNameNorm" "_projectIntegrationProvider" "_projectIntegrationName" "_projectIntegrationNameNorm" "_taskId" "_taskObj" "_taskName" "_taskNameNorm" "_taskIntegrationProvider" "_taskIntegrationName" "_taskIntegrationNameNorm" "_taskIntegrationLink" "_taskIntegrationLastTracked" "_date" "_timezone" "_start" "_end" "_item" "_ratio" "_ratioTotal" "_count" "_quants" "_offsets" "_quant0" "_quant1" "_quant2" "_total" "_shiftId" "_shiftObj" "_shiftStart" "_shiftEnd" "_minHours"
ratio-filter[total]
string

Prefilter ratio totals.

ratio-field
string

A field to specify for "ratio" paging. Default is first specified in "ratio" param

ratio-id
string

ID of ratio item for "ratio" paging. Default is top first in ratio array.

date-page
string

if specified, page ID to get results for; or first page by default

date-limit
string

if specified, maximum number of items to be returned; or use API-specific hard limit by default

Responses

Request samples

const fetch = require('node-fetch');

const query = new URLSearchParams({
  company: 'string',
  from: '2019-08-24T14:15:22Z',
  to: '2019-08-24T14:15:22Z',
  user: 'string',
  tag: 'string',
  task: 'string',
  unpaid: '0',
  breaks: 'all',
  fields: 'string',
  'group-by': 'string',
  resolve: 'string',
  ratio: 'string',
  level: 'company',
  timezone: 'string',
  period: 'days',
  interval: '1',
  page: 'string',
  limit: 'string',
  sort: 'userId',
  'prefilter[userId]': 'string',
  'prefilter[userObjPrePos]': 'string',
  'prefilter[userObjPos]': 'string',
  'prefilter[userName]': 'string',
  'prefilter[userNameNorm]': 'string',
  'prefilter[userArchived]': 'string',
  'prefilter[currentTagId]': 'string',
  'prefilter[currentTagObj]': 'string',
  'prefilter[currentTagName]': 'string',
  'prefilter[currentTagNameNorm]': 'string',
  'prefilter[projectId]': 'string',
  'prefilter[projectObj]': 'string',
  'prefilter[projectName]': 'string',
  'prefilter[projectNameNorm]': 'string',
  'prefilter[projectIntegrationProvider]': 'string',
  'prefilter[projectIntegrationName]': 'string',
  'prefilter[projectIntegrationNameNorm]': 'string',
  'prefilter[taskId]': 'string',
  'prefilter[taskObj]': 'string',
  'prefilter[taskName]': 'string',
  'prefilter[taskNameNorm]': 'string',
  'prefilter[taskIntegrationProvider]': 'string',
  'prefilter[taskIntegrationName]': 'string',
  'prefilter[taskIntegrationNameNorm]': 'string',
  'prefilter[taskIntegrationLink]': 'string',
  'prefilter[taskIntegrationLastTracked]': 'string',
  'prefilter[date]': 'string',
  'prefilter[timezone]': 'string',
  'prefilter[start]': 'string',
  'prefilter[end]': 'string',
  'prefilter[item]': 'string',
  'filter[ratio]': 'string',
  'filter[ratioTotal]': 'string',
  'filter[count]': 'string',
  'prefilter[quants]': 'string',
  'prefilter[offsets]': 'string',
  'filter[quant0]': 'string',
  'filter[quant1]': 'string',
  'filter[quant2]': 'string',
  'filter[total]': 'string',
  'prefilter[shiftId]': 'string',
  'filter[shiftObj]': 'string',
  'prefilter[shiftStart]': 'string',
  'prefilter[shiftEnd]': 'string',
  'filter[minHours]': 'string',
  'ratio-page': 'string',
  'ratio-limit': 'string',
  'ratio-sort': 'userId',
  'ratio-filter[total]': 'string',
  'ratio-field': 'string',
  'ratio-id': 'string',
  'date-page': 'string',
  'date-limit': 'string'
}).toString();

const resp = await fetch(
  `https://api2.timedoctor.com/api/1.1/stats/shift?${query}`,
  {
    method: 'GET',
    headers: {
      Authorization: 'YOUR_API_KEY_HERE'
    }
  }
);

const data = await resp.text();
console.log(data);

Response samples

Content type
application/json
{
  • "data": { }
}

stats1_1_outliers

Get outliers stats v1.1.
NOTE: This documentation uses ratio=score and sort=modeTotal as an example. As such, you can get responses that contain score and modeTotal, depending on the parameters you specify when making the request. It is important to understand that score will be replaced by the value you specify for the ratio param and modeTotal will be replaced by the value you specify for sort.

Authorizations:
ApiKeyAuth (apiKey)
query Parameters
company
required
string

ID of Company or Workspace, user refers to.

from
string <date-time>

ISO Date of range beginning (inclusive); (to minus 30mins) by default

to
string <date-time>

ISO Date of range ending (exclusive); current by default

user
string

Comma-separated list of User IDs yourself if omitted; all -- to get totals for workspace

tag
string

Comma-separated list of Tag IDs. If specified, users will be filtered by these tags

task
string

If specified, return only statistics on this task

unpaid
integer

If set to 1, includes unpaid time (from unpaid breaks) into report

breaks
string

Specifies breaks to get. This may not be combined with "task" parameter

Enum: "all" "paid" "unpaid"
fields
string

Optional comma-separated list of field names to return.

group-by
string

If specified, will group the results by given field (if such grouping is supported).

resolve
string

Optional comma-separated list of field names to resolve.

ratio
string

Optional comma-separated list of field names to get total ratio of.

level
string

Level of information ("user" by default)

Enum: "company" "user"
timezone
string

Timezone of ranges breaks. Etc/UTC by default

period
string
Default: "days"

Period unit of ranges subdivision. days by default

Enum: "minutes" "hours" "days" "months" "years"
interval
integer <int32> >= 1

Number of period units. 1 by default

Responses

Request samples

const fetch = require('node-fetch');

const query = new URLSearchParams({
  company: 'string',
  from: '2019-08-24T14:15:22Z',
  to: '2019-08-24T14:15:22Z',
  user: 'string',
  tag: 'string',
  task: 'string',
  unpaid: '0',
  breaks: 'all',
  fields: 'string',
  'group-by': 'string',
  resolve: 'string',
  ratio: 'string',
  level: 'company',
  timezone: 'string',
  period: 'days',
  interval: '1'
}).toString();

const resp = await fetch(
  `https://api2.timedoctor.com/api/1.1/stats/outliers?${query}`,
  {
    method: 'GET',
    headers: {
      Authorization: 'YOUR_API_KEY_HERE'
    }
  }
);

const data = await resp.text();
console.log(data);

Response samples

Content type
application/json
{
  • "data": { }
}

stats1_1_timesheettotal

Get total stats/timesheet v1.1.
NOTE: This documentation uses ratio=score and sort=modeTotal as an example. As such, you can get responses that contain score and modeTotal, depending on the parameters you specify when making the request. It is important to understand that score will be replaced by the value you specify for the ratio param and modeTotal will be replaced by the value you specify for sort.
For work range use 1.1/stats/total?fields=start,end,workRange

Authorizations:
ApiKeyAuth (apiKey)
query Parameters
company
required
string

ID of Company or Workspace, user refers to.

from
string <date-time>

ISO Date of range beginning (inclusive); (to minus 30mins) by default

to
string <date-time>

ISO Date of range ending (exclusive); current by default

user
string

Comma-separated list of User IDs yourself if omitted; all -- to get totals for workspace

tag
string

Comma-separated list of Tag IDs. If specified, users will be filtered by these tags

task
string

If specified, return only statistics on this task

unpaid
integer

If set to 1, includes unpaid time (from unpaid breaks) into report

breaks
string

Specifies breaks to get. This may not be combined with "task" parameter

Enum: "all" "paid" "unpaid"
fields
string

Optional comma-separated list of field names to return.

group-by
string

If specified, will group the results by given field (if such grouping is supported).

resolve
string

Optional comma-separated list of field names to resolve.

ratio
string

Optional comma-separated list of field names to get total ratio of.

level
string

Level of information ("user" by default)

Enum: "company" "user"
timezone
string

Timezone of ranges breaks. Etc/UTC by default

period
string
Default: "days"

Period unit of ranges subdivision. days by default

Enum: "minutes" "hours" "days" "months" "years"
interval
integer <int32> >= 1

Number of period units. 1 by default

page
string

if specified, page ID to get results for; or first page by default

limit
string

if specified, maximum number of items to be returned; or use API-specific hard limit by default

sort
string

which field to sort by, prepend it with "_" for descending sorting

Enum: "offcomputer" "computer" "mobile" "manual" "mobMan" "paidBreak" "unpaidBreak" "paidLeave" "unpaidLeave" "offcomputerRatio" "computerRatio" "mobileRatio" "manualRatio" "mobManRatio" "paidBreakRatio" "unpaidBreakRatio" "paidLeaveRatio" "unpaidLeaveRatio" "unratedHis" "unprodHis" "neutralHis" "prodHis" "unratedHisRatio" "unprodHisRatio" "neutralHisRatio" "prodHisRatio" "unrated" "unprod" "neutral" "prod" "unratedRatio" "unprodRatio" "neutralRatio" "prodRatio" "standardActiveSec" "activeBias" "activeBiasRatio" "standardActiveSecRatio" "clicks" "idleSec" "keys" "moves" "totalSec" "activeSec" "clicksRatio" "idleSecRatio" "keysRatio" "movesRatio" "totalSecRatio" "activeSecRatio" "totalMins" "idleMins" "idleMinsRatio" "outShift" "outShiftRatio" "project" "task" "shift" "projectRatio" "taskRatio" "shiftRatio" "comCat" "comCatRatio" "scoreTotal" "scoreTotalRatio" "workRange" "workRangeRatio" "modeTotal" "total" "userId" "userObjPrePos" "userObjPos" "userName" "userNameNorm" "userArchived" "currentTagId" "currentTagObj" "currentTagName" "currentTagNameNorm" "projectId" "projectObj" "projectName" "projectNameNorm" "projectIntegrationProvider" "projectIntegrationName" "projectIntegrationNameNorm" "taskId" "taskObj" "taskName" "taskNameNorm" "taskIntegrationProvider" "taskIntegrationName" "taskIntegrationNameNorm" "taskIntegrationLink" "taskIntegrationLastTracked" "date" "timezone" "start" "end" "item" "ratio" "ratioTotal" "count" "quants" "offsets" "quant0" "quant1" "quant2" "_offcomputer" "_computer" "_mobile" "_manual" "_mobMan" "_paidBreak" "_unpaidBreak" "_paidLeave" "_unpaidLeave" "_offcomputerRatio" "_computerRatio" "_mobileRatio" "_manualRatio" "_mobManRatio" "_paidBreakRatio" "_unpaidBreakRatio" "_paidLeaveRatio" "_unpaidLeaveRatio" "_unratedHis" "_unprodHis" "_neutralHis" "_prodHis" "_unratedHisRatio" "_unprodHisRatio" "_neutralHisRatio" "_prodHisRatio" "_unrated" "_unprod" "_neutral" "_prod" "_unratedRatio" "_unprodRatio" "_neutralRatio" "_prodRatio" "_standardActiveSec" "_activeBias" "_activeBiasRatio" "_standardActiveSecRatio" "_clicks" "_idleSec" "_keys" "_moves" "_totalSec" "_activeSec" "_clicksRatio" "_idleSecRatio" "_keysRatio" "_movesRatio" "_totalSecRatio" "_activeSecRatio" "_totalMins" "_idleMins" "_idleMinsRatio" "_outShift" "_outShiftRatio" "_project" "_task" "_shift" "_projectRatio" "_taskRatio" "_shiftRatio" "_comCat" "_comCatRatio" "_scoreTotal" "_scoreTotalRatio" "_workRange" "_workRangeRatio" "_modeTotal" "_total" "_userId" "_userObjPrePos" "_userObjPos" "_userName" "_userNameNorm" "_userArchived" "_currentTagId" "_currentTagObj" "_currentTagName" "_currentTagNameNorm" "_projectId" "_projectObj" "_projectName" "_projectNameNorm" "_projectIntegrationProvider" "_projectIntegrationName" "_projectIntegrationNameNorm" "_taskId" "_taskObj" "_taskName" "_taskNameNorm" "_taskIntegrationProvider" "_taskIntegrationName" "_taskIntegrationNameNorm" "_taskIntegrationLink" "_taskIntegrationLastTracked" "_date" "_timezone" "_start" "_end" "_item" "_ratio" "_ratioTotal" "_count" "_quants" "_offsets" "_quant0" "_quant1" "_quant2"
filter[offcomputer]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[computer]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[mobile]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[manual]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[mobMan]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[paidBreak]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[unpaidBreak]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[paidLeave]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[unpaidLeave]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[offcomputerRatio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[computerRatio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[mobileRatio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[manualRatio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[mobManRatio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[paidBreakRatio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[unpaidBreakRatio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[paidLeaveRatio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[unpaidLeaveRatio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[unratedHis]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[unprodHis]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[neutralHis]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[prodHis]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[unratedHisRatio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[unprodHisRatio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[neutralHisRatio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[prodHisRatio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[unrated]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[unprod]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[neutral]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[prod]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[unratedRatio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[unprodRatio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[neutralRatio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[prodRatio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[standardActiveSec]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[activeBias]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[activeBiasRatio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[standardActiveSecRatio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[clicks]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[idleSec]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[keys]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[moves]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[totalSec]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[activeSec]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[clicksRatio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[idleSecRatio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[keysRatio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[movesRatio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[totalSecRatio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[activeSecRatio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[totalMins]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[idleMins]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[idleMinsRatio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[outShift]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[outShiftRatio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[project]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[task]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[shift]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[projectRatio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[taskRatio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[shiftRatio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[comCat]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[comCatRatio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[scoreTotal]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[scoreTotalRatio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[workRange]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[workRangeRatio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[modeTotal]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[total]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

prefilter[userId]
string

"string" -- exact match

prefilter[userObjPrePos]
string

"string" -- exact match

prefilter[userObjPos]
string

"string" -- exact match

prefilter[userName]
string

"string" -- exact match

prefilter[userNameNorm]
string

unknown API-defined value

prefilter[userArchived]
string

"string" -- exact match

prefilter[currentTagId]
string

"string" -- exact match

prefilter[currentTagObj]
string

"string" -- exact match

prefilter[currentTagName]
string

"string" -- exact match

prefilter[currentTagNameNorm]
string

"string" -- exact match

prefilter[projectId]
string

"string" -- exact match

prefilter[projectObj]
string

"string" -- exact match

prefilter[projectName]
string

"string" -- exact match

prefilter[projectNameNorm]
string

"string" -- exact match

prefilter[projectIntegrationProvider]
string

"string" -- exact match

prefilter[projectIntegrationName]
string

"string" -- exact match

prefilter[projectIntegrationNameNorm]
string

"string" -- exact match

prefilter[taskId]
string

"string" -- exact match

prefilter[taskObj]
string

"string" -- exact match

prefilter[taskName]
string

"string" -- exact match

prefilter[taskNameNorm]
string

"string" -- exact match

prefilter[taskIntegrationProvider]
string

"string" -- exact match

prefilter[taskIntegrationName]
string

"string" -- exact match

prefilter[taskIntegrationNameNorm]
string

"string" -- exact match

prefilter[taskIntegrationLink]
string

"string" -- exact match

prefilter[taskIntegrationLastTracked]
string

"ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

prefilter[date]
string

"ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

prefilter[timezone]
string

"string" -- exact match

prefilter[start]
string

"ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

prefilter[end]
string

"ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

prefilter[item]
string

"string" -- exact match

filter[ratio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[ratioTotal]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[count]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

prefilter[quants]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

prefilter[offsets]
string

"ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[quant0]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[quant1]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[quant2]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

ratio-page
string

if specified, page ID to get results for; or first page by default

ratio-limit
string

if specified, maximum number of items to be returned; or use API-specific hard limit by default

ratio-sort
string

which field to sort by, prepend it with "_" for descending sorting

Enum: "offcomputer" "computer" "mobile" "manual" "mobMan" "paidBreak" "unpaidBreak" "paidLeave" "unpaidLeave" "offcomputerRatio" "computerRatio" "mobileRatio" "manualRatio" "mobManRatio" "paidBreakRatio" "unpaidBreakRatio" "paidLeaveRatio" "unpaidLeaveRatio" "unratedHis" "unprodHis" "neutralHis" "prodHis" "unratedHisRatio" "unprodHisRatio" "neutralHisRatio" "prodHisRatio" "unrated" "unprod" "neutral" "prod" "unratedRatio" "unprodRatio" "neutralRatio" "prodRatio" "standardActiveSec" "activeBias" "activeBiasRatio" "standardActiveSecRatio" "clicks" "idleSec" "keys" "moves" "totalSec" "activeSec" "clicksRatio" "idleSecRatio" "keysRatio" "movesRatio" "totalSecRatio" "activeSecRatio" "totalMins" "idleMins" "idleMinsRatio" "outShift" "outShiftRatio" "project" "task" "shift" "projectRatio" "taskRatio" "shiftRatio" "comCat" "comCatRatio" "scoreTotal" "scoreTotalRatio" "workRange" "workRangeRatio" "modeTotal" "total" "userId" "userObjPrePos" "userObjPos" "userName" "userNameNorm" "userArchived" "currentTagId" "currentTagObj" "currentTagName" "currentTagNameNorm" "projectId" "projectObj" "projectName" "projectNameNorm" "projectIntegrationProvider" "projectIntegrationName" "projectIntegrationNameNorm" "taskId" "taskObj" "taskName" "taskNameNorm" "taskIntegrationProvider" "taskIntegrationName" "taskIntegrationNameNorm" "taskIntegrationLink" "taskIntegrationLastTracked" "date" "timezone" "start" "end" "item" "ratio" "ratioTotal" "count" "quants" "offsets" "quant0" "quant1" "quant2" "_offcomputer" "_computer" "_mobile" "_manual" "_mobMan" "_paidBreak" "_unpaidBreak" "_paidLeave" "_unpaidLeave" "_offcomputerRatio" "_computerRatio" "_mobileRatio" "_manualRatio" "_mobManRatio" "_paidBreakRatio" "_unpaidBreakRatio" "_paidLeaveRatio" "_unpaidLeaveRatio" "_unratedHis" "_unprodHis" "_neutralHis" "_prodHis" "_unratedHisRatio" "_unprodHisRatio" "_neutralHisRatio" "_prodHisRatio" "_unrated" "_unprod" "_neutral" "_prod" "_unratedRatio" "_unprodRatio" "_neutralRatio" "_prodRatio" "_standardActiveSec" "_activeBias" "_activeBiasRatio" "_standardActiveSecRatio" "_clicks" "_idleSec" "_keys" "_moves" "_totalSec" "_activeSec" "_clicksRatio" "_idleSecRatio" "_keysRatio" "_movesRatio" "_totalSecRatio" "_activeSecRatio" "_totalMins" "_idleMins" "_idleMinsRatio" "_outShift" "_outShiftRatio" "_project" "_task" "_shift" "_projectRatio" "_taskRatio" "_shiftRatio" "_comCat" "_comCatRatio" "_scoreTotal" "_scoreTotalRatio" "_workRange" "_workRangeRatio" "_modeTotal" "_total" "_userId" "_userObjPrePos" "_userObjPos" "_userName" "_userNameNorm" "_userArchived" "_currentTagId" "_currentTagObj" "_currentTagName" "_currentTagNameNorm" "_projectId" "_projectObj" "_projectName" "_projectNameNorm" "_projectIntegrationProvider" "_projectIntegrationName" "_projectIntegrationNameNorm" "_taskId" "_taskObj" "_taskName" "_taskNameNorm" "_taskIntegrationProvider" "_taskIntegrationName" "_taskIntegrationNameNorm" "_taskIntegrationLink" "_taskIntegrationLastTracked" "_date" "_timezone" "_start" "_end" "_item" "_ratio" "_ratioTotal" "_count" "_quants" "_offsets" "_quant0" "_quant1" "_quant2"
ratio-filter[total]
string

Prefilter ratio totals.

ratio-field
string

A field to specify for "ratio" paging. Default is first specified in "ratio" param

ratio-id
string

ID of ratio item for "ratio" paging. Default is top first in ratio array.

date-page
string

if specified, page ID to get results for; or first page by default

date-limit
string

if specified, maximum number of items to be returned; or use API-specific hard limit by default

Responses

Request samples

const fetch = require('node-fetch');

const query = new URLSearchParams({
  company: 'string',
  from: '2019-08-24T14:15:22Z',
  to: '2019-08-24T14:15:22Z',
  user: 'string',
  tag: 'string',
  task: 'string',
  unpaid: '0',
  breaks: 'all',
  fields: 'string',
  'group-by': 'string',
  resolve: 'string',
  ratio: 'string',
  level: 'company',
  timezone: 'string',
  period: 'days',
  interval: '1',
  page: 'string',
  limit: 'string',
  sort: 'offcomputer',
  'filter[offcomputer]': 'string',
  'filter[computer]': 'string',
  'filter[mobile]': 'string',
  'filter[manual]': 'string',
  'filter[mobMan]': 'string',
  'filter[paidBreak]': 'string',
  'filter[unpaidBreak]': 'string',
  'filter[paidLeave]': 'string',
  'filter[unpaidLeave]': 'string',
  'filter[offcomputerRatio]': 'string',
  'filter[computerRatio]': 'string',
  'filter[mobileRatio]': 'string',
  'filter[manualRatio]': 'string',
  'filter[mobManRatio]': 'string',
  'filter[paidBreakRatio]': 'string',
  'filter[unpaidBreakRatio]': 'string',
  'filter[paidLeaveRatio]': 'string',
  'filter[unpaidLeaveRatio]': 'string',
  'filter[unratedHis]': 'string',
  'filter[unprodHis]': 'string',
  'filter[neutralHis]': 'string',
  'filter[prodHis]': 'string',
  'filter[unratedHisRatio]': 'string',
  'filter[unprodHisRatio]': 'string',
  'filter[neutralHisRatio]': 'string',
  'filter[prodHisRatio]': 'string',
  'filter[unrated]': 'string',
  'filter[unprod]': 'string',
  'filter[neutral]': 'string',
  'filter[prod]': 'string',
  'filter[unratedRatio]': 'string',
  'filter[unprodRatio]': 'string',
  'filter[neutralRatio]': 'string',
  'filter[prodRatio]': 'string',
  'filter[standardActiveSec]': 'string',
  'filter[activeBias]': 'string',
  'filter[activeBiasRatio]': 'string',
  'filter[standardActiveSecRatio]': 'string',
  'filter[clicks]': 'string',
  'filter[idleSec]': 'string',
  'filter[keys]': 'string',
  'filter[moves]': 'string',
  'filter[totalSec]': 'string',
  'filter[activeSec]': 'string',
  'filter[clicksRatio]': 'string',
  'filter[idleSecRatio]': 'string',
  'filter[keysRatio]': 'string',
  'filter[movesRatio]': 'string',
  'filter[totalSecRatio]': 'string',
  'filter[activeSecRatio]': 'string',
  'filter[totalMins]': 'string',
  'filter[idleMins]': 'string',
  'filter[idleMinsRatio]': 'string',
  'filter[outShift]': 'string',
  'filter[outShiftRatio]': 'string',
  'filter[project]': 'string',
  'filter[task]': 'string',
  'filter[shift]': 'string',
  'filter[projectRatio]': 'string',
  'filter[taskRatio]': 'string',
  'filter[shiftRatio]': 'string',
  'filter[comCat]': 'string',
  'filter[comCatRatio]': 'string',
  'filter[scoreTotal]': 'string',
  'filter[scoreTotalRatio]': 'string',
  'filter[workRange]': 'string',
  'filter[workRangeRatio]': 'string',
  'filter[modeTotal]': 'string',
  'filter[total]': 'string',
  'prefilter[userId]': 'string',
  'prefilter[userObjPrePos]': 'string',
  'prefilter[userObjPos]': 'string',
  'prefilter[userName]': 'string',
  'prefilter[userNameNorm]': 'string',
  'prefilter[userArchived]': 'string',
  'prefilter[currentTagId]': 'string',
  'prefilter[currentTagObj]': 'string',
  'prefilter[currentTagName]': 'string',
  'prefilter[currentTagNameNorm]': 'string',
  'prefilter[projectId]': 'string',
  'prefilter[projectObj]': 'string',
  'prefilter[projectName]': 'string',
  'prefilter[projectNameNorm]': 'string',
  'prefilter[projectIntegrationProvider]': 'string',
  'prefilter[projectIntegrationName]': 'string',
  'prefilter[projectIntegrationNameNorm]': 'string',
  'prefilter[taskId]': 'string',
  'prefilter[taskObj]': 'string',
  'prefilter[taskName]': 'string',
  'prefilter[taskNameNorm]': 'string',
  'prefilter[taskIntegrationProvider]': 'string',
  'prefilter[taskIntegrationName]': 'string',
  'prefilter[taskIntegrationNameNorm]': 'string',
  'prefilter[taskIntegrationLink]': 'string',
  'prefilter[taskIntegrationLastTracked]': 'string',
  'prefilter[date]': 'string',
  'prefilter[timezone]': 'string',
  'prefilter[start]': 'string',
  'prefilter[end]': 'string',
  'prefilter[item]': 'string',
  'filter[ratio]': 'string',
  'filter[ratioTotal]': 'string',
  'filter[count]': 'string',
  'prefilter[quants]': 'string',
  'prefilter[offsets]': 'string',
  'filter[quant0]': 'string',
  'filter[quant1]': 'string',
  'filter[quant2]': 'string',
  'ratio-page': 'string',
  'ratio-limit': 'string',
  'ratio-sort': 'offcomputer',
  'ratio-filter[total]': 'string',
  'ratio-field': 'string',
  'ratio-id': 'string',
  'date-page': 'string',
  'date-limit': 'string'
}).toString();

const resp = await fetch(
  `https://api2.timedoctor.com/api/1.1/stats/timesheet/total?${query}`,
  {
    method: 'GET',
    headers: {
      Authorization: 'YOUR_API_KEY_HERE'
    }
  }
);

const data = await resp.text();
console.log(data);

Response samples

Content type
application/json
{
  • "data": [
    ]
}

stats1_1_timesheetcategory

Get category stats/timesheet v1.1.
NOTE: This documentation uses ratio=score and sort=modeTotal as an example. As such, you can get responses that contain score and modeTotal, depending on the parameters you specify when making the request. It is important to understand that score will be replaced by the value you specify for the ratio param and modeTotal will be replaced by the value you specify for sort.

Authorizations:
ApiKeyAuth (apiKey)
query Parameters
company
required
string

ID of Company or Workspace, user refers to.

from
string <date-time>

ISO Date of range beginning (inclusive); (to minus 30mins) by default

to
string <date-time>

ISO Date of range ending (exclusive); current by default

user
string

Comma-separated list of User IDs yourself if omitted; all -- to get totals for workspace

tag
string

Comma-separated list of Tag IDs. If specified, users will be filtered by these tags

task
string

If specified, return only statistics on this task

unpaid
integer

If set to 1, includes unpaid time (from unpaid breaks) into report

breaks
string

Specifies breaks to get. This may not be combined with "task" parameter

Enum: "all" "paid" "unpaid"
fields
string

Optional comma-separated list of field names to return.

group-by
string

If specified, will group the results by given field (if such grouping is supported).

resolve
string

Optional comma-separated list of field names to resolve.

ratio
string

Optional comma-separated list of field names to get total ratio of.

level
string

Level of information ("user" by default)

Enum: "company" "user"
timezone
string

Timezone of ranges breaks. Etc/UTC by default

period
string
Default: "days"

Period unit of ranges subdivision. days by default

Enum: "minutes" "hours" "days" "months" "years"
interval
integer <int32> >= 1

Number of period units. 1 by default

page
string

if specified, page ID to get results for; or first page by default

limit
string

if specified, maximum number of items to be returned; or use API-specific hard limit by default

sort
string

which field to sort by, prepend it with "_" for descending sorting

Enum: "userId" "userObjPrePos" "userObjPos" "userName" "userNameNorm" "userArchived" "currentTagId" "currentTagObj" "currentTagName" "currentTagNameNorm" "projectId" "projectObj" "projectName" "projectNameNorm" "projectIntegrationProvider" "projectIntegrationName" "projectIntegrationNameNorm" "taskId" "taskObj" "taskName" "taskNameNorm" "taskIntegrationProvider" "taskIntegrationName" "taskIntegrationNameNorm" "taskIntegrationLink" "taskIntegrationLastTracked" "date" "timezone" "start" "end" "item" "ratio" "ratioTotal" "count" "quants" "offsets" "quant0" "quant1" "quant2" "total" "comCat" "comCatObj" "entity" "name" "score" "tagId" "userCat" "clicks" "moves" "keys" "totalMins" "idleSec" "idleSecRatio" "idleMins" "idleMinsRatio" "totalSec" "activeSec" "activeSecRatio" "standardActiveSec" "activeBias" "activeBiasRatio" "standardActiveSecRatio" "_userId" "_userObjPrePos" "_userObjPos" "_userName" "_userNameNorm" "_userArchived" "_currentTagId" "_currentTagObj" "_currentTagName" "_currentTagNameNorm" "_projectId" "_projectObj" "_projectName" "_projectNameNorm" "_projectIntegrationProvider" "_projectIntegrationName" "_projectIntegrationNameNorm" "_taskId" "_taskObj" "_taskName" "_taskNameNorm" "_taskIntegrationProvider" "_taskIntegrationName" "_taskIntegrationNameNorm" "_taskIntegrationLink" "_taskIntegrationLastTracked" "_date" "_timezone" "_start" "_end" "_item" "_ratio" "_ratioTotal" "_count" "_quants" "_offsets" "_quant0" "_quant1" "_quant2" "_total" "_comCat" "_comCatObj" "_entity" "_name" "_score" "_tagId" "_userCat" "_clicks" "_moves" "_keys" "_totalMins" "_idleSec" "_idleSecRatio" "_idleMins" "_idleMinsRatio" "_totalSec" "_activeSec" "_activeSecRatio" "_standardActiveSec" "_activeBias" "_activeBiasRatio" "_standardActiveSecRatio"
prefilter[userId]
string

"string" -- exact match

prefilter[userObjPrePos]
string

"string" -- exact match

prefilter[userObjPos]
string

"string" -- exact match

prefilter[userName]
string

"string" -- exact match

prefilter[userNameNorm]
string

unknown API-defined value

prefilter[userArchived]
string

"string" -- exact match

prefilter[currentTagId]
string

"string" -- exact match

prefilter[currentTagObj]
string

"string" -- exact match

prefilter[currentTagName]
string

"string" -- exact match

prefilter[currentTagNameNorm]
string

"string" -- exact match

prefilter[projectId]
string

"string" -- exact match

prefilter[projectObj]
string

"string" -- exact match

prefilter[projectName]
string

"string" -- exact match

prefilter[projectNameNorm]
string

"string" -- exact match

prefilter[projectIntegrationProvider]
string

"string" -- exact match

prefilter[projectIntegrationName]
string

"string" -- exact match

prefilter[projectIntegrationNameNorm]
string

"string" -- exact match

prefilter[taskId]
string

"string" -- exact match

prefilter[taskObj]
string

"string" -- exact match

prefilter[taskName]
string

"string" -- exact match

prefilter[taskNameNorm]
string

"string" -- exact match

prefilter[taskIntegrationProvider]
string

"string" -- exact match

prefilter[taskIntegrationName]
string

"string" -- exact match

prefilter[taskIntegrationNameNorm]
string

"string" -- exact match

prefilter[taskIntegrationLink]
string

"string" -- exact match

prefilter[taskIntegrationLastTracked]
string

"ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

prefilter[date]
string

"ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

prefilter[timezone]
string

"string" -- exact match

prefilter[start]
string

"ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

prefilter[end]
string

"ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

prefilter[item]
string

"string" -- exact match

filter[ratio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[ratioTotal]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[count]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

prefilter[quants]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

prefilter[offsets]
string

"ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[quant0]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[quant1]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[quant2]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[total]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

prefilter[comCat]
string

"string" -- exact match

filter[comCatObj]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

prefilter[entity]
string

"string" -- exact match

prefilter[name]
string

unknown API-defined value

prefilter[score]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

prefilter[tagId]
string

"string" -- exact match

prefilter[userCat]
string

"string" -- exact match

filter[clicks]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[moves]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[keys]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[totalMins]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[idleSec]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[idleSecRatio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[idleMins]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[idleMinsRatio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[totalSec]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[activeSec]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[activeSecRatio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[standardActiveSec]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[activeBias]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[activeBiasRatio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[standardActiveSecRatio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

ratio-page
string

if specified, page ID to get results for; or first page by default

ratio-limit
string

if specified, maximum number of items to be returned; or use API-specific hard limit by default

ratio-sort
string

which field to sort by, prepend it with "_" for descending sorting

Enum: "userId" "userObjPrePos" "userObjPos" "userName" "userNameNorm" "userArchived" "currentTagId" "currentTagObj" "currentTagName" "currentTagNameNorm" "projectId" "projectObj" "projectName" "projectNameNorm" "projectIntegrationProvider" "projectIntegrationName" "projectIntegrationNameNorm" "taskId" "taskObj" "taskName" "taskNameNorm" "taskIntegrationProvider" "taskIntegrationName" "taskIntegrationNameNorm" "taskIntegrationLink" "taskIntegrationLastTracked" "date" "timezone" "start" "end" "item" "ratio" "ratioTotal" "count" "quants" "offsets" "quant0" "quant1" "quant2" "total" "comCat" "comCatObj" "entity" "name" "score" "tagId" "userCat" "clicks" "moves" "keys" "totalMins" "idleSec" "idleSecRatio" "idleMins" "idleMinsRatio" "totalSec" "activeSec" "activeSecRatio" "standardActiveSec" "activeBias" "activeBiasRatio" "standardActiveSecRatio" "_userId" "_userObjPrePos" "_userObjPos" "_userName" "_userNameNorm" "_userArchived" "_currentTagId" "_currentTagObj" "_currentTagName" "_currentTagNameNorm" "_projectId" "_projectObj" "_projectName" "_projectNameNorm" "_projectIntegrationProvider" "_projectIntegrationName" "_projectIntegrationNameNorm" "_taskId" "_taskObj" "_taskName" "_taskNameNorm" "_taskIntegrationProvider" "_taskIntegrationName" "_taskIntegrationNameNorm" "_taskIntegrationLink" "_taskIntegrationLastTracked" "_date" "_timezone" "_start" "_end" "_item" "_ratio" "_ratioTotal" "_count" "_quants" "_offsets" "_quant0" "_quant1" "_quant2" "_total" "_comCat" "_comCatObj" "_entity" "_name" "_score" "_tagId" "_userCat" "_clicks" "_moves" "_keys" "_totalMins" "_idleSec" "_idleSecRatio" "_idleMins" "_idleMinsRatio" "_totalSec" "_activeSec" "_activeSecRatio" "_standardActiveSec" "_activeBias" "_activeBiasRatio" "_standardActiveSecRatio"
ratio-filter[total]
string

Prefilter ratio totals.

ratio-field
string

A field to specify for "ratio" paging. Default is first specified in "ratio" param

ratio-id
string

ID of ratio item for "ratio" paging. Default is top first in ratio array.

date-page
string

if specified, page ID to get results for; or first page by default

date-limit
string

if specified, maximum number of items to be returned; or use API-specific hard limit by default

Responses

Request samples

const fetch = require('node-fetch');

const query = new URLSearchParams({
  company: 'string',
  from: '2019-08-24T14:15:22Z',
  to: '2019-08-24T14:15:22Z',
  user: 'string',
  tag: 'string',
  task: 'string',
  unpaid: '0',
  breaks: 'all',
  fields: 'string',
  'group-by': 'string',
  resolve: 'string',
  ratio: 'string',
  level: 'company',
  timezone: 'string',
  period: 'days',
  interval: '1',
  page: 'string',
  limit: 'string',
  sort: 'userId',
  'prefilter[userId]': 'string',
  'prefilter[userObjPrePos]': 'string',
  'prefilter[userObjPos]': 'string',
  'prefilter[userName]': 'string',
  'prefilter[userNameNorm]': 'string',
  'prefilter[userArchived]': 'string',
  'prefilter[currentTagId]': 'string',
  'prefilter[currentTagObj]': 'string',
  'prefilter[currentTagName]': 'string',
  'prefilter[currentTagNameNorm]': 'string',
  'prefilter[projectId]': 'string',
  'prefilter[projectObj]': 'string',
  'prefilter[projectName]': 'string',
  'prefilter[projectNameNorm]': 'string',
  'prefilter[projectIntegrationProvider]': 'string',
  'prefilter[projectIntegrationName]': 'string',
  'prefilter[projectIntegrationNameNorm]': 'string',
  'prefilter[taskId]': 'string',
  'prefilter[taskObj]': 'string',
  'prefilter[taskName]': 'string',
  'prefilter[taskNameNorm]': 'string',
  'prefilter[taskIntegrationProvider]': 'string',
  'prefilter[taskIntegrationName]': 'string',
  'prefilter[taskIntegrationNameNorm]': 'string',
  'prefilter[taskIntegrationLink]': 'string',
  'prefilter[taskIntegrationLastTracked]': 'string',
  'prefilter[date]': 'string',
  'prefilter[timezone]': 'string',
  'prefilter[start]': 'string',
  'prefilter[end]': 'string',
  'prefilter[item]': 'string',
  'filter[ratio]': 'string',
  'filter[ratioTotal]': 'string',
  'filter[count]': 'string',
  'prefilter[quants]': 'string',
  'prefilter[offsets]': 'string',
  'filter[quant0]': 'string',
  'filter[quant1]': 'string',
  'filter[quant2]': 'string',
  'filter[total]': 'string',
  'prefilter[comCat]': 'string',
  'filter[comCatObj]': 'string',
  'prefilter[entity]': 'string',
  'prefilter[name]': 'string',
  'prefilter[score]': 'string',
  'prefilter[tagId]': 'string',
  'prefilter[userCat]': 'string',
  'filter[clicks]': 'string',
  'filter[moves]': 'string',
  'filter[keys]': 'string',
  'filter[totalMins]': 'string',
  'filter[idleSec]': 'string',
  'filter[idleSecRatio]': 'string',
  'filter[idleMins]': 'string',
  'filter[idleMinsRatio]': 'string',
  'filter[totalSec]': 'string',
  'filter[activeSec]': 'string',
  'filter[activeSecRatio]': 'string',
  'filter[standardActiveSec]': 'string',
  'filter[activeBias]': 'string',
  'filter[activeBiasRatio]': 'string',
  'filter[standardActiveSecRatio]': 'string',
  'ratio-page': 'string',
  'ratio-limit': 'string',
  'ratio-sort': 'userId',
  'ratio-filter[total]': 'string',
  'ratio-field': 'string',
  'ratio-id': 'string',
  'date-page': 'string',
  'date-limit': 'string'
}).toString();

const resp = await fetch(
  `https://api2.timedoctor.com/api/1.1/stats/timesheet/category?${query}`,
  {
    method: 'GET',
    headers: {
      Authorization: 'YOUR_API_KEY_HERE'
    }
  }
);

const data = await resp.text();
console.log(data);

Response samples

Content type
application/json
{
  • "data": [
    ]
}

stats1_1_timesheetsummary

Get summary stats/timesheet v1.1.
NOTE: This documentation uses ratio=score and sort=modeTotal as an example. As such, you can get responses that contain score and modeTotal, depending on the parameters you specify when making the request. It is important to understand that score will be replaced by the value you specify for the ratio param and modeTotal will be replaced by the value you specify for sort. You have to specify sort param for this API to work.

Authorizations:
ApiKeyAuth (apiKey)
query Parameters
company
required
string

ID of Company or Workspace, user refers to.

from
string <date-time>

ISO Date of range beginning (inclusive); (to minus 30mins) by default

to
string <date-time>

ISO Date of range ending (exclusive); current by default

user
string

Comma-separated list of User IDs yourself if omitted; all -- to get totals for workspace

tag
string

Comma-separated list of Tag IDs. If specified, users will be filtered by these tags

task
string

If specified, return only statistics on this task

unpaid
integer

If set to 1, includes unpaid time (from unpaid breaks) into report

breaks
string

Specifies breaks to get. This may not be combined with "task" parameter

Enum: "all" "paid" "unpaid"
fields
string

Optional comma-separated list of field names to return.

group-by
string

If specified, will group the results by given field (if such grouping is supported).

resolve
string

Optional comma-separated list of field names to resolve.

ratio
string

Optional comma-separated list of field names to get total ratio of.

level
string

Level of information ("user" by default)

Enum: "company" "user"
timezone
string

Timezone of ranges breaks. Etc/UTC by default

period
string
Default: "days"

Period unit of ranges subdivision. days by default

Enum: "minutes" "hours" "days" "months" "years"
interval
integer <int32> >= 1

Number of period units. 1 by default

page
string

if specified, page ID to get results for; or first page by default

limit
string

if specified, maximum number of items to be returned; or use API-specific hard limit by default

sort
string

which field to sort by, prepend it with "_" for descending sorting

Enum: "userId" "userObjPrePos" "userObjPos" "userName" "userNameNorm" "userArchived" "currentTagId" "currentTagObj" "currentTagName" "currentTagNameNorm" "projectId" "projectObj" "projectName" "projectNameNorm" "projectIntegrationProvider" "projectIntegrationName" "projectIntegrationNameNorm" "taskId" "taskObj" "taskName" "taskNameNorm" "taskIntegrationProvider" "taskIntegrationName" "taskIntegrationNameNorm" "taskIntegrationLink" "taskIntegrationLastTracked" "date" "timezone" "start" "end" "item" "ratio" "ratioTotal" "count" "quants" "offsets" "quant0" "quant1" "quant2" "total" "comCat" "comCatObj" "entity" "name" "score" "tagId" "userCat" "clicks" "moves" "keys" "totalMins" "idleSec" "idleSecRatio" "idleMins" "idleMinsRatio" "totalSec" "activeSec" "activeSecRatio" "standardActiveSec" "activeBias" "activeBiasRatio" "standardActiveSecRatio" "offcomputer" "computer" "mobile" "manual" "mobMan" "paidBreak" "unpaidBreak" "paidLeave" "unpaidLeave" "offcomputerRatio" "computerRatio" "mobileRatio" "manualRatio" "mobManRatio" "paidBreakRatio" "unpaidBreakRatio" "paidLeaveRatio" "unpaidLeaveRatio" "unratedHis" "unprodHis" "neutralHis" "prodHis" "unratedHisRatio" "unprodHisRatio" "neutralHisRatio" "prodHisRatio" "unrated" "unprod" "neutral" "prod" "unratedRatio" "unprodRatio" "neutralRatio" "prodRatio" "clicksRatio" "keysRatio" "movesRatio" "totalSecRatio" "outShift" "outShiftRatio" "project" "task" "shift" "projectRatio" "taskRatio" "shiftRatio" "comCatRatio" "scoreTotal" "scoreTotalRatio" "workRange" "workRangeRatio" "modeTotal" "_userId" "_userObjPrePos" "_userObjPos" "_userName" "_userNameNorm" "_userArchived" "_currentTagId" "_currentTagObj" "_currentTagName" "_currentTagNameNorm" "_projectId" "_projectObj" "_projectName" "_projectNameNorm" "_projectIntegrationProvider" "_projectIntegrationName" "_projectIntegrationNameNorm" "_taskId" "_taskObj" "_taskName" "_taskNameNorm" "_taskIntegrationProvider" "_taskIntegrationName" "_taskIntegrationNameNorm" "_taskIntegrationLink" "_taskIntegrationLastTracked" "_date" "_timezone" "_start" "_end" "_item" "_ratio" "_ratioTotal" "_count" "_quants" "_offsets" "_quant0" "_quant1" "_quant2" "_total" "_comCat" "_comCatObj" "_entity" "_name" "_score" "_tagId" "_userCat" "_clicks" "_moves" "_keys" "_totalMins" "_idleSec" "_idleSecRatio" "_idleMins" "_idleMinsRatio" "_totalSec" "_activeSec" "_activeSecRatio" "_standardActiveSec" "_activeBias" "_activeBiasRatio" "_standardActiveSecRatio" "_offcomputer" "_computer" "_mobile" "_manual" "_mobMan" "_paidBreak" "_unpaidBreak" "_paidLeave" "_unpaidLeave" "_offcomputerRatio" "_computerRatio" "_mobileRatio" "_manualRatio" "_mobManRatio" "_paidBreakRatio" "_unpaidBreakRatio" "_paidLeaveRatio" "_unpaidLeaveRatio" "_unratedHis" "_unprodHis" "_neutralHis" "_prodHis" "_unratedHisRatio" "_unprodHisRatio" "_neutralHisRatio" "_prodHisRatio" "_unrated" "_unprod" "_neutral" "_prod" "_unratedRatio" "_unprodRatio" "_neutralRatio" "_prodRatio" "_clicksRatio" "_keysRatio" "_movesRatio" "_totalSecRatio" "_outShift" "_outShiftRatio" "_project" "_task" "_shift" "_projectRatio" "_taskRatio" "_shiftRatio" "_comCatRatio" "_scoreTotal" "_scoreTotalRatio" "_workRange" "_workRangeRatio" "_modeTotal"
prefilter[userId]
string

"string" -- exact match

prefilter[userObjPrePos]
string

"string" -- exact match

prefilter[userObjPos]
string

"string" -- exact match

prefilter[userName]
string

"string" -- exact match

prefilter[userNameNorm]
string

unknown API-defined value

prefilter[userArchived]
string

"string" -- exact match

prefilter[currentTagId]
string

"string" -- exact match

prefilter[currentTagObj]
string

"string" -- exact match

prefilter[currentTagName]
string

"string" -- exact match

prefilter[currentTagNameNorm]
string

"string" -- exact match

prefilter[projectId]
string

"string" -- exact match

prefilter[projectObj]
string

"string" -- exact match

prefilter[projectName]
string

"string" -- exact match

prefilter[projectNameNorm]
string

"string" -- exact match

prefilter[projectIntegrationProvider]
string

"string" -- exact match

prefilter[projectIntegrationName]
string

"string" -- exact match

prefilter[projectIntegrationNameNorm]
string

"string" -- exact match

prefilter[taskId]
string

"string" -- exact match

prefilter[taskObj]
string

"string" -- exact match

prefilter[taskName]
string

"string" -- exact match

prefilter[taskNameNorm]
string

"string" -- exact match

prefilter[taskIntegrationProvider]
string

"string" -- exact match

prefilter[taskIntegrationName]
string

"string" -- exact match

prefilter[taskIntegrationNameNorm]
string

"string" -- exact match

prefilter[taskIntegrationLink]
string

"string" -- exact match

prefilter[taskIntegrationLastTracked]
string

"ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

prefilter[date]
string

"ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

prefilter[timezone]
string

"string" -- exact match

prefilter[start]
string

"ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

prefilter[end]
string

"ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

prefilter[item]
string

"string" -- exact match

filter[ratio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[ratioTotal]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[count]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

prefilter[quants]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

prefilter[offsets]
string

"ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[quant0]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[quant1]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[quant2]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[total]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[comCat]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[comCatObj]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

prefilter[entity]
string

"string" -- exact match

prefilter[name]
string

unknown API-defined value

prefilter[score]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

prefilter[tagId]
string

"string" -- exact match

prefilter[userCat]
string

"string" -- exact match

filter[clicks]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[moves]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[keys]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[totalMins]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[idleSec]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[idleSecRatio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[idleMins]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[idleMinsRatio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[totalSec]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[activeSec]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[activeSecRatio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[standardActiveSec]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[activeBias]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[activeBiasRatio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[standardActiveSecRatio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[offcomputer]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[computer]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[mobile]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[manual]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[mobMan]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[paidBreak]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[unpaidBreak]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[paidLeave]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[unpaidLeave]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[offcomputerRatio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[computerRatio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[mobileRatio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[manualRatio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[mobManRatio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[paidBreakRatio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[unpaidBreakRatio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[paidLeaveRatio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[unpaidLeaveRatio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[unratedHis]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[unprodHis]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[neutralHis]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[prodHis]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[unratedHisRatio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[unprodHisRatio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[neutralHisRatio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[prodHisRatio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[unrated]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[unprod]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[neutral]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[prod]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[unratedRatio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[unprodRatio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[neutralRatio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[prodRatio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[clicksRatio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[keysRatio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[movesRatio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[totalSecRatio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[outShift]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[outShiftRatio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[project]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[task]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[shift]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[projectRatio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[taskRatio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[shiftRatio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[comCatRatio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[scoreTotal]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[scoreTotalRatio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[workRange]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[workRangeRatio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[modeTotal]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

ratio-page
string

if specified, page ID to get results for; or first page by default

ratio-limit
string

if specified, maximum number of items to be returned; or use API-specific hard limit by default

ratio-sort
string

which field to sort by, prepend it with "_" for descending sorting

Enum: "userId" "userObjPrePos" "userObjPos" "userName" "userNameNorm" "userArchived" "currentTagId" "currentTagObj" "currentTagName" "currentTagNameNorm" "projectId" "projectObj" "projectName" "projectNameNorm" "projectIntegrationProvider" "projectIntegrationName" "projectIntegrationNameNorm" "taskId" "taskObj" "taskName" "taskNameNorm" "taskIntegrationProvider" "taskIntegrationName" "taskIntegrationNameNorm" "taskIntegrationLink" "taskIntegrationLastTracked" "date" "timezone" "start" "end" "item" "ratio" "ratioTotal" "count" "quants" "offsets" "quant0" "quant1" "quant2" "total" "comCat" "comCatObj" "entity" "name" "score" "tagId" "userCat" "clicks" "moves" "keys" "totalMins" "idleSec" "idleSecRatio" "idleMins" "idleMinsRatio" "totalSec" "activeSec" "activeSecRatio" "standardActiveSec" "activeBias" "activeBiasRatio" "standardActiveSecRatio" "offcomputer" "computer" "mobile" "manual" "mobMan" "paidBreak" "unpaidBreak" "paidLeave" "unpaidLeave" "offcomputerRatio" "computerRatio" "mobileRatio" "manualRatio" "mobManRatio" "paidBreakRatio" "unpaidBreakRatio" "paidLeaveRatio" "unpaidLeaveRatio" "unratedHis" "unprodHis" "neutralHis" "prodHis" "unratedHisRatio" "unprodHisRatio" "neutralHisRatio" "prodHisRatio" "unrated" "unprod" "neutral" "prod" "unratedRatio" "unprodRatio" "neutralRatio" "prodRatio" "clicksRatio" "keysRatio" "movesRatio" "totalSecRatio" "outShift" "outShiftRatio" "project" "task" "shift" "projectRatio" "taskRatio" "shiftRatio" "comCatRatio" "scoreTotal" "scoreTotalRatio" "workRange" "workRangeRatio" "modeTotal" "_userId" "_userObjPrePos" "_userObjPos" "_userName" "_userNameNorm" "_userArchived" "_currentTagId" "_currentTagObj" "_currentTagName" "_currentTagNameNorm" "_projectId" "_projectObj" "_projectName" "_projectNameNorm" "_projectIntegrationProvider" "_projectIntegrationName" "_projectIntegrationNameNorm" "_taskId" "_taskObj" "_taskName" "_taskNameNorm" "_taskIntegrationProvider" "_taskIntegrationName" "_taskIntegrationNameNorm" "_taskIntegrationLink" "_taskIntegrationLastTracked" "_date" "_timezone" "_start" "_end" "_item" "_ratio" "_ratioTotal" "_count" "_quants" "_offsets" "_quant0" "_quant1" "_quant2" "_total" "_comCat" "_comCatObj" "_entity" "_name" "_score" "_tagId" "_userCat" "_clicks" "_moves" "_keys" "_totalMins" "_idleSec" "_idleSecRatio" "_idleMins" "_idleMinsRatio" "_totalSec" "_activeSec" "_activeSecRatio" "_standardActiveSec" "_activeBias" "_activeBiasRatio" "_standardActiveSecRatio" "_offcomputer" "_computer" "_mobile" "_manual" "_mobMan" "_paidBreak" "_unpaidBreak" "_paidLeave" "_unpaidLeave" "_offcomputerRatio" "_computerRatio" "_mobileRatio" "_manualRatio" "_mobManRatio" "_paidBreakRatio" "_unpaidBreakRatio" "_paidLeaveRatio" "_unpaidLeaveRatio" "_unratedHis" "_unprodHis" "_neutralHis" "_prodHis" "_unratedHisRatio" "_unprodHisRatio" "_neutralHisRatio" "_prodHisRatio" "_unrated" "_unprod" "_neutral" "_prod" "_unratedRatio" "_unprodRatio" "_neutralRatio" "_prodRatio" "_clicksRatio" "_keysRatio" "_movesRatio" "_totalSecRatio" "_outShift" "_outShiftRatio" "_project" "_task" "_shift" "_projectRatio" "_taskRatio" "_shiftRatio" "_comCatRatio" "_scoreTotal" "_scoreTotalRatio" "_workRange" "_workRangeRatio" "_modeTotal"
ratio-filter[total]
string

Prefilter ratio totals.

ratio-field
string

A field to specify for "ratio" paging. Default is first specified in "ratio" param

ratio-id
string

ID of ratio item for "ratio" paging. Default is top first in ratio array.

date-page
string

if specified, page ID to get results for; or first page by default

date-limit
string

if specified, maximum number of items to be returned; or use API-specific hard limit by default

Responses

Request samples

const fetch = require('node-fetch');

const query = new URLSearchParams({
  company: 'string',
  from: '2019-08-24T14:15:22Z',
  to: '2019-08-24T14:15:22Z',
  user: 'string',
  tag: 'string',
  task: 'string',
  unpaid: '0',
  breaks: 'all',
  fields: 'string',
  'group-by': 'string',
  resolve: 'string',
  ratio: 'string',
  level: 'company',
  timezone: 'string',
  period: 'days',
  interval: '1',
  page: 'string',
  limit: 'string',
  sort: 'userId',
  'prefilter[userId]': 'string',
  'prefilter[userObjPrePos]': 'string',
  'prefilter[userObjPos]': 'string',
  'prefilter[userName]': 'string',
  'prefilter[userNameNorm]': 'string',
  'prefilter[userArchived]': 'string',
  'prefilter[currentTagId]': 'string',
  'prefilter[currentTagObj]': 'string',
  'prefilter[currentTagName]': 'string',
  'prefilter[currentTagNameNorm]': 'string',
  'prefilter[projectId]': 'string',
  'prefilter[projectObj]': 'string',
  'prefilter[projectName]': 'string',
  'prefilter[projectNameNorm]': 'string',
  'prefilter[projectIntegrationProvider]': 'string',
  'prefilter[projectIntegrationName]': 'string',
  'prefilter[projectIntegrationNameNorm]': 'string',
  'prefilter[taskId]': 'string',
  'prefilter[taskObj]': 'string',
  'prefilter[taskName]': 'string',
  'prefilter[taskNameNorm]': 'string',
  'prefilter[taskIntegrationProvider]': 'string',
  'prefilter[taskIntegrationName]': 'string',
  'prefilter[taskIntegrationNameNorm]': 'string',
  'prefilter[taskIntegrationLink]': 'string',
  'prefilter[taskIntegrationLastTracked]': 'string',
  'prefilter[date]': 'string',
  'prefilter[timezone]': 'string',
  'prefilter[start]': 'string',
  'prefilter[end]': 'string',
  'prefilter[item]': 'string',
  'filter[ratio]': 'string',
  'filter[ratioTotal]': 'string',
  'filter[count]': 'string',
  'prefilter[quants]': 'string',
  'prefilter[offsets]': 'string',
  'filter[quant0]': 'string',
  'filter[quant1]': 'string',
  'filter[quant2]': 'string',
  'filter[total]': 'string',
  'filter[comCat]': 'string',
  'filter[comCatObj]': 'string',
  'prefilter[entity]': 'string',
  'prefilter[name]': 'string',
  'prefilter[score]': 'string',
  'prefilter[tagId]': 'string',
  'prefilter[userCat]': 'string',
  'filter[clicks]': 'string',
  'filter[moves]': 'string',
  'filter[keys]': 'string',
  'filter[totalMins]': 'string',
  'filter[idleSec]': 'string',
  'filter[idleSecRatio]': 'string',
  'filter[idleMins]': 'string',
  'filter[idleMinsRatio]': 'string',
  'filter[totalSec]': 'string',
  'filter[activeSec]': 'string',
  'filter[activeSecRatio]': 'string',
  'filter[standardActiveSec]': 'string',
  'filter[activeBias]': 'string',
  'filter[activeBiasRatio]': 'string',
  'filter[standardActiveSecRatio]': 'string',
  'filter[offcomputer]': 'string',
  'filter[computer]': 'string',
  'filter[mobile]': 'string',
  'filter[manual]': 'string',
  'filter[mobMan]': 'string',
  'filter[paidBreak]': 'string',
  'filter[unpaidBreak]': 'string',
  'filter[paidLeave]': 'string',
  'filter[unpaidLeave]': 'string',
  'filter[offcomputerRatio]': 'string',
  'filter[computerRatio]': 'string',
  'filter[mobileRatio]': 'string',
  'filter[manualRatio]': 'string',
  'filter[mobManRatio]': 'string',
  'filter[paidBreakRatio]': 'string',
  'filter[unpaidBreakRatio]': 'string',
  'filter[paidLeaveRatio]': 'string',
  'filter[unpaidLeaveRatio]': 'string',
  'filter[unratedHis]': 'string',
  'filter[unprodHis]': 'string',
  'filter[neutralHis]': 'string',
  'filter[prodHis]': 'string',
  'filter[unratedHisRatio]': 'string',
  'filter[unprodHisRatio]': 'string',
  'filter[neutralHisRatio]': 'string',
  'filter[prodHisRatio]': 'string',
  'filter[unrated]': 'string',
  'filter[unprod]': 'string',
  'filter[neutral]': 'string',
  'filter[prod]': 'string',
  'filter[unratedRatio]': 'string',
  'filter[unprodRatio]': 'string',
  'filter[neutralRatio]': 'string',
  'filter[prodRatio]': 'string',
  'filter[clicksRatio]': 'string',
  'filter[keysRatio]': 'string',
  'filter[movesRatio]': 'string',
  'filter[totalSecRatio]': 'string',
  'filter[outShift]': 'string',
  'filter[outShiftRatio]': 'string',
  'filter[project]': 'string',
  'filter[task]': 'string',
  'filter[shift]': 'string',
  'filter[projectRatio]': 'string',
  'filter[taskRatio]': 'string',
  'filter[shiftRatio]': 'string',
  'filter[comCatRatio]': 'string',
  'filter[scoreTotal]': 'string',
  'filter[scoreTotalRatio]': 'string',
  'filter[workRange]': 'string',
  'filter[workRangeRatio]': 'string',
  'filter[modeTotal]': 'string',
  'ratio-page': 'string',
  'ratio-limit': 'string',
  'ratio-sort': 'userId',
  'ratio-filter[total]': 'string',
  'ratio-field': 'string',
  'ratio-id': 'string',
  'date-page': 'string',
  'date-limit': 'string'
}).toString();

const resp = await fetch(
  `https://api2.timedoctor.com/api/1.1/stats/timesheet/summary?${query}`,
  {
    method: 'GET',
    headers: {
      Authorization: 'YOUR_API_KEY_HERE'
    }
  }
);

const data = await resp.text();
console.log(data);

Response samples

Content type
application/json
{
  • "data": [
    ]
}

stats1_1_timesheetwork-life

Get work-life stats/timesheet v1.1.
NOTE: This documentation uses ratio=score and sort=modeTotal as an example. As such, you can get responses that contain score and modeTotal, depending on the parameters you specify when making the request. It is important to understand that score will be replaced by the value you specify for the ratio param and modeTotal will be replaced by the value you specify for sort.

Authorizations:
ApiKeyAuth (apiKey)
query Parameters
company
required
string

ID of Company or Workspace, user refers to.

from
string <date-time>

ISO Date of range beginning (inclusive); (to minus 30mins) by default

to
string <date-time>

ISO Date of range ending (exclusive); current by default

user
string

Comma-separated list of User IDs yourself if omitted; all -- to get totals for workspace

tag
string

Comma-separated list of Tag IDs. If specified, users will be filtered by these tags

task
string

If specified, return only statistics on this task

unpaid
integer

If set to 1, includes unpaid time (from unpaid breaks) into report

breaks
string

Specifies breaks to get. This may not be combined with "task" parameter

Enum: "all" "paid" "unpaid"
fields
string

Optional comma-separated list of field names to return.

group-by
string

If specified, will group the results by given field (if such grouping is supported).

resolve
string

Optional comma-separated list of field names to resolve.

ratio
string

Optional comma-separated list of field names to get total ratio of.

level
string

Level of information ("user" by default)

Enum: "company" "user"
timezone
string

Timezone of ranges breaks. Etc/UTC by default

period
string
Default: "days"

Period unit of ranges subdivision. days by default

Enum: "minutes" "hours" "days" "months" "years"
interval
integer <int32> >= 1

Number of period units. 1 by default

page
string

if specified, page ID to get results for; or first page by default

limit
string

if specified, maximum number of items to be returned; or use API-specific hard limit by default

sort
string

which field to sort by, prepend it with "_" for descending sorting

Enum: "total" "totalHours" "lastHour" "outShift" "day" "tooManyHours" "lateHours" "outOfShiftWork" "weekendWork" "totalIssues" "dailyIssues" "userId" "userObjPrePos" "userObjPos" "userName" "userNameNorm" "userArchived" "currentTagId" "currentTagObj" "currentTagName" "currentTagNameNorm" "projectId" "projectObj" "projectName" "projectNameNorm" "projectIntegrationProvider" "projectIntegrationName" "projectIntegrationNameNorm" "taskId" "taskObj" "taskName" "taskNameNorm" "taskIntegrationProvider" "taskIntegrationName" "taskIntegrationNameNorm" "taskIntegrationLink" "taskIntegrationLastTracked" "date" "timezone" "start" "end" "item" "ratio" "ratioTotal" "count" "quants" "offsets" "quant0" "quant1" "quant2" "_total" "_totalHours" "_lastHour" "_outShift" "_day" "_tooManyHours" "_lateHours" "_outOfShiftWork" "_weekendWork" "_totalIssues" "_dailyIssues" "_userId" "_userObjPrePos" "_userObjPos" "_userName" "_userNameNorm" "_userArchived" "_currentTagId" "_currentTagObj" "_currentTagName" "_currentTagNameNorm" "_projectId" "_projectObj" "_projectName" "_projectNameNorm" "_projectIntegrationProvider" "_projectIntegrationName" "_projectIntegrationNameNorm" "_taskId" "_taskObj" "_taskName" "_taskNameNorm" "_taskIntegrationProvider" "_taskIntegrationName" "_taskIntegrationNameNorm" "_taskIntegrationLink" "_taskIntegrationLastTracked" "_date" "_timezone" "_start" "_end" "_item" "_ratio" "_ratioTotal" "_count" "_quants" "_offsets" "_quant0" "_quant1" "_quant2"
filter[total]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[totalHours]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

prefilter[lastHour]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[outShift]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

prefilter[day]
string

"string" -- exact match

filter[tooManyHours]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[lateHours]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[outOfShiftWork]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[weekendWork]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[totalIssues]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[dailyIssues]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

prefilter[userId]
string

"string" -- exact match

prefilter[userObjPrePos]
string

"string" -- exact match

prefilter[userObjPos]
string

"string" -- exact match

prefilter[userName]
string

"string" -- exact match

prefilter[userNameNorm]
string

unknown API-defined value

prefilter[userArchived]
string

"string" -- exact match

prefilter[currentTagId]
string

"string" -- exact match

prefilter[currentTagObj]
string

"string" -- exact match

prefilter[currentTagName]
string

"string" -- exact match

prefilter[currentTagNameNorm]
string

"string" -- exact match

prefilter[projectId]
string

"string" -- exact match

prefilter[projectObj]
string

"string" -- exact match

prefilter[projectName]
string

"string" -- exact match

prefilter[projectNameNorm]
string

"string" -- exact match

prefilter[projectIntegrationProvider]
string

"string" -- exact match

prefilter[projectIntegrationName]
string

"string" -- exact match

prefilter[projectIntegrationNameNorm]
string

"string" -- exact match

prefilter[taskId]
string

"string" -- exact match

prefilter[taskObj]
string

"string" -- exact match

prefilter[taskName]
string

"string" -- exact match

prefilter[taskNameNorm]
string

"string" -- exact match

prefilter[taskIntegrationProvider]
string

"string" -- exact match

prefilter[taskIntegrationName]
string

"string" -- exact match

prefilter[taskIntegrationNameNorm]
string

"string" -- exact match

prefilter[taskIntegrationLink]
string

"string" -- exact match

prefilter[taskIntegrationLastTracked]
string

"ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

prefilter[date]
string

"ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

prefilter[timezone]
string

"string" -- exact match

prefilter[start]
string

"ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

prefilter[end]
string

"ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

prefilter[item]
string

"string" -- exact match

filter[ratio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[ratioTotal]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[count]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

prefilter[quants]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

prefilter[offsets]
string

"ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[quant0]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[quant1]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[quant2]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

ratio-page
string

if specified, page ID to get results for; or first page by default

ratio-limit
string

if specified, maximum number of items to be returned; or use API-specific hard limit by default

ratio-sort
string

which field to sort by, prepend it with "_" for descending sorting

Enum: "total" "totalHours" "lastHour" "outShift" "day" "tooManyHours" "lateHours" "outOfShiftWork" "weekendWork" "totalIssues" "dailyIssues" "userId" "userObjPrePos" "userObjPos" "userName" "userNameNorm" "userArchived" "currentTagId" "currentTagObj" "currentTagName" "currentTagNameNorm" "projectId" "projectObj" "projectName" "projectNameNorm" "projectIntegrationProvider" "projectIntegrationName" "projectIntegrationNameNorm" "taskId" "taskObj" "taskName" "taskNameNorm" "taskIntegrationProvider" "taskIntegrationName" "taskIntegrationNameNorm" "taskIntegrationLink" "taskIntegrationLastTracked" "date" "timezone" "start" "end" "item" "ratio" "ratioTotal" "count" "quants" "offsets" "quant0" "quant1" "quant2" "_total" "_totalHours" "_lastHour" "_outShift" "_day" "_tooManyHours" "_lateHours" "_outOfShiftWork" "_weekendWork" "_totalIssues" "_dailyIssues" "_userId" "_userObjPrePos" "_userObjPos" "_userName" "_userNameNorm" "_userArchived" "_currentTagId" "_currentTagObj" "_currentTagName" "_currentTagNameNorm" "_projectId" "_projectObj" "_projectName" "_projectNameNorm" "_projectIntegrationProvider" "_projectIntegrationName" "_projectIntegrationNameNorm" "_taskId" "_taskObj" "_taskName" "_taskNameNorm" "_taskIntegrationProvider" "_taskIntegrationName" "_taskIntegrationNameNorm" "_taskIntegrationLink" "_taskIntegrationLastTracked" "_date" "_timezone" "_start" "_end" "_item" "_ratio" "_ratioTotal" "_count" "_quants" "_offsets" "_quant0" "_quant1" "_quant2"
ratio-filter[total]
string

Prefilter ratio totals.

ratio-field
string

A field to specify for "ratio" paging. Default is first specified in "ratio" param

ratio-id
string

ID of ratio item for "ratio" paging. Default is top first in ratio array.

date-page
string

if specified, page ID to get results for; or first page by default

date-limit
string

if specified, maximum number of items to be returned; or use API-specific hard limit by default

Responses

Request samples

const fetch = require('node-fetch');

const query = new URLSearchParams({
  company: 'string',
  from: '2019-08-24T14:15:22Z',
  to: '2019-08-24T14:15:22Z',
  user: 'string',
  tag: 'string',
  task: 'string',
  unpaid: '0',
  breaks: 'all',
  fields: 'string',
  'group-by': 'string',
  resolve: 'string',
  ratio: 'string',
  level: 'company',
  timezone: 'string',
  period: 'days',
  interval: '1',
  page: 'string',
  limit: 'string',
  sort: 'total',
  'filter[total]': 'string',
  'filter[totalHours]': 'string',
  'prefilter[lastHour]': 'string',
  'filter[outShift]': 'string',
  'prefilter[day]': 'string',
  'filter[tooManyHours]': 'string',
  'filter[lateHours]': 'string',
  'filter[outOfShiftWork]': 'string',
  'filter[weekendWork]': 'string',
  'filter[totalIssues]': 'string',
  'filter[dailyIssues]': 'string',
  'prefilter[userId]': 'string',
  'prefilter[userObjPrePos]': 'string',
  'prefilter[userObjPos]': 'string',
  'prefilter[userName]': 'string',
  'prefilter[userNameNorm]': 'string',
  'prefilter[userArchived]': 'string',
  'prefilter[currentTagId]': 'string',
  'prefilter[currentTagObj]': 'string',
  'prefilter[currentTagName]': 'string',
  'prefilter[currentTagNameNorm]': 'string',
  'prefilter[projectId]': 'string',
  'prefilter[projectObj]': 'string',
  'prefilter[projectName]': 'string',
  'prefilter[projectNameNorm]': 'string',
  'prefilter[projectIntegrationProvider]': 'string',
  'prefilter[projectIntegrationName]': 'string',
  'prefilter[projectIntegrationNameNorm]': 'string',
  'prefilter[taskId]': 'string',
  'prefilter[taskObj]': 'string',
  'prefilter[taskName]': 'string',
  'prefilter[taskNameNorm]': 'string',
  'prefilter[taskIntegrationProvider]': 'string',
  'prefilter[taskIntegrationName]': 'string',
  'prefilter[taskIntegrationNameNorm]': 'string',
  'prefilter[taskIntegrationLink]': 'string',
  'prefilter[taskIntegrationLastTracked]': 'string',
  'prefilter[date]': 'string',
  'prefilter[timezone]': 'string',
  'prefilter[start]': 'string',
  'prefilter[end]': 'string',
  'prefilter[item]': 'string',
  'filter[ratio]': 'string',
  'filter[ratioTotal]': 'string',
  'filter[count]': 'string',
  'prefilter[quants]': 'string',
  'prefilter[offsets]': 'string',
  'filter[quant0]': 'string',
  'filter[quant1]': 'string',
  'filter[quant2]': 'string',
  'ratio-page': 'string',
  'ratio-limit': 'string',
  'ratio-sort': 'total',
  'ratio-filter[total]': 'string',
  'ratio-field': 'string',
  'ratio-id': 'string',
  'date-page': 'string',
  'date-limit': 'string'
}).toString();

const resp = await fetch(
  `https://api2.timedoctor.com/api/1.1/stats/timesheet/work-life?${query}`,
  {
    method: 'GET',
    headers: {
      Authorization: 'YOUR_API_KEY_HERE'
    }
  }
);

const data = await resp.text();
console.log(data);

Response samples

Content type
application/json
{
  • "data": { }
}

stats1_1_timesheetshift

Get shift stats/timesheet v1.1.
NOTE: This documentation uses ratio=score and sort=modeTotal as an example. As such, you can get responses that contain score and modeTotal, depending on the parameters you specify when making the request. It is important to understand that score will be replaced by the value you specify for the ratio param and modeTotal will be replaced by the value you specify for sort.

Authorizations:
ApiKeyAuth (apiKey)
query Parameters
company
required
string

ID of Company or Workspace, user refers to.

from
string <date-time>

ISO Date of range beginning (inclusive); (to minus 30mins) by default

to
string <date-time>

ISO Date of range ending (exclusive); current by default

user
string

Comma-separated list of User IDs yourself if omitted; all -- to get totals for workspace

tag
string

Comma-separated list of Tag IDs. If specified, users will be filtered by these tags

task
string

If specified, return only statistics on this task

unpaid
integer

If set to 1, includes unpaid time (from unpaid breaks) into report

breaks
string

Specifies breaks to get. This may not be combined with "task" parameter

Enum: "all" "paid" "unpaid"
fields
string

Optional comma-separated list of field names to return.

group-by
string

If specified, will group the results by given field (if such grouping is supported).

resolve
string

Optional comma-separated list of field names to resolve.

ratio
string

Optional comma-separated list of field names to get total ratio of.

level
string

Level of information ("user" by default)

Enum: "company" "user"
timezone
string

Timezone of ranges breaks. Etc/UTC by default

period
string
Default: "days"

Period unit of ranges subdivision. days by default

Enum: "minutes" "hours" "days" "months" "years"
interval
integer <int32> >= 1

Number of period units. 1 by default

page
string

if specified, page ID to get results for; or first page by default

limit
string

if specified, maximum number of items to be returned; or use API-specific hard limit by default

sort
string

which field to sort by, prepend it with "_" for descending sorting

Enum: "userId" "userObjPrePos" "userObjPos" "userName" "userNameNorm" "userArchived" "currentTagId" "currentTagObj" "currentTagName" "currentTagNameNorm" "projectId" "projectObj" "projectName" "projectNameNorm" "projectIntegrationProvider" "projectIntegrationName" "projectIntegrationNameNorm" "taskId" "taskObj" "taskName" "taskNameNorm" "taskIntegrationProvider" "taskIntegrationName" "taskIntegrationNameNorm" "taskIntegrationLink" "taskIntegrationLastTracked" "date" "timezone" "start" "end" "item" "ratio" "ratioTotal" "count" "quants" "offsets" "quant0" "quant1" "quant2" "total" "shiftId" "shiftObj" "shiftStart" "shiftEnd" "minHours" "_userId" "_userObjPrePos" "_userObjPos" "_userName" "_userNameNorm" "_userArchived" "_currentTagId" "_currentTagObj" "_currentTagName" "_currentTagNameNorm" "_projectId" "_projectObj" "_projectName" "_projectNameNorm" "_projectIntegrationProvider" "_projectIntegrationName" "_projectIntegrationNameNorm" "_taskId" "_taskObj" "_taskName" "_taskNameNorm" "_taskIntegrationProvider" "_taskIntegrationName" "_taskIntegrationNameNorm" "_taskIntegrationLink" "_taskIntegrationLastTracked" "_date" "_timezone" "_start" "_end" "_item" "_ratio" "_ratioTotal" "_count" "_quants" "_offsets" "_quant0" "_quant1" "_quant2" "_total" "_shiftId" "_shiftObj" "_shiftStart" "_shiftEnd" "_minHours"
prefilter[userId]
string

"string" -- exact match

prefilter[userObjPrePos]
string

"string" -- exact match

prefilter[userObjPos]
string

"string" -- exact match

prefilter[userName]
string

"string" -- exact match

prefilter[userNameNorm]
string

unknown API-defined value

prefilter[userArchived]
string

"string" -- exact match

prefilter[currentTagId]
string

"string" -- exact match

prefilter[currentTagObj]
string

"string" -- exact match

prefilter[currentTagName]
string

"string" -- exact match

prefilter[currentTagNameNorm]
string

"string" -- exact match

prefilter[projectId]
string

"string" -- exact match

prefilter[projectObj]
string

"string" -- exact match

prefilter[projectName]
string

"string" -- exact match

prefilter[projectNameNorm]
string

"string" -- exact match

prefilter[projectIntegrationProvider]
string

"string" -- exact match

prefilter[projectIntegrationName]
string

"string" -- exact match

prefilter[projectIntegrationNameNorm]
string

"string" -- exact match

prefilter[taskId]
string

"string" -- exact match

prefilter[taskObj]
string

"string" -- exact match

prefilter[taskName]
string

"string" -- exact match

prefilter[taskNameNorm]
string

"string" -- exact match

prefilter[taskIntegrationProvider]
string

"string" -- exact match

prefilter[taskIntegrationName]
string

"string" -- exact match

prefilter[taskIntegrationNameNorm]
string

"string" -- exact match

prefilter[taskIntegrationLink]
string

"string" -- exact match

prefilter[taskIntegrationLastTracked]
string

"ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

prefilter[date]
string

"ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

prefilter[timezone]
string

"string" -- exact match

prefilter[start]
string

"ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

prefilter[end]
string

"ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

prefilter[item]
string

"string" -- exact match

filter[ratio]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[ratioTotal]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[count]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

prefilter[quants]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

prefilter[offsets]
string

"ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[quant0]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[quant1]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[quant2]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[total]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

prefilter[shiftId]
string

"string" -- exact match

filter[shiftObj]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

prefilter[shiftStart]
string

"ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

prefilter[shiftEnd]
string

"ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[minHours]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

ratio-page
string

if specified, page ID to get results for; or first page by default

ratio-limit
string

if specified, maximum number of items to be returned; or use API-specific hard limit by default

ratio-sort
string

which field to sort by, prepend it with "_" for descending sorting

Enum: "userId" "userObjPrePos" "userObjPos" "userName" "userNameNorm" "userArchived" "currentTagId" "currentTagObj" "currentTagName" "currentTagNameNorm" "projectId" "projectObj" "projectName" "projectNameNorm" "projectIntegrationProvider" "projectIntegrationName" "projectIntegrationNameNorm" "taskId" "taskObj" "taskName" "taskNameNorm" "taskIntegrationProvider" "taskIntegrationName" "taskIntegrationNameNorm" "taskIntegrationLink" "taskIntegrationLastTracked" "date" "timezone" "start" "end" "item" "ratio" "ratioTotal" "count" "quants" "offsets" "quant0" "quant1" "quant2" "total" "shiftId" "shiftObj" "shiftStart" "shiftEnd" "minHours" "_userId" "_userObjPrePos" "_userObjPos" "_userName" "_userNameNorm" "_userArchived" "_currentTagId" "_currentTagObj" "_currentTagName" "_currentTagNameNorm" "_projectId" "_projectObj" "_projectName" "_projectNameNorm" "_projectIntegrationProvider" "_projectIntegrationName" "_projectIntegrationNameNorm" "_taskId" "_taskObj" "_taskName" "_taskNameNorm" "_taskIntegrationProvider" "_taskIntegrationName" "_taskIntegrationNameNorm" "_taskIntegrationLink" "_taskIntegrationLastTracked" "_date" "_timezone" "_start" "_end" "_item" "_ratio" "_ratioTotal" "_count" "_quants" "_offsets" "_quant0" "_quant1" "_quant2" "_total" "_shiftId" "_shiftObj" "_shiftStart" "_shiftEnd" "_minHours"
ratio-filter[total]
string

Prefilter ratio totals.

ratio-field
string

A field to specify for "ratio" paging. Default is first specified in "ratio" param

ratio-id
string

ID of ratio item for "ratio" paging. Default is top first in ratio array.

date-page
string

if specified, page ID to get results for; or first page by default

date-limit
string

if specified, maximum number of items to be returned; or use API-specific hard limit by default

Responses

Request samples

const fetch = require('node-fetch');

const query = new URLSearchParams({
  company: 'string',
  from: '2019-08-24T14:15:22Z',
  to: '2019-08-24T14:15:22Z',
  user: 'string',
  tag: 'string',
  task: 'string',
  unpaid: '0',
  breaks: 'all',
  fields: 'string',
  'group-by': 'string',
  resolve: 'string',
  ratio: 'string',
  level: 'company',
  timezone: 'string',
  period: 'days',
  interval: '1',
  page: 'string',
  limit: 'string',
  sort: 'userId',
  'prefilter[userId]': 'string',
  'prefilter[userObjPrePos]': 'string',
  'prefilter[userObjPos]': 'string',
  'prefilter[userName]': 'string',
  'prefilter[userNameNorm]': 'string',
  'prefilter[userArchived]': 'string',
  'prefilter[currentTagId]': 'string',
  'prefilter[currentTagObj]': 'string',
  'prefilter[currentTagName]': 'string',
  'prefilter[currentTagNameNorm]': 'string',
  'prefilter[projectId]': 'string',
  'prefilter[projectObj]': 'string',
  'prefilter[projectName]': 'string',
  'prefilter[projectNameNorm]': 'string',
  'prefilter[projectIntegrationProvider]': 'string',
  'prefilter[projectIntegrationName]': 'string',
  'prefilter[projectIntegrationNameNorm]': 'string',
  'prefilter[taskId]': 'string',
  'prefilter[taskObj]': 'string',
  'prefilter[taskName]': 'string',
  'prefilter[taskNameNorm]': 'string',
  'prefilter[taskIntegrationProvider]': 'string',
  'prefilter[taskIntegrationName]': 'string',
  'prefilter[taskIntegrationNameNorm]': 'string',
  'prefilter[taskIntegrationLink]': 'string',
  'prefilter[taskIntegrationLastTracked]': 'string',
  'prefilter[date]': 'string',
  'prefilter[timezone]': 'string',
  'prefilter[start]': 'string',
  'prefilter[end]': 'string',
  'prefilter[item]': 'string',
  'filter[ratio]': 'string',
  'filter[ratioTotal]': 'string',
  'filter[count]': 'string',
  'prefilter[quants]': 'string',
  'prefilter[offsets]': 'string',
  'filter[quant0]': 'string',
  'filter[quant1]': 'string',
  'filter[quant2]': 'string',
  'filter[total]': 'string',
  'prefilter[shiftId]': 'string',
  'filter[shiftObj]': 'string',
  'prefilter[shiftStart]': 'string',
  'prefilter[shiftEnd]': 'string',
  'filter[minHours]': 'string',
  'ratio-page': 'string',
  'ratio-limit': 'string',
  'ratio-sort': 'userId',
  'ratio-filter[total]': 'string',
  'ratio-field': 'string',
  'ratio-id': 'string',
  'date-page': 'string',
  'date-limit': 'string'
}).toString();

const resp = await fetch(
  `https://api2.timedoctor.com/api/1.1/stats/timesheet/shift?${query}`,
  {
    method: 'GET',
    headers: {
      Authorization: 'YOUR_API_KEY_HERE'
    }
  }
);

const data = await resp.text();
console.log(data);

Response samples

Content type
application/json
{
  • "data": { }
}

stats1_1_timesheetoutliers

Get outliers stats/timesheet v1.1.
NOTE: This documentation uses ratio=score and sort=modeTotal as an example. As such, you can get responses that contain score and modeTotal, depending on the parameters you specify when making the request. It is important to understand that score will be replaced by the value you specify for the ratio param and modeTotal will be replaced by the value you specify for sort.

Authorizations:
ApiKeyAuth (apiKey)
query Parameters
company
required
string

ID of Company or Workspace, user refers to.

from
string <date-time>

ISO Date of range beginning (inclusive); (to minus 30mins) by default

to
string <date-time>

ISO Date of range ending (exclusive); current by default

user
string

Comma-separated list of User IDs yourself if omitted; all -- to get totals for workspace

tag
string

Comma-separated list of Tag IDs. If specified, users will be filtered by these tags

task
string

If specified, return only statistics on this task

unpaid
integer

If set to 1, includes unpaid time (from unpaid breaks) into report

breaks
string

Specifies breaks to get. This may not be combined with "task" parameter

Enum: "all" "paid" "unpaid"
fields
string

Optional comma-separated list of field names to return.

group-by
string

If specified, will group the results by given field (if such grouping is supported).

resolve
string

Optional comma-separated list of field names to resolve.

ratio
string

Optional comma-separated list of field names to get total ratio of.

level
string

Level of information ("user" by default)

Enum: "company" "user"
timezone
string

Timezone of ranges breaks. Etc/UTC by default

period
string
Default: "days"

Period unit of ranges subdivision. days by default

Enum: "minutes" "hours" "days" "months" "years"
interval
integer <int32> >= 1

Number of period units. 1 by default

Responses

Request samples

const fetch = require('node-fetch');

const query = new URLSearchParams({
  company: 'string',
  from: '2019-08-24T14:15:22Z',
  to: '2019-08-24T14:15:22Z',
  user: 'string',
  tag: 'string',
  task: 'string',
  unpaid: '0',
  breaks: 'all',
  fields: 'string',
  'group-by': 'string',
  resolve: 'string',
  ratio: 'string',
  level: 'company',
  timezone: 'string',
  period: 'days',
  interval: '1'
}).toString();

const resp = await fetch(
  `https://api2.timedoctor.com/api/1.1/stats/timesheet/outliers?${query}`,
  {
    method: 'GET',
    headers: {
      Authorization: 'YOUR_API_KEY_HERE'
    }
  }
);

const data = await resp.text();
console.log(data);

Response samples

Content type
application/json
{
  • "data": { }
}

Files

files

getFiles

Get all files

Authorizations:
ApiKeyAuth (apiKey)
query Parameters
company
required
string

ID of Company or Workspace, user refers to.

user
string

Comma-separated list of user IDs, whose files to get; self by default

tag
string

Comma-separated list of tag IDs, whose users' files to get

page
string

if specified, page ID to get results for; or first page by default

limit
string

if specified, maximum number of items to be returned; or use API-specific hard limit by default

sort
string

which field to sort by, prepend it with "_" for descending sorting

Enum: "date" "entity" "avg-activity" "duplicate" "isBlured" "_date" "_entity" "_avg-activity" "_duplicate" "_isBlured"
filter[date]
string

"ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[entity]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[avg-activity]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[duplicate]
string

match string

filter[isBlured]
string

match string

Responses

Request samples

const fetch = require('node-fetch');

const query = new URLSearchParams({
  company: 'string',
  user: 'string',
  tag: 'string',
  page: 'string',
  limit: 'string',
  sort: 'date',
  'filter[date]': 'string',
  'filter[entity]': 'string',
  'filter[avg-activity]': 'string',
  'filter[duplicate]': 'string',
  'filter[isBlured]': 'string'
}).toString();

const resp = await fetch(
  `https://api2.timedoctor.com/api/1.0/files?${query}`,
  {
    method: 'GET',
    headers: {
      Authorization: 'YOUR_API_KEY_HERE'
    }
  }
);

const data = await resp.text();
console.log(data);

Response samples

Content type
application/json
{
  • "data": {
    },
  • "page": {
    }
}

deleteFiles

Delete user files

Authorizations:
ApiKeyAuth (apiKey)
query Parameters
company
required
string

ID of Company or Workspace, user refers to.

userId
required
string

ID of User, whose files to delete

from
required
string <date-time>

Start date (inclusive)

to
required
string <date-time>

End date (exclusive)

Responses

Request samples

const fetch = require('node-fetch');

const query = new URLSearchParams({
  company: 'string',
  userId: 'string',
  from: '2019-08-24T14:15:22Z',
  to: '2019-08-24T14:15:22Z'
}).toString();

const resp = await fetch(
  `https://api2.timedoctor.com/api/1.0/files?${query}`,
  {
    method: 'DELETE',
    headers: {
      Authorization: 'YOUR_API_KEY_HERE'
    }
  }
);

const data = await resp.text();
console.log(data);

Response samples

Content type
application/json
{ }

getTypeFiles

Get files by type

Authorizations:
ApiKeyAuth (apiKey)
path Parameters
type
required
string

File type

Enum: "file" "screenshot" "video"
query Parameters
company
required
string

ID of Company or Workspace, user refers to.

user
string

Comma-separated list of user IDs, whose files to get; self by default

tag
string

Comma-separated list of tag IDs, whose users' files to get

page
string

if specified, page ID to get results for; or first page by default

limit
string

if specified, maximum number of items to be returned; or use API-specific hard limit by default

sort
string

which field to sort by, prepend it with "_" for descending sorting

Enum: "date" "entity" "avg-activity" "duplicate" "isBlured" "_date" "_entity" "_avg-activity" "_duplicate" "_isBlured"
filter[date]
string

"ISO_date" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[entity]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[avg-activity]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[duplicate]
string

match string

filter[isBlured]
string

match string

Responses

Request samples

const fetch = require('node-fetch');

const query = new URLSearchParams({
  company: 'string',
  user: 'string',
  tag: 'string',
  page: 'string',
  limit: 'string',
  sort: 'date',
  'filter[date]': 'string',
  'filter[entity]': 'string',
  'filter[avg-activity]': 'string',
  'filter[duplicate]': 'string',
  'filter[isBlured]': 'string'
}).toString();

const type = 'YOUR_type_PARAMETER';
const resp = await fetch(
  `https://api2.timedoctor.com/api/1.0/files/${type}?${query}`,
  {
    method: 'GET',
    headers: {
      Authorization: 'YOUR_API_KEY_HERE'
    }
  }
);

const data = await resp.text();
console.log(data);

Response samples

Content type
application/json
{
  • "data": {
    },
  • "page": {
    }
}

getSignedUrl

Get signed URL

Authorizations:
ApiKeyAuth (apiKey)
path Parameters
type
required
string

File type

Enum: "file" "screenshot" "video"
date
required
string <date-time>

File date

number
required
integer

File number

query Parameters
company
required
string

ID of Company or Workspace, user refers to.

Responses

Request samples

const fetch = require('node-fetch');

const query = new URLSearchParams({company: 'string'}).toString();

const type = 'YOUR_type_PARAMETER';
const date = 'YOUR_date_PARAMETER';
const number = 'YOUR_number_PARAMETER';
const resp = await fetch(
  `https://api2.timedoctor.com/api/1.1/files/${type}/signed-url/${date}/${number}?${query}`,
  {
    method: 'GET',
    headers: {
      Authorization: 'YOUR_API_KEY_HERE'
    }
  }
);

const data = await resp.text();
console.log(data);

Response samples

Content type
application/json
{
  • "data": {
    }
}

putFile

Ensure file entry

Authorizations:
ApiKeyAuth (apiKey)
path Parameters
type
required
string

File type

Enum: "file" "screenshot" "video"
date
required
string <date-time>

File date

number
required
integer

File number

query Parameters
company
required
string

ID of Company or Workspace, user refers to.

Request Body schema: application/json
contentType
string

MIME type of file

blur
boolean

Blurred image

chunkId
string <full-date>

Time chunk the file was created in

clicks
integer <int32>
movements
integer <int32>
keys
integer <int32>
period
integer <int32>
imageSize
integer <int32>
imageMd5
string
createdAt
string <full-date>

Time the file was created

h
integer <int32>
w
integer <int32>
projectId
string
taskId
string
screenNumber
integer <int32>
type
string

Responses

Request samples

Content type
application/json
{
  • "contentType": "string",
  • "blur": true,
  • "chunkId": "string",
  • "clicks": 0,
  • "movements": 0,
  • "keys": 0,
  • "period": 0,
  • "imageSize": 0,
  • "imageMd5": "string",
  • "createdAt": "string",
  • "h": 0,
  • "w": 0,
  • "projectId": "string",
  • "taskId": "string",
  • "screenNumber": 0,
  • "type": "string"
}

Response samples

Content type
application/json
{
  • "data": { }
}

deleteFile

Delete file entry

Authorizations:
ApiKeyAuth (apiKey)
path Parameters
type
required
string

File type

Enum: "file" "screenshot" "video"
date
required
string <date-time>

File date

number
required
integer

File number

query Parameters
company
required
string

ID of Company or Workspace, user refers to.

Responses

Request samples

const fetch = require('node-fetch');

const query = new URLSearchParams({company: 'string'}).toString();

const type = 'YOUR_type_PARAMETER';
const date = 'YOUR_date_PARAMETER';
const number = 'YOUR_number_PARAMETER';
const resp = await fetch(
  `https://api2.timedoctor.com/api/1.0/files/${type}/${date}/${number}?${query}`,
  {
    method: 'DELETE',
    headers: {
      Authorization: 'YOUR_API_KEY_HERE'
    }
  }
);

const data = await resp.text();
console.log(data);

Response samples

Content type
application/json
{
  • "data": { }
}

Categories

Under this section, you can get / update / assign productivity ratings for users or groups

Entity class parameter is an enum class and can have the following values "default","none","app","title","URL","domain","keyword"

Score parameters are categorized as below

4 = Productive
3 = Neutral
2 = Unproductive
0 = Unrated

resolveCategories

Resolve categories by IDs

Authorizations:
ApiKeyAuth (apiKey)
query Parameters
company
required
string

ID of Company or Workspace, user refers to.

ids
required
string

Comma-separated list of Category IDs to resolve

Responses

Request samples

const fetch = require('node-fetch');

const query = new URLSearchParams({
  company: 'string',
  ids: 'string'
}).toString();

const resp = await fetch(
  `https://api2.timedoctor.com/api/1.0/categories/resolve?${query}`,
  {
    method: 'GET',
    headers: {
      Authorization: 'YOUR_API_KEY_HERE'
    }
  }
);

const data = await resp.text();
console.log(data);

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "page": {
    }
}

categories

Get list of used categories in company

Authorizations:
ApiKeyAuth (apiKey)
query Parameters
company
string

If specified, ID of Company or Workspace, user refers to. If omitted, the operation refers to global

global-unrated
string

If specified, returns only items which unrated both in company and in global scopes

Enum: "true" "false"
page
string

if specified, page ID to get results for; or first page by default

limit
string

if specified, maximum number of items to be returned; or use API-specific hard limit by default

sort
string

which field to sort by, prepend it with "_" for descending sorting

Enum: "time" "name" "entity" "score" "_time" "_name" "_entity" "_score"
filter[time]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[name]
string

"string" -- exact match

filter[entity]
string

predefined value

filter[score]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

Responses

Request samples

const fetch = require('node-fetch');

const query = new URLSearchParams({
  company: 'string',
  'global-unrated': 'true',
  page: 'string',
  limit: 'string',
  sort: 'time',
  'filter[time]': 'string',
  'filter[name]': 'string',
  'filter[entity]': 'string',
  'filter[score]': 'string'
}).toString();

const resp = await fetch(
  `https://api2.timedoctor.com/api/1.0/categories?${query}`,
  {
    method: 'GET',
    headers: {
      Authorization: 'YOUR_API_KEY_HERE'
    }
  }
);

const data = await resp.text();
console.log(data);

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "page": {
    }
}

setCategory

Set category on company

Authorizations:
ApiKeyAuth (apiKey)
query Parameters
company
string

If specified, ID of Company or Workspace, user refers to. If omitted, the operation refers to global

Request Body schema: application/json
id
string

Category ID

entity
string

Entity class

name
string

Entity name

score
number

Score as number 2 to 4 or null

standardActiveSecRatio
number

number in 0...1, used to override the standard active-to-total seconds ratio, used to calculate average activity per app

Responses

Request samples

Content type
application/json
{
  • "id": "string",
  • "entity": "string",
  • "name": "string",
  • "score": 0,
  • "standardActiveSecRatio": 0
}

Response samples

Content type
application/json
{
  • "data": { }
}

userCategories

Get list of used categories by user

Authorizations:
ApiKeyAuth (apiKey)
path Parameters
userId
required
string

ID of User

query Parameters
company
required
string

ID of Company or Workspace, user refers to.

page
string

if specified, page ID to get results for; or first page by default

limit
string

if specified, maximum number of items to be returned; or use API-specific hard limit by default

sort
string

which field to sort by, prepend it with "_" for descending sorting

Enum: "time" "name" "entity" "score" "_time" "_name" "_entity" "_score"
filter[time]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[name]
string

"string" -- exact match

filter[entity]
string

predefined value

filter[score]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

Responses

Request samples

const fetch = require('node-fetch');

const query = new URLSearchParams({
  company: 'string',
  page: 'string',
  limit: 'string',
  sort: 'time',
  'filter[time]': 'string',
  'filter[name]': 'string',
  'filter[entity]': 'string',
  'filter[score]': 'string'
}).toString();

const userId = 'YOUR_userId_PARAMETER';
const resp = await fetch(
  `https://api2.timedoctor.com/api/1.0/categories/user/${userId}?${query}`,
  {
    method: 'GET',
    headers: {
      Authorization: 'YOUR_API_KEY_HERE'
    }
  }
);

const data = await resp.text();
console.log(data);

Response samples

Content type
application/json
{
  • "data": {
    }
}

setUserCategory

Set category on user

Authorizations:
ApiKeyAuth (apiKey)
path Parameters
userId
required
string

ID of User

query Parameters
company
required
string

ID of Company or Workspace, user refers to.

Request Body schema: application/json
id
required
string

Category ID

entity
required
string

Entity class

name
required
string

Entity name

score
number

Score as number 2 to 4 or null

Responses

Request samples

Content type
application/json
{
  • "id": "string",
  • "entity": "string",
  • "name": "string",
  • "score": 0
}

Response samples

Content type
application/json
{
  • "data": { }
}

getUnratedCategories

Get a count of un-used categories in company

Authorizations:
ApiKeyAuth (apiKey)

Responses

Request samples

const fetch = require('node-fetch');

const resp = await fetch(
  `https://api2.timedoctor.com/api/1.0/categories/unrated-count`,
  {
    method: 'GET',
    headers: {
      Authorization: 'YOUR_API_KEY_HERE'
    }
  }
);

const data = await resp.text();
console.log(data);

Response samples

Content type
application/json
{
  • "data": {
    },
  • "page": {
    }
}

Groups (Tags)

Creating groups, adding managers and people to groups, updating and deleting groups

tags

Get a list of all the groups (tags) in company

Authorizations:
ApiKeyAuth (apiKey)
query Parameters
company
required
string

ID of Company or Workspace, user refers to.

Responses

Request samples

const fetch = require('node-fetch');

const query = new URLSearchParams({company: 'string'}).toString();

const resp = await fetch(
  `https://api2.timedoctor.com/api/1.0/tags?${query}`,
  {
    method: 'GET',
    headers: {
      Authorization: 'YOUR_API_KEY_HERE'
    }
  }
);

const data = await resp.text();
console.log(data);

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "page": {
    }
}

newTag

Create a group (tag)

Authorizations:
ApiKeyAuth (apiKey)
query Parameters
company
required
string

ID of Company or Workspace, user refers to.

Request Body schema: application/json
name
string

Group (Tag) name

description
string

Group (Tag) description

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "description": "string"
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

tag

Get details of a group (tag)

Authorizations:
ApiKeyAuth (apiKey)
path Parameters
tagId
required
string

ID of Group (Tag)

query Parameters
company
required
string

ID of Company or Workspace, user refers to.

Responses

Request samples

const fetch = require('node-fetch');

const query = new URLSearchParams({company: 'string'}).toString();

const tagId = 'YOUR_tagId_PARAMETER';
const resp = await fetch(
  `https://api2.timedoctor.com/api/1.0/tags/${tagId}?${query}`,
  {
    method: 'GET',
    headers: {
      Authorization: 'YOUR_API_KEY_HERE'
    }
  }
);

const data = await resp.text();
console.log(data);

Response samples

Content type
application/json
{
  • "data": {
    }
}

putTag

Modify details of a group (tag)

Authorizations:
ApiKeyAuth (apiKey)
path Parameters
tagId
required
string

ID of Group (Tag)

query Parameters
company
required
string

ID of Company or Workspace, user refers to.

Request Body schema: application/json
name
string

Group (Tag) name

description
string

Group (Tag) description

active
boolean

Is group (tag) active? Not active means archived

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "description": "string",
  • "active": true
}

Response samples

Content type
application/json
{
  • "data": { }
}

deleteTag

Delete a group (tag)

Authorizations:
ApiKeyAuth (apiKey)
path Parameters
tagId
required
string

ID of Group (Tag)

query Parameters
company
required
string

ID of Company or Workspace, user refers to.

deleted
string

Operate on an archived group (tag)

Enum: "true" "false"

Responses

Request samples

const fetch = require('node-fetch');

const query = new URLSearchParams({
  company: 'string',
  deleted: 'true'
}).toString();

const tagId = 'YOUR_tagId_PARAMETER';
const resp = await fetch(
  `https://api2.timedoctor.com/api/1.0/tags/${tagId}?${query}`,
  {
    method: 'DELETE',
    headers: {
      Authorization: 'YOUR_API_KEY_HERE'
    }
  }
);

const data = await resp.text();
console.log(data);

Response samples

Content type
application/json
{
  • "data": { }
}

newTagManager

Add a manager to a group (tag)

Authorizations:
ApiKeyAuth (apiKey)
path Parameters
tagId
required
string

ID of Group (Tag)

query Parameters
company
required
string

ID of Company or Workspace, user refers to.

Request Body schema: application/json
userId
required
string

ID of the group manager

Responses

Request samples

Content type
application/json
{
  • "userId": "string"
}

Response samples

Content type
application/json
{
  • "data": { }
}

deleteTagManager

Remove a manager from a group (tag)

Authorizations:
ApiKeyAuth (apiKey)
path Parameters
tagId
required
string

ID of Group (Tag)

userId
required
string

ID of the group manager

query Parameters
company
required
string

ID of Company or Workspace, user refers to.

Responses

Request samples

const fetch = require('node-fetch');

const query = new URLSearchParams({company: 'string'}).toString();

const tagId = 'YOUR_tagId_PARAMETER';
const userId = 'YOUR_userId_PARAMETER';
const resp = await fetch(
  `https://api2.timedoctor.com/api/1.0/tags/${tagId}/managers/${userId}?${query}`,
  {
    method: 'DELETE',
    headers: {
      Authorization: 'YOUR_API_KEY_HERE'
    }
  }
);

const data = await resp.text();
console.log(data);

Response samples

Content type
application/json
{
  • "data": { }
}

newUserTag

Make a user a group member

Authorizations:
ApiKeyAuth (apiKey)
path Parameters
userId
required
string

ID of User (me or empty means caller)

query Parameters
company
required
string

ID of Company or Workspace, user refers to.

Request Body schema: application/json
tagId
string

ID of Tag

Responses

Request samples

Content type
application/json
{
  • "tagId": "string"
}

Response samples

Content type
application/json
{
  • "data": { }
}

deleteUserTag

Remove a user as a group member

Authorizations:
ApiKeyAuth (apiKey)
path Parameters
userId
required
string

ID of User (me or empty means caller)

tagId
required
string

ID of Tag

query Parameters
company
required
string

ID of Company or Workspace, user refers to.

Responses

Request samples

const fetch = require('node-fetch');

const query = new URLSearchParams({company: 'string'}).toString();

const userId = 'YOUR_userId_PARAMETER';
const tagId = 'YOUR_tagId_PARAMETER';
const resp = await fetch(
  `https://api2.timedoctor.com/api/1.0/users/${userId}/tags/${tagId}?${query}`,
  {
    method: 'DELETE',
    headers: {
      Authorization: 'YOUR_API_KEY_HERE'
    }
  }
);

const data = await resp.text();
console.log(data);

Response samples

Content type
application/json
{ }

WorkSchedules

work schedules

getWorkSchedules

Schedules are returned by a stream. If you request a really large amount of data, it is best to connect the response to a stream handler. Requesting long ranges with large data over HTTP will have a large amount data get dumped as the request handler will assemble the entire stream of data into an array before showing you any response.

Authorizations:
ApiKeyAuth (apiKey)
query Parameters
company
required
string

ID of Company or Workspace, user refers to.

user
string

Comma-separated list of user IDs

from
required
string

The start time of the schedule

to
required
string

The end time of the schedule

work-range
number

The work range of the schedule

leave-type
string

If specified, comma-separated list of leave types to resolve

approved
string

Approved/Disapprved schedules

Enum: "pending" "approved" "disapproved"
resolve-names
boolean
Default: false

include reviewer name & user name

include-auto-approved
boolean
Default: true

include auto approved edit time records

page
string

if specified, page ID to get results for; or first page by default

limit
string

if specified, maximum number of items to be returned; or use API-specific hard limit by default

sort
string

which field to sort by, prepend it with "_" for descending sorting

Enum: "start" "leaveType" "_start" "_leaveType"
filter[start]
string

"string" -- exact match

filter[leaveType]
string

"string" -- exact match

Enum: "paidLeave" "unpaidLeave"

Responses

Request samples

const fetch = require('node-fetch');

const query = new URLSearchParams({
  company: 'string',
  user: 'string',
  from: 'string',
  to: 'string',
  'work-range': '0',
  'leave-type': 'string',
  approved: 'pending',
  'resolve-names': 'false',
  'include-auto-approved': 'true',
  page: 'string',
  limit: 'string',
  sort: 'start',
  'filter[start]': 'string',
  'filter[leaveType]': 'paidLeave'
}).toString();

const resp = await fetch(
  `https://api2.timedoctor.com/api/1.0/work-schedules?${query}`,
  {
    method: 'GET',
    headers: {
      Authorization: 'YOUR_API_KEY_HERE'
    }
  }
);

const data = await resp.text();
console.log(data);

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "page": {
    }
}

putWorkSchedules

Payload for work schedules. The API streams the responses. Over HTTP, the connection might hangup if you send too many schedules. If you have large schedules to send, split the schedules and send them in chunks. Send about 30k (approximately 1 year schedule for 100 users) per chunk.

Ensure you sent only valid schedules in a serial order. The API will throw an 
error if an invalid schedule is set or the schedule is not in a serial order or 
if an invalid schedule is included.

Hint: to add single shift, please set duplicate the "from" and "to" in query params
from array in body
Authorizations:
ApiKeyAuth (apiKey)
query Parameters
company
required
string

ID of Company or Workspace, user refers to.

from
required
string

The start time of the schedule

to
required
string

The end time of the schedule

Request Body schema: application/json
Array ()
userId
required
string

Id of the user who has the schedule

schedules
required
Array of Array of strings

An array of tuples in the format [startTime, endTime, minimumHours, leaveType, reason]. Minimum hours and leaveType are optional

Responses

Request samples

Content type
application/json
[
  • {
    }
]

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "ignored": [
    ]
}

getWorkSchedule

Get a single schedule

Authorizations:
ApiKeyAuth (apiKey)
path Parameters
id
required
string

id of the work schedule

query Parameters
company
required
string

ID of Company or Workspace, user refers to.

Responses

Request samples

const fetch = require('node-fetch');

const query = new URLSearchParams({company: 'string'}).toString();

const id = 'YOUR_id_PARAMETER';
const resp = await fetch(
  `https://api2.timedoctor.com/api/1.0/work-schedules/${id}?${query}`,
  {
    method: 'GET',
    headers: {
      Authorization: 'YOUR_API_KEY_HERE'
    }
  }
);

const data = await resp.text();
console.log(data);

Response samples

Content type
application/json
{
  • "data": {
    }
}

putWorkSchedule

Update a single schedule

Authorizations:
ApiKeyAuth (apiKey)
path Parameters
id
required
string

id of the work schedule

query Parameters
company
required
string

ID of Company or Workspace, user refers to.

Request Body schema: application/json
approved
required
string

Approve/Disapproved the leave type schedule

Enum: "pending" "approved" "disapproved"

Responses

Request samples

Content type
application/json
{
  • "approved": "pending"
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

deleteWorkSchedule

Delete a single schedule

Authorizations:
ApiKeyAuth (apiKey)
path Parameters
id
required
string

id of the work schedule

query Parameters
company
required
string

ID of Company or Workspace, user refers to.

Responses

Request samples

const fetch = require('node-fetch');

const query = new URLSearchParams({company: 'string'}).toString();

const id = 'YOUR_id_PARAMETER';
const resp = await fetch(
  `https://api2.timedoctor.com/api/1.0/work-schedules/${id}?${query}`,
  {
    method: 'DELETE',
    headers: {
      Authorization: 'YOUR_API_KEY_HERE'
    }
  }
);

const data = await resp.text();
console.log(data);

Response samples

Content type
application/json
{ }

getWorkSchedulesIssues

Get work-schedules issues for Executive Dashboard widgets

Authorizations:
ApiKeyAuth (apiKey)
query Parameters
company
required
string

ID of Company or Workspace, user refers to.

user
string

Comma-separated list of user IDs or special value [all|managed][-self][-on-reports]

tag
string

Comma-separated list of tag IDs

from
required
string

The start time of the schedule

to
required
string

The end time of the schedule

group-by
string

Group by field

Enum: "currentTagId" "userId"
all-users-tag
string

include allUserTagId into results

Enum: "0" "1"

Responses

Request samples

const fetch = require('node-fetch');

const query = new URLSearchParams({
  company: 'string',
  user: 'string',
  tag: 'string',
  from: 'string',
  to: 'string',
  'group-by': 'currentTagId',
  'all-users-tag': '0'
}).toString();

const resp = await fetch(
  `https://api2.timedoctor.com/api/1.0/work-schedules/issues?${query}`,
  {
    method: 'GET',
    headers: {
      Authorization: 'YOUR_API_KEY_HERE'
    }
  }
);

const data = await resp.text();
console.log(data);

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "page": {
    }
}

getLeaveStats

total leave count and approved leave count

Authorizations:
ApiKeyAuth (apiKey)
query Parameters
company
required
string

ID of Company or Workspace, user refers to.

user
string

Comma-separated list of user IDs

from
required
string

The start time of the schedule

to
required
string

The end time of the schedule

work-range
number

The work range of the schedule

leave-type
string

If specified, comma-separated list of leave types to resolve

approved
string

Approved/Disapprved schedules

Enum: "pending" "approved" "disapproved"
resolve-names
boolean
Default: false

include reviewer name & user name

include-auto-approved
boolean
Default: true

include auto approved edit time records

page
string

if specified, page ID to get results for; or first page by default

limit
string

if specified, maximum number of items to be returned; or use API-specific hard limit by default

sort
string

which field to sort by, prepend it with "_" for descending sorting

Enum: "start" "leaveType" "_start" "_leaveType"
filter[start]
string

"string" -- exact match

filter[leaveType]
string

"string" -- exact match

Enum: "paidLeave" "unpaidLeave"

Responses

Request samples

const fetch = require('node-fetch');

const query = new URLSearchParams({
  company: 'string',
  user: 'string',
  from: 'string',
  to: 'string',
  'work-range': '0',
  'leave-type': 'string',
  approved: 'pending',
  'resolve-names': 'false',
  'include-auto-approved': 'true',
  page: 'string',
  limit: 'string',
  sort: 'start',
  'filter[start]': 'string',
  'filter[leaveType]': 'paidLeave'
}).toString();

const resp = await fetch(
  `https://api2.timedoctor.com/api/1.0/work-schedules/stats?${query}`,
  {
    method: 'GET',
    headers: {
      Authorization: 'YOUR_API_KEY_HERE'
    }
  }
);

const data = await resp.text();
console.log(data);

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "page": {
    }
}

Notifications

user notifications

getUserNotifications

get user notifications

Authorizations:
ApiKeyAuth (apiKey)
query Parameters
company
required
string

ID of Company or Workspace, user refers to.

page
string

if specified, page ID to get results for; or first page by default

limit
string

if specified, maximum number of items to be returned; or use API-specific hard limit by default

sort
string

which field to sort by, prepend it with "_" for descending sorting

Enum: "name" "active" "notifyType" "recipientId" "user" "pricingPlan" "isDEN" "_name" "_active" "_notifyType" "_recipientId" "_user" "_pricingPlan" "_isDEN"
filter[name]
string

"string" -- starts with

filter[active]
boolean

boolean value

filter[notifyType]
string

"string" -- exact match

Enum: "daily" "realtime" "weekly"
filter[recipientId]
string

"string" -- exact match

filter[user]
string

"string" -- exact match

filter[pricingPlan]
string

"string" -- exact match

filter[isDEN]
boolean

boolean value

Responses

Request samples

const fetch = require('node-fetch');

const query = new URLSearchParams({
  company: 'string',
  page: 'string',
  limit: 'string',
  sort: 'name',
  'filter[name]': 'string',
  'filter[active]': 'true',
  'filter[notifyType]': 'daily',
  'filter[recipientId]': 'string',
  'filter[user]': 'string',
  'filter[pricingPlan]': 'string',
  'filter[isDEN]': 'true'
}).toString();

const resp = await fetch(
  `https://api2.timedoctor.com/api/1.0/notifications?${query}`,
  {
    method: 'GET',
    headers: {
      Authorization: 'YOUR_API_KEY_HERE'
    }
  }
);

const data = await resp.text();
console.log(data);

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "page": {
    }
}

createUserNotification

Create user notification

Authorizations:
ApiKeyAuth (apiKey)
query Parameters
company
required
string

ID of Company or Workspace, user refers to.

Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{
  • "notification": {
    }
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

getUserNotificationDetails

get notification details

Authorizations:
ApiKeyAuth (apiKey)
path Parameters
notificationId
required
string

ID of notification

query Parameters
company
required
string

ID of Company or Workspace, user refers to.

Responses

Request samples

const fetch = require('node-fetch');

const query = new URLSearchParams({company: 'string'}).toString();

const notificationId = 'YOUR_notificationId_PARAMETER';
const resp = await fetch(
  `https://api2.timedoctor.com/api/1.0/notifications/${notificationId}?${query}`,
  {
    method: 'GET',
    headers: {
      Authorization: 'YOUR_API_KEY_HERE'
    }
  }
);

const data = await resp.text();
console.log(data);

Response samples

Content type
application/json
{
  • "data": {
    }
}

updateUserNotification

Update user notification

Authorizations:
ApiKeyAuth (apiKey)
path Parameters
notificationId
required
string

ID of notification

query Parameters
company
required
string

ID of Company or Workspace, user refers to.

Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{
  • "notification": {
    }
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

subscribeUserNotification

Subscribe user notification

Authorizations:
ApiKeyAuth (apiKey)
path Parameters
notificationId
required
string

ID of notification

query Parameters
company
required
string

ID of Company or Workspace, user refers to.

Request Body schema: application/json
recipientIds
required
Array of strings

List of notification recipient ids

Responses

Request samples

Content type
application/json
{
  • "recipientIds": [
    ]
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

subscribeUserNotification

Subscribe user notification

Authorizations:
ApiKeyAuth (apiKey)
path Parameters
notificationId
required
string

ID of notification

query Parameters
company
required
string

ID of Company or Workspace, user refers to.

Request Body schema: application/json
recipientIds
required
Array of strings

List of notification recipient ids

Responses

Request samples

Content type
application/json
{
  • "recipientIds": [
    ]
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

Breaks

Paid/Unpaid Breaks

getBreaks

get breaks

Authorizations:
ApiKeyAuth (apiKey)
query Parameters
company
required
string

ID of Company or Workspace, user refers to.

page
string

if specified, page ID to get results for; or first page by default

limit
string

if specified, maximum number of items to be returned; or use API-specific hard limit by default

sort
string

which field to sort by, prepend it with "_" for descending sorting

Enum: "name" "type" "breakLimit" "keywords" "_name" "_type" "_breakLimit" "_keywords"
filter[name]
string

"string" -- starts with

filter[type]
string

"string" -- starts with

filter[breakLimit]
string

"number" -- exact match; or "from_to" -- inclusive range; or "from_"; or "_to"

filter[keywords]
string

set of keywords to be matched

page
string

if specified, page ID to get results for; or first page by default

limit
string

if specified, maximum number of items to be returned; or use API-specific hard limit by default

sort
string

which field to sort by, prepend it with "_" for descending sorting

Enum: "keyphrase" "_keyphrase"
filter[keyphrase]
string

A keyphrase for searching by keywords

assigned
boolean

return only the breaks assigned to the user

Responses

Request samples

const fetch = require('node-fetch');

const query = new URLSearchParams({
  company: 'string',
  page: ['string', 'string'],
  limit: ['string', 'string'],
  sort: ['name', 'keyphrase'],
  'filter[name]': 'string',
  'filter[type]': 'string',
  'filter[breakLimit]': 'string',
  'filter[keywords]': 'string',
  'filter[keyphrase]': 'string',
  assigned: 'true'
}).toString();

const resp = await fetch(
  `https://api2.timedoctor.com/api/1.0/breaks?${query}`,
  {
    method: 'GET',
    headers: {
      Authorization: 'YOUR_API_KEY_HERE'
    }
  }
);

const data = await resp.text();
console.log(data);

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "page": {
    }
}

createBreak

Create break

Authorizations:
ApiKeyAuth (apiKey)
query Parameters
company
required
string

ID of Company or Workspace, user refers to.

Request Body schema: application/json
name
required
string

Name of the break

type
required
string

Type of break

Enum: "paid" "unpaid"
active
boolean

Whether the break is active

public
boolean

Is the break access without limitation

access
Array of strings

IDs of users or tags to allow access to

scope
string

Scope of access fields

Enum: "user" "tag" "company"
breakLimit
integer [ 1 .. 1440 ]

Break limit in minutes (max 24 hours).

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "type": "paid",
  • "active": true,
  • "public": true,
  • "access": [
    ],
  • "scope": "user",
  • "breakLimit": 1
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

getBreakDetails

get break details

Authorizations:
ApiKeyAuth (apiKey)
path Parameters
breakId
required
string

ID of break

query Parameters
company
required
string

ID of Company or Workspace, user refers to.

Responses

Request samples

const fetch = require('node-fetch');

const query = new URLSearchParams({company: 'string'}).toString();

const breakId = 'YOUR_breakId_PARAMETER';
const resp = await fetch(
  `https://api2.timedoctor.com/api/1.0/breaks/${breakId}?${query}`,
  {
    method: 'GET',
    headers: {
      Authorization: 'YOUR_API_KEY_HERE'
    }
  }
);

const data = await resp.text();
console.log(data);

Response samples

Content type
application/json
{
  • "data": {
    }
}

updateBreak

Update break

Authorizations:
ApiKeyAuth (apiKey)
path Parameters
breakId
required
string

ID of break

query Parameters
company
required
string

ID of Company or Workspace, user refers to.

Request Body schema: application/json
name
required
string

Name of the break

type
required
string

Type of break

Enum: "paid" "unpaid"
active
boolean

Whether the break is active

public
boolean

Is the break access without limitation

access
Array of strings

IDs of users or tags to allow access to

scope
string

Scope of access fields

Enum: "user" "tag" "company"
breakLimit
integer [ 1 .. 1440 ]

Break limit in minutes (max 24 hours).

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "type": "paid",
  • "active": true,
  • "public": true,
  • "access": [
    ],
  • "scope": "user",
  • "breakLimit": 1
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

deleteBreak

delete break

Authorizations:
ApiKeyAuth (apiKey)
path Parameters
breakId
required
string

ID of break

query Parameters
company
required
string

ID of Company or Workspace, user refers to.

Responses

Request samples

const fetch = require('node-fetch');

const query = new URLSearchParams({company: 'string'}).toString();

const breakId = 'YOUR_breakId_PARAMETER';
const resp = await fetch(
  `https://api2.timedoctor.com/api/1.0/breaks/${breakId}?${query}`,
  {
    method: 'DELETE',
    headers: {
      Authorization: 'YOUR_API_KEY_HERE'
    }
  }
);

const data = await resp.text();
console.log(data);

Response samples

Content type
application/json
{ }

Payroll

payrolls

Get list of user payrolls

Authorizations:
ApiKeyAuth (apiKey)
query Parameters
company
required
string

ID of Company or Workspace, user refers to.

from
string <date>

Starting date of stats for payroll

to
string <date>

Ending date of stats for payroll

tag
string

Tag IDs

Responses

Request samples

const fetch = require('node-fetch');

const query = new URLSearchParams({
  company: 'string',
  from: '2019-08-24',
  to: '2019-08-24',
  tag: 'string'
}).toString();

const resp = await fetch(
  `https://api2.timedoctor.com/api/1.0/users/payroll?${query}`,
  {
    method: 'GET',
    headers: {
      Authorization: 'YOUR_API_KEY_HERE'
    }
  }
);

const data = await resp.text();
console.log(data);

Response samples

Content type
application/json
{
  • "data": [ ],
  • "page": {
    }
}

putPayroll

Modify payroll details of a user

Authorizations:
ApiKeyAuth (apiKey)
path Parameters
userId
required
string

ID of User

query Parameters
company
required
string

ID of Company or Workspace, user refers to.

Request Body schema: application/json
id
required
string

User ID

currency
string

Currency ID (f.x. USD)

adjustment
number

Absolute adjustment value

payRate
number

Pay rate multiplier

payMethod
string

Payment method ID string, if enabled in payroll company setting

payIdentifier
number

Total time in seconds

hourlyLimit
number

Hourly limit in hours

hourlyLimitRange
string

Eg => weekday, period, or perday

Responses

Request samples

Content type
application/json
{
  • "id": "string",
  • "currency": "string",
  • "adjustment": 0,
  • "payRate": 0,
  • "payMethod": "string",
  • "payIdentifier": 0,
  • "hourlyLimit": 0,
  • "hourlyLimitRange": "string"
}

Response samples

Content type
application/json
{
  • "data": { }
}

deletePayroll

Clear payroll details of a user

Authorizations:
ApiKeyAuth (apiKey)
path Parameters
userId
required
string

ID of User

query Parameters
company
required
string

ID of Company or Workspace, user refers to.

Responses

Request samples

const fetch = require('node-fetch');

const query = new URLSearchParams({company: 'string'}).toString();

const userId = 'YOUR_userId_PARAMETER';
const resp = await fetch(
  `https://api2.timedoctor.com/api/1.0/users/${userId}/payroll?${query}`,
  {
    method: 'DELETE',
    headers: {
      Authorization: 'YOUR_API_KEY_HERE'
    }
  }
);

const data = await resp.text();
console.log(data);

Response samples

Content type
application/json
{
  • "data": { }
}

putPayrolls

Modify payroll details of a list of users

Authorizations:
ApiKeyAuth (apiKey)
query Parameters
company
required
string

ID of Company or Workspace, user refers to.

Request Body schema: application/json
id
required
string

User ID

currency
string

Currency ID (f.x. USD)

adjustment
number

Absolute adjustment value

payRate
number

Pay rate multiplier

payMethod
string

Payment method ID string, if enabled in payroll company setting

payIdentifier
number

Total time in seconds

hourlyLimit
number

Hourly limit in hours

hourlyLimitRange
string

Eg => weekday, period, or perday

Responses

Request samples

Content type
application/json
{
  • "id": "string",
  • "currency": "string",
  • "adjustment": 0,
  • "payRate": 0,
  • "payMethod": "string",
  • "payIdentifier": 0,
  • "hourlyLimit": 0,
  • "hourlyLimitRange": "string"
}

Response samples

Content type
application/json
{
  • "data": { }
}

payrollSet

Get payroll settings for company

Authorizations:
ApiKeyAuth (apiKey)
query Parameters
company
required
string

ID of Company or Workspace, user refers to.

Responses

Request samples

const fetch = require('node-fetch');

const query = new URLSearchParams({company: 'string'}).toString();

const resp = await fetch(
  `https://api2.timedoctor.com/api/1.0/companies/payroll?${query}`,
  {
    method: 'GET',
    headers: {
      Authorization: 'YOUR_API_KEY_HERE'
    }
  }
);

const data = await resp.text();
console.log(data);

Response samples

Content type
application/json
{
  • "data": [ ],
  • "page": {
    }
}

putPayrollSet

Modify payroll settings of a company

Authorizations:
ApiKeyAuth (apiKey)
query Parameters
company
required
string

ID of Company or Workspace, user refers to.

Request Body schema: application/json
transferWise
required
boolean

TransferWise enabled

transferWiseCurrency
required
string

TransferWise source currency

payoneer
required
boolean

Payoneer enabled

paypal
required
boolean

PayPal Mass Payouts enabled

bitWage
required
boolean

BitWAGE enabled

quickBooks
boolean

QuickBooks enabled

gusto
required
boolean

Gusto enabled

adp
required
boolean

ADP enabled

adpCompanyCode
required
string

ADP Company Code

adpMaxHours
number

ADP max hours

adpIncludeUserNames
required
boolean

ADP include user names

Responses

Request samples

Content type
application/json
{
  • "transferWise": true,
  • "transferWiseCurrency": "string",
  • "payoneer": true,
  • "paypal": true,
  • "bitWage": true,
  • "quickBooks": true,
  • "gusto": true,
  • "adp": true,
  • "adpCompanyCode": "string",
  • "adpMaxHours": 0,
  • "adpIncludeUserNames": true
}

Response samples

Content type
application/json
{
  • "data": { }
}