Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export other users' timesheets using the API #562

Closed
mhaustein opened this issue Feb 12, 2019 · 6 comments · Fixed by #563
Closed

Export other users' timesheets using the API #562

mhaustein opened this issue Feb 12, 2019 · 6 comments · Fixed by #563

Comments

@mhaustein
Copy link

I'm looking for a way to export timesheets of other / all users via the API.

Currently we are using Kimai 1 and import all timesheets into our invoicing system via an ODBC connection to the database on a regular basis. We are thinking about switching to Kimai 2 and start using the API, but I couldn't find a suitable method in the API. It looks like /api/timesheets can only access timesheets for the current user. Is there a way to get all timesheets or query by user id?

@kevinpapst
Copy link
Member

Hi!
Thanks for the feature request.
Not yet possible, but just a couple of lines to get it working.
I can add that to the next release.
I'll let you know when the PR is there, maybe you can help testing?!

@kevinpapst
Copy link
Member

Well, that was easy... please check the attached PR.

@j0hannesr0th
Copy link
Contributor

I'm curios about this change, too. Correct me if I'm wrong: it's not possible to filter the project and timespan yet?

We use direct DB access in v1 to get all the time sheet entries for a specific project of all users for a specific timespan - usually the last month.

@kevinpapst
Copy link
Member

Timespan is indeed not possible yet, but you can filter for: customer, project, activity and user.
You can also define: order, orderBy, page and result-set size.
I'll see if I can easily add the timespan as well

@kevinpapst
Copy link
Member

@hmr-it-jr I can add the time range, but please open a new issue for it. I will do some more refactoring when working on that.

@lock
Copy link

lock bot commented Apr 14, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. If you use Kimai on a daily basis, please consider donating to support further development of Kimai.

@lock lock bot locked and limited conversation to collaborators Apr 14, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants