timetracker icon indicating copy to clipboard operation
timetracker copied to clipboard

REST API

Open tarpin opened this issue 6 years ago • 9 comments

Could you please add REST API.

tarpin avatar May 18 '19 14:05 tarpin

Could you tell us know more for what it would be needed?

reinerj avatar May 18 '19 14:05 reinerj

Thanks for Your quick reply.

I'm thinking about making addon for browser inspired by Toggl Button addon. Addon would be integrated with Time Tracker (as backend).

Planned functions of the addon:

  • When I select a text, I can add this text as a new time entry to Nextcloud TimeTracker with zero time.
  • View of today's time entries and the ability to choose the entry to count the time.
  • Timer for selected or new (plain) entry.

Initially, addon would need possibility to:

  • add new entry (fullfiled, partially filled and empty),
  • modify existing entry,
  • list entries by conditions,
  • get properties of the entry.

tarpin avatar May 18 '19 15:05 tarpin

Can we just add @NoCSRFRequired on several route like the start-timer for example? Would work great as a rest api. Background - I plan a small app for my employees to track their time from mobile and just exposing these ajax routes would help a lot - or is there a way to access them via rest if the don't have the @NoCSRFRequired comment? @reinerj

adnoh avatar Jul 12 '19 08:07 adnoh

we will review this and will look for the best way how this can be implemented. There are more reuest like this to have other options to add hours to the application

reinerj avatar Jul 12 '19 11:07 reinerj

@adnoh I think you'll need separate routes for API so you can start, stop and add timers for different users as just disabling CSRF is a hack that would require your app to login as the user into the nextcloud app.

puthre avatar Aug 28 '19 09:08 puthre

We would accept pull requests. When you would send this we would review and integrate it.

Thanks

reinerj avatar Jan 28 '20 14:01 reinerj

An API would also be useful to allow using external apps to register check-in/check-out times. It could even be connected to a card reader which would allow to check in times simply by swiping an RFID card.

simonspa avatar Feb 28 '20 07:02 simonspa

yes, an api would help to create tracker apps

c33s avatar Jul 18 '20 00:07 c33s

I'm making standalone device for selecting project that I'm working on. With REST API I could integrate it with timetracker.

jazn avatar Feb 26 '21 12:02 jazn