Skip to content

Timetracker Rest API

dermoritz edited this page Jun 10, 2015 · 4 revisions

This page describes the resources with their methods available for timetracker. There are 3 roles distinguished “ADMIN” > “MANAGER” > “USER”. That means that ADMIN inherits all permissions from MANAGER and MANAGER inherits all from USER.
work in progress

general

All resources are available via base url /timetracker-backend/timtracker. The following resources are exposed (each maps to a persisted entity):

  • /booking : has “usersproject”, start time and end time
  • /project : has name (unique) and description
  • /user : has name (unique) and role
  • /usersprojects : represents projects registered to user, has project and user

common operations for all resources

For all resources the CRUD operations are equal and accept/respond either application/json or application/xml. Per default json is used but if request was sent with content-type header application/xml the response will be in xml format. The operationas are (http method: path, description):

  • POST:/{resource}, creates an entity, return 201 on success
  • GET:/{resource}/{id}, retrieves the entity with given id, returns entity and 200 on success, 404 if not found
  • PUT:/{resource}/{id}, updates entity with given id with data in body, returns 204 on success, 404 if not found
  • DELETE:/{resource}/{id}, deletes entity with given id, returns 204 on success, 404 if not found
  • GET:/{resource}/all with query param “page” and “pageSize”, if parameters are omitted all entities will be returned

resource specific operations

Clone this wiki locally