Overview

All urls in this documentation are relative to https://<your-timepot>.timepot.io/timepot.

API Versioning

The API is versioned. Each request must specify the expected API version (using a version query parameter). If the requested version is not supported, a 400 error code will be returned with the UNSUPPORTED_API_VERSION error code. The current version is 1.

Authentication

Each call to the API needs to be authenticated using an API key. You can obtain your key through the Timepot web interface. The API key needs to be provided in X-API-Key header or in apiKey query parameter (due to security reasons, the former approach is highly recommended).

Successful Requests

Depending on the context, one of the following status codes is returned:

  • 200 (OK)

  • 201 (CREATED)

  • 204 (NO CONTENT)

The returned payload (if any) is always in JSON format.

Failed Requests

Depending on the reason of the failure, the following status codes may be returned:

  • 400 (BAR REQUEST) when the request is invalid (e.g. mandatory field is missing, or a business constraint is violated)

  • 401 (UNAUTHORIZED) when no authentication information is supplied

  • 403 (FORBIDDEN) when the user is not allowed to access the requested resource

  • 404 (NOT FOUND) when the requested resource does not exist

For failed requests there is a JSON payload returned with the specific error code.

Error Codes

The following error codes may be returned:

    ACCESS_DENIED,
    CONTENT_TYPE_NOT_SUPPORTED,
    DUPLICATE_ENTRY,
    EMAIL_ALREADY_IN_USE,
    ILLEGAL_REFERENCE,
    INTERNAL_SERVER_ERROR,
    MEDIA_TYPE_NOT_ACCEPTABLE,
    METHOD_NOT_ALLOWED,
    MESSAGE_NOT_READABLE,
    MISSING_REQUEST_PARAMETER,
    NOT_AUTHENTICATED,
    OBJECT_NOT_FOUND,
    TYPE_MISMATCH,
    VALIDATION_ERROR,
    USER_COMPANY_MISMATCH,
    MOVE_TASK_BETWEEN_COMPANIES,
    ILLEGAL_AUTHENTICATION_METHOD,
    RESET_PASSWORD_ERROR,
    UNEXPECTED_PROJECT_PRICING,
    UNEXPECTED_USER_PAYMENT_TYPE,
    TIMER_ALREADY_PRESENT,
    MISSING_VERSION,
    UNSUPPORTED_VERSION
}

All your data is organized in projects. Within projects you define tasks, to which you log work (by creating or updating activities).

Projects

The following methods allow you to manipulate projects within your Timepot.

Create Project

Request:

POST /api/projects HTTP/1.1
X-API-Key: your-api-key

{
  "name" : "new project",
  "color" : "BLUE"
}

Response:

HTTP/1.1 201 Created

{
  "id" : "11e71a0601f0704ea9d17a54c63cbd07",
  "name" : "new project",
  "color" : "BLUE",
  "active" : true,
  "creationTimestamp" : 1491399876
}

List Projects

Retrieve a list of all projects within your Timepot

Request
GET /api/projects HTTP/1.1
X-API-Key: your-api-key
Request Parameters:
Parameter Description

active

Response
HTTP/1.1 200 OK

{
  "projects" : [ {
    "id" : "11e6ed41df5203f5b65c6c0b844171bc",
    "name" : "Alba",
    "color" : "ORANGE",
    "active" : false,
    "creationTimestamp" : 1447413927
  }, {
    "id" : "11e6ed41df522b06b65c6c0b844171bc",
    "name" : "Itus",
    "color" : "TURQUOISE",
    "active" : true,
    "creationTimestamp" : 1447413927
  }, {
    "id" : "11e6ed41df522b0db65c6c0b844171bc",
    "name" : "Marketing",
    "color" : "BLUE",
    "active" : true,
    "creationTimestamp" : 1447413927
  } ]
}

Get Project

Retrieve a single project.

Request:

Table 1. /api/projects/{projectId}
Parameter Description

projectId

Id of the project

GET /api/projects/11e6ed41df5203f5b65c6c0b844171bc HTTP/1.1
X-API-Key: your-api-key

Response:

HTTP/1.1 200 OK

{
  "id" : "11e6ed41df5203f5b65c6c0b844171bc",
  "name" : "Alba",
  "color" : "ORANGE",
  "active" : false
}

Update Project

Update properties of an existing project, e.g. change it’s name, color or mark it as active/inactive.

Request:

Table 2. /api/projects/{projectId}
Parameter Description

projectId

Id of the project

PUT /api/projects/11e6ed41df5203f5b65c6c0b844171bc HTTP/1.1
X-API-Key: your-api-key

{
  "name" : null,
  "color" : "ORANGE",
  "active" : false
}

Response:

HTTP/1.1 200 OK

{
  "id" : "11e6ed41df5203f5b65c6c0b844171bc",
  "name" : "Alba",
  "color" : "ORANGE",
  "active" : false,
  "creationTimestamp" : 1447413927
}

Get Most Recently Used Projects

Get projects, to which the given user has logged any work most recently

Request:

Table 3. /api/users/{userId}/mostRecentProjects
Parameter Description

userId

Id of the user

GET /api/users/11e6c6bb43f9ffad8ee4a0481cdbcc40/mostRecentProjects HTTP/1.1
X-API-Key: your-api-key

Response:

HTTP/1.1 200 OK

{
  "projects" : [ {
    "id" : "11e6ed41df522b0db65c6c0b844171bc",
    "name" : "Marketing",
    "color" : "BLUE",
    "active" : true,
    "creationTimestamp" : 1447413927
  }, {
    "id" : "11e6ed41df522b06b65c6c0b844171bc",
    "name" : "Itus",
    "color" : "TURQUOISE",
    "active" : true,
    "creationTimestamp" : 1447413927
  } ]
}

Tasks

The following methods allow you to list, create and update tasks.

Create Task

Request:

Table 4. /api/projects/{projectId}/tasks
Parameter Description

projectId

Id of the project, to which the task should be added

POST /api/projects/11e6ed41df522b0db65c6c0b844171bc/tasks HTTP/1.1
X-API-Key: your-api-key

{
  "name" : "new task"
}

Response:

HTTP/1.1 201 Created

{
  "id" : "11e71a0600c6be33a9d17a54c63cbd07",
  "name" : "new task",
  "project" : {
    "id" : "11e6ed41df522b0db65c6c0b844171bc",
    "name" : "Marketing",
    "color" : "BLUE",
    "active" : true
  },
  "lastUpdateTimestamp" : 1491399874,
  "creationTimestamp" : 1491399874
}

List Tasks

Request:

GET /api/tasks HTTP/1.1
X-API-Key: your-api-key
Request Parameters:
Parameter Description

project

user

query

Substring filter on task name

offset

limit

Response:

HTTP/1.1 200 OK

{
  "tasks" : [ {
    "id" : "11e6ed41df522b0fb65c6c0b844171bc",
    "name" : "Meeting with Patricia"
  }, {
    "id" : "11e6ed41df522b10b65c6c0b844171bc",
    "name" : "Weekly sales report"
  }, {
    "id" : "11e6ed41df522b12b65c6c0b844171bc",
    "name" : "Responding to an RFP"
  }, {
    "id" : "11e71a0600c6be33a9d17a54c63cbd07",
    "name" : "new task"
  }, {
    "id" : "11e6ed41df522b11b65c6c0b844171bc",
    "name" : "Website implementation"
  }, {
    "id" : "11e6ed41df522b13b65c6c0b844171bc",
    "name" : "Investigation of payment issues"
  } ]
}

Update Task

Modify the task, e.g. change it’s name or reassign to another project.

Request:

Table 5. /api/tasks/{taskId}
Parameter Description

taskId

Id of the updated task

PUT /api/tasks/11e6ed41df522b0fb65c6c0b844171bc HTTP/1.1
X-API-Key: your-api-key

{
  "projectId" : "11e6ed41df522b0db65c6c0b844171bc",
  "name" : "Meeting with Patricia"
}

Response:

HTTP/1.1 200 OK

{
  "id" : "11e6ed41df522b0fb65c6c0b844171bc",
  "name" : "Meeting with Patricia",
  "project" : {
    "id" : "11e6ed41df522b0db65c6c0b844171bc",
    "name" : "Marketing",
    "color" : "BLUE",
    "active" : true
  },
  "lastUpdateTimestamp" : 1491399874,
  "creationTimestamp" : 1447413927
}

Activities

The following methods allow you to create update and delete activities.

Create Activity

Request:

Table 6. /api/tasks/{taskId}/activities
Parameter Description

taskId

Id of the task, to which the activity should be added

POST /api/tasks/11e6ed41df522b11b65c6c0b844171bc/activities HTTP/1.1
X-API-Key: your-api-key

{
  "date" : "2017-03-10",
  "minutes" : 125,
  "userId" : "11e6c6bb43f9ffad8ee4a0481cdbcc40"
}

Response:

HTTP/1.1 201 Created

{
  "id" : "11e71a06013c8a74a9d17a54c63cbd07",
  "date" : "2017-03-10",
  "minutes" : 125,
  "userId" : "11e6c6bb43f9ffad8ee4a0481cdbcc40",
  "task" : {
    "id" : "11e6ed41df522b11b65c6c0b844171bc",
    "name" : "Website implementation"
  },
  "creationTimestamp" : 1491399875
}

Update Activity

Request:

Table 7. /api/activities/{activityId}
Parameter Description

activityId

Id of the updated activity

PUT /api/activities/11e6ed41df52522fb65c6c0b844171bc HTTP/1.1
X-API-Key: your-api-key

{
  "minutes" : 35
}

Response:

HTTP/1.1 200 OK

{
  "id" : "11e6ed41df52522fb65c6c0b844171bc",
  "date" : "2016-04-11",
  "minutes" : 35,
  "userId" : "11e6c6bb43f9ffad8ee4a0481cdbcc40",
  "task" : {
    "id" : "11e6ed41df522b0fb65c6c0b844171bc",
    "name" : "Meeting with Patricia"
  },
  "creationTimestamp" : 1447413927
}

Delete Activity

Request:

Table 8. /api/activities/{activityId}
Parameter Description

activityId

Id of the deleted activity

DELETE /api/activities/11e6ed41df52523aa65c6c0b844171bc HTTP/1.1
X-API-Key: your-api-key

Response:

HTTP/1.1 204 No Content

Get Activities

Get all user activities in a specified period

Request:

Table 9. /api/users/{userId}/timesheet
Parameter Description

userId

Id of the user

GET /api/users/11e6c6bb43f9ffad8ee4a0481cdbcc40/timesheet?from=2016-04-11&to=2016-04-15 HTTP/1.1
X-API-Key: your-api-key
Parameter Description

from

to

Response:

HTTP/1.1 200 OK

{
  "projects" : [ {
    "id" : "11e6ed41df522b06b65c6c0b844171bc",
    "name" : "Itus",
    "color" : "TURQUOISE",
    "tasks" : [ {
      "id" : "11e6ed41df522b12b65c6c0b844171bc",
      "name" : "Responding to an RFP",
      "activities" : [ {
        "id" : "11e6ed41df52523ab65c6c0b844171bc",
        "date" : "2016-04-13",
        "minutes" : 265
      } ]
    } ],
    "active" : true
  }, {
    "id" : "11e6ed41df522b0db65c6c0b844171bc",
    "name" : "Marketing",
    "color" : "BLUE",
    "tasks" : [ {
      "id" : "11e6ed41df522b0fb65c6c0b844171bc",
      "name" : "Meeting with Patricia",
      "activities" : [ {
        "id" : "11e6ed41df52522fb65c6c0b844171bc",
        "date" : "2016-04-11",
        "minutes" : 35
      }, {
        "id" : "11e6ed41df52523ab65c6c0b844171bc",
        "date" : "2016-04-15",
        "minutes" : 90
      } ]
    } ],
    "active" : true
  } ],
  "timer" : {
    "taskCode" : "11e6ed41df522b0fb65c6c0b844171bc",
    "elapsedSeconds" : 1635848
  }
}

Timer

Timer allows you to log your time automatically. You can start, cancel, submit or get a running timer

Start Timer

Request:

Table 10. /api/users/{userId}/timer
Parameter Description

userId

Id of the user, for which the timer is started

POST /api/users/11e6c6bb43f9ffad8ee4a0481cdbcc40/timer HTTP/1.1
X-API-Key: your-api-key

{
  "projectCode" : "11e6ed41df5203f5b65c6c0b844171bc",
  "taskCode" : null,
  "taskName" : "Testing timer",
  "timeZone" : "Europe/Warsaw"
}

Response:

HTTP/1.1 204 No Content

Cancel Timer

Request:

Table 11. /api/users/{userId}/timer
Parameter Description

userId

Id of the user, for which the timer is cancelled

DELETE /api/users/11e6c6bb43f9ffad8ee4a0481cdbcc40/timer HTTP/1.1
X-API-Key: your-api-key

Response:

HTTP/1.1 204 No Content

Submit Timer

Request:

Table 12. /api/users/{userId}/timer
Parameter Description

userId

Id of the user, for which the timer is submitted

PUT /api/users/11e6c6bb43f9ffa68ee4a0481cdbcc40/timer HTTP/1.1
X-API-Key: your-api-key

{
  "timeZone" : "Europe/Warsaw"
}

Response:

HTTP/1.1 204 No Content

Get Timer

Table 13. /api/users/{userId}/timer
Parameter Description

userId

Id of the user, for which the timer is read

GET /api/users/11e6c6bb43f9ffa78ee4a0481cdbcc40/timer HTTP/1.1
X-API-Key: your-api-key

Response:

HTTP/1.1 200 OK

{
  "taskCode" : "11e6ed41df522b0fb65c6c0b844171bc",
  "elapsedSeconds" : 1635848
}

Reports

Timepot provides reports of activities aggregated by date, user or project. All these reports can be filtered by multiple criteria, such as

  • project ids

  • user ids

  • start / end date

  • tasks matching given keyword

Report Aggregated by Date

Request:

GET /api/tasksDailyDurationsReport?userIds=11e6c6bb43f9ffad8ee4a0481cdbcc40&projectIds=11e6ed41df5203f5b65c6c0b844171bc&projectIds=11e6ed41df522b06b65c6c0b844171bc&dateFrom=2016-04-12&dateTo=2016-04-15 HTTP/1.1
X-API-Key: your-api-key
Request Parameters:
Parameter Description

keywords

projectIds

userIds

dateFrom

dateTo

Response:

HTTP/1.1 200 OK

{
  "dailyDurations" : [ {
    "date" : "2016-04-12",
    "duration" : 0
  }, {
    "date" : "2016-04-13",
    "duration" : 265
  }, {
    "date" : "2016-04-14",
    "duration" : 0
  }, {
    "date" : "2016-04-15",
    "duration" : 90
  } ]
}

Report Aggregated by User

Request:

GET /api/userActivitiesDurations?dateFrom=2015-03-07 HTTP/1.1
X-API-Key: your-api-key
Request Parameters:
Parameter Description

keywords

projectIds

userIds

dateFrom

dateTo

Response:

HTTP/1.1 200 OK

{
  "durations" : [ {
    "code" : "11e6c6bb43f9ffa68ee4a0481cdbcc40",
    "name" : "Helen Baker",
    "duration" : 30
  }, {
    "code" : "11e6c6bb43f9ffad8ee4a0481cdbcc40",
    "name" : "Ben Taylor",
    "duration" : 565
  } ]
}

Report Aggregated by Project

Request:

GET /api/projectActivitiesDurations?dateFrom=2015-03-07 HTTP/1.1
X-API-Key: your-api-key
Request Parameters:
Parameter Description

keywords

projectIds

userIds

dateFrom

dateTo

Response:

HTTP/1.1 200 OK

{
  "durations" : [ {
    "duration" : 90,
    "projectName" : "Alba",
    "projectColor" : "RED",
    "code" : "11e6ed41df5203f5b65c6c0b844171bc"
  }, {
    "duration" : 265,
    "projectName" : "Itus",
    "projectColor" : "TURQUOISE",
    "code" : "11e6ed41df522b06b65c6c0b844171bc"
  }, {
    "duration" : 240,
    "projectName" : "Marketing",
    "projectColor" : "BLUE",
    "code" : "11e6ed41df522b0db65c6c0b844171bc"
  } ]
}

Report Aggregated by Task

Request:

GET /api/tasksReport?dateFrom=2015-03-07 HTTP/1.1
X-API-Key: your-api-key
Request Parameters:
Parameter Description

keywords

projectIds

userIds

dateFrom

dateTo

Response:

HTTP/1.1 200 OK

{
  "tasks" : [ {
    "id" : "11e6ed41df522b10b65c6c0b844171bc",
    "name" : "Weekly sales report",
    "project" : {
      "id" : "11e6ed41df5203f5b65c6c0b844171bc",
      "name" : "Alba",
      "color" : "RED",
      "active" : true
    },
    "lastUpdateTimestamp" : 1447413927,
    "creationTimestamp" : 1447413927,
    "users" : [ {
      "id" : "11e6c6bb43f9ffad8ee4a0481cdbcc40",
      "email" : "ben@greenfrog123.com",
      "firstName" : "Ben",
      "lastName" : "Taylor",
      "avatarUrl" : "images/ben.jpg",
      "avatarUploaded" : true,
      "askForDetails" : false,
      "canEditProfile" : false,
      "isAuthenticatedByGoogle" : true,
      "isAuthenticatedByPassword" : false,
      "hasAuthenticationMethod" : true
    } ],
    "minutes" : 90,
    "lastUpdated" : "2016-04-15"
  }, {
    "id" : "11e6ed41df522b0fb65c6c0b844171bc",
    "name" : "Meeting with Patricia",
    "project" : {
      "id" : "11e6ed41df522b0db65c6c0b844171bc",
      "name" : "Marketing",
      "color" : "BLUE",
      "active" : true
    },
    "lastUpdateTimestamp" : 1491399874,
    "creationTimestamp" : 1447413927,
    "users" : [ {
      "id" : "11e6c6bb43f9ffad8ee4a0481cdbcc40",
      "email" : "ben@greenfrog123.com",
      "firstName" : "Ben",
      "lastName" : "Taylor",
      "avatarUrl" : "images/ben.jpg",
      "avatarUploaded" : true,
      "askForDetails" : false,
      "canEditProfile" : false,
      "isAuthenticatedByGoogle" : true,
      "isAuthenticatedByPassword" : false,
      "hasAuthenticationMethod" : true
    }, {
      "id" : "11e6c6bb43f9ffa68ee4a0481cdbcc40",
      "email" : "helen@greenfrog123.com",
      "firstName" : "Helen",
      "lastName" : "Baker",
      "avatarUrl" : "images/helen.jpg",
      "avatarUploaded" : true,
      "askForDetails" : false,
      "canEditProfile" : true,
      "isAuthenticatedByGoogle" : false,
      "isAuthenticatedByPassword" : false,
      "hasAuthenticationMethod" : false
    } ],
    "minutes" : 240,
    "lastUpdated" : "2016-04-15"
  }, {
    "id" : "11e6ed41df522b12b65c6c0b844171bc",
    "name" : "Responding to an RFP",
    "project" : {
      "id" : "11e6ed41df522b06b65c6c0b844171bc",
      "name" : "Itus",
      "color" : "TURQUOISE",
      "active" : true
    },
    "lastUpdateTimestamp" : 1447413927,
    "creationTimestamp" : 1447413927,
    "users" : [ {
      "id" : "11e6c6bb43f9ffad8ee4a0481cdbcc40",
      "email" : "ben@greenfrog123.com",
      "firstName" : "Ben",
      "lastName" : "Taylor",
      "avatarUrl" : "images/ben.jpg",
      "avatarUploaded" : true,
      "askForDetails" : false,
      "canEditProfile" : false,
      "isAuthenticatedByGoogle" : true,
      "isAuthenticatedByPassword" : false,
      "hasAuthenticationMethod" : true
    } ],
    "minutes" : 265,
    "lastUpdated" : "2016-04-13"
  } ]
}

CSV Report Aggregated by Task

The report aggregated by task is also available in CSV format.

Request:

GET /api/tasksCSVReport?dateFrom=2015-03-07 HTTP/1.1
X-API-Key: your-api-key
Request Parameters:
Parameter Description

keywords

projectIds

userIds

dateFrom

dateTo

Response:

HTTP/1.1 200 OK
Content-Disposition: attachment;filename=taskReport.csv

projectName,taskName,firstName,lastName,email,minutes
Alba,"Weekly sales report",Ben,Taylor,ben@greenfrog123.com,90
Marketing,"Meeting with Patricia",Ben,Taylor,ben@greenfrog123.com,210
Marketing,"Meeting with Patricia",Helen,Baker,helen@greenfrog123.com,30
Itus,"Responding to an RFP",Ben,Taylor,ben@greenfrog123.com,265

Users

Invite, deactivate and edit profiles of your team members.

Invite User

Request:

POST /api/invitations?email=colin@some-fake.company HTTP/1.1
X-API-Key: your-api-key
Content-Type: application/x-www-form-urlencoded

email=colin%40some-fake.company
Parameter Description

email

email of the invited user

Response:

HTTP/1.1 201 Created

{
  "id" : "11e71a0601f663bfa9d17a54c63cbd07",
  "email" : "colin@some-fake.company",
  "askForDetails" : false,
  "canEditProfile" : true,
  "companyName" : "localhost",
  "status" : 0,
  "admin" : false,
  "subscribed" : true,
  "onExpiredTrial" : false,
  "hasAuthenticationMethod" : false,
  "avatarUploaded" : false,
  "isAuthenticatedByGoogle" : false,
  "isAuthenticatedByPassword" : false
}

Cancel User Invitation

Request:

Table 14. /api/invitations/{userId}
Parameter Description

userId

Id of the user, for which the invitation should be cancelled

DELETE /api/invitations/11e6c6bb43f9ffa88ee4a0481cdbcc40 HTTP/1.1
X-API-Key: your-api-key

Response:

HTTP/1.1 204 No Content

Accept Invitation

Request:

POST /api/signupWithPasswordAndInvitation HTTP/1.1
X-API-Key: your-api-key

{
  "invitationToken" : "IbqKv7kYnCBUnFFv",
  "password" : "fooBar1",
  "promoCode" : null
}

Response:

HTTP/1.1 201 Created

Edit User Details

Grant or revoke admin privileges, deactivate the user:

Request:

Table 15. /api/companyUsers/{userId}
Parameter Description

userId

Id of the updated user

PUT /api/companyUsers/11e6c6bb43f9ffa68ee4a0481cdbcc40 HTTP/1.1
X-API-Key: your-api-key

{
  "admin" : true,
  "status" : "ACTIVE"
}

Response:

HTTP/1.1 200 OK

{
  "id" : "11e6c6bb43f9ffa68ee4a0481cdbcc40",
  "email" : "helen@greenfrog123.com",
  "firstName" : "Helen",
  "lastName" : "Baker",
  "avatarUrl" : "images/helen.jpg",
  "askForDetails" : false,
  "canEditProfile" : true,
  "companyName" : "localhost",
  "status" : 1,
  "admin" : true,
  "subscribed" : true,
  "onExpiredTrial" : false,
  "hasAuthenticationMethod" : false,
  "avatarUploaded" : false,
  "isAuthenticatedByGoogle" : false,
  "isAuthenticatedByPassword" : false
}

Holidays

Report your days off

Report Days Off

Request:

Table 16. /api/users/{userId}/personalHolidays
Parameter Description

userId

Id of the user, for which the days off are reported

POST /api/users/11e6c6bb43f9ffad8ee4a0481cdbcc40/personalHolidays HTTP/1.1
X-API-Key: your-api-key

{
  "begin" : "2017-02-26",
  "end" : "2017-03-03"
}

Response:

HTTP/1.1 201 Created

{
  "dates" : [ "2017-02-26", "2017-02-27", "2017-02-28", "2017-03-01", "2017-03-02", "2017-03-03" ]
}

Cancel Days Off

Request:

Table 17. /api/users/{userId}/personalHolidays
Parameter Description

userId

Id of the user, for which the days off are removed

DELETE /api/users/11e6c6bb43f9ffad8ee4a0481cdbcc40/personalHolidays?begin=2017-01-10&end=2017-01-12 HTTP/1.1
X-API-Key: your-api-key
Parameter Description

begin

end

Response:

HTTP/1.1 204 No Content

List Days Off for User

Request:

Table 18. /api/users/{userId}/personalHolidays
Parameter Description

userId

Id of the user, for which the days off are reported

GET /api/users/11e6c6bb43f9ffad8ee4a0481cdbcc40/personalHolidays?from=2017-01-01&to=2017-05-01 HTTP/1.1
X-API-Key: your-api-key
Parameter Description

from

to

Response:

HTTP/1.1 200 OK

{
  "user" : {
    "id" : "11e6c6bb43f9ffad8ee4a0481cdbcc40",
    "email" : "ben@greenfrog123.com",
    "firstName" : "Ben",
    "lastName" : "Taylor",
    "avatarUrl" : "images/ben.jpg",
    "avatarUploaded" : false,
    "askForDetails" : false,
    "canEditProfile" : false,
    "isAuthenticatedByGoogle" : true,
    "isAuthenticatedByPassword" : false,
    "hasAuthenticationMethod" : true
  },
  "totalDays" : 11,
  "personalHolidays" : [ {
    "begin" : "2017-01-09",
    "end" : "2017-01-13"
  }, {
    "begin" : "2017-02-26",
    "end" : "2017-03-03"
  } ]
}

List Days Off of the Entire Team

Request:

GET /api/personalHolidays?year=2017 HTTP/1.1
X-API-Key: your-api-key
Parameter Description

year

Response:

HTTP/1.1 200 OK

{
  "personalHolidays" : [ {
    "user" : {
      "id" : "11e6c6bb43f9ffa68ee4a0481cdbcc40",
      "email" : "helen@greenfrog123.com",
      "firstName" : "Helen",
      "lastName" : "Baker",
      "avatarUrl" : "images/helen.jpg",
      "avatarUploaded" : false,
      "askForDetails" : false,
      "canEditProfile" : true,
      "isAuthenticatedByGoogle" : false,
      "isAuthenticatedByPassword" : false,
      "hasAuthenticationMethod" : false
    },
    "totalDays" : 0,
    "personalHolidays" : [ ]
  }, {
    "user" : {
      "id" : "11e6c6bb43f9ffa78ee4a0481cdbcc40",
      "email" : "cameron@greenfrog123.com",
      "firstName" : "Cameron",
      "lastName" : "Hill",
      "avatarUrl" : "images/cameron.png",
      "avatarUploaded" : false,
      "askForDetails" : false,
      "canEditProfile" : false,
      "isAuthenticatedByGoogle" : true,
      "isAuthenticatedByPassword" : false,
      "hasAuthenticationMethod" : true
    },
    "totalDays" : 3,
    "personalHolidays" : [ {
      "begin" : "2017-04-05",
      "end" : "2017-04-06"
    }, {
      "begin" : "2017-04-12",
      "end" : "2017-04-12"
    } ]
  }, {
    "user" : {
      "id" : "11e6c6bb43f9ffad8ee4a0481cdbcc40",
      "email" : "ben@greenfrog123.com",
      "firstName" : "Ben",
      "lastName" : "Taylor",
      "avatarUrl" : "images/ben.jpg",
      "avatarUploaded" : false,
      "askForDetails" : false,
      "canEditProfile" : false,
      "isAuthenticatedByGoogle" : true,
      "isAuthenticatedByPassword" : false,
      "hasAuthenticationMethod" : true
    },
    "totalDays" : 5,
    "personalHolidays" : [ {
      "begin" : "2017-01-09",
      "end" : "2017-01-13"
    } ]
  } ]
}