Added basic API endpoints (#258)
This commit is contained in:
Binary file not shown.
@@ -13,12 +13,16 @@ For the most part Kimai usage should be self-explanatory, so we will only cover
|
||||
|
||||
- [Timesheets](timesheet.md) - information about timesheets
|
||||
|
||||
## Developers and Administrators
|
||||
## Developer & Administrator
|
||||
|
||||
- [Kimai configurations](configurations.md) - application configs, which can only be changed in config files
|
||||
- [Developer docu](developers.md) - how to extend Kimai's feature set
|
||||
- [User and Security](users.md) - docu for user and security topics, like authentication, registration and roles
|
||||
- [FAQ](faq.md) - some answers to frequently asked questions
|
||||
- [Emails](emails.md) - transport configuration and handling of emails
|
||||
- [API](developers_api.md) - how to use the JSON API
|
||||
|
||||
## Installation
|
||||
|
||||
- [Installation](installation.md) - instructions about several installation methods
|
||||
- [Importing data](migration_v1.md) - how to import your timesheets from Kimai v1
|
||||
- [Emails](emails.md) - transport configuration and handling of emails
|
||||
|
||||
23
var/docs/developers_api.md
Normal file
23
var/docs/developers_api.md
Normal file
@@ -0,0 +1,23 @@
|
||||
# REST API
|
||||
|
||||
Read the Swagger documentation of the Kimai 2 API in your Kimai installation at `/api/doc`.
|
||||
|
||||
Or you can export the JSON collection by visiting `/api/doc.json`. Store the result in a file, which can be imported with Postman.
|
||||
|
||||
## Authentication
|
||||
|
||||
When calling the API you have to submit two additional header with every call for authentication:
|
||||
|
||||
- `X-AUTH-USER` - holds the username or email
|
||||
- `X-AUTH-TOKEN` - holds the users API password, which he can set in his profile
|
||||
|
||||
Please make sure to ONLY call the Kimai 2 API via `https` to protect the users data!
|
||||
|
||||
## Calling the API with Javascript
|
||||
|
||||
If you develop your own extension and need to use the API for logged-in user, then you have to set the header `X-AUTH-SESSION`
|
||||
which will allow Kimai to use the current user session and not look for the default token based API authentication.
|
||||
|
||||
### Next step
|
||||
|
||||
Back to the [developer documentation](developers.md).
|
||||
@@ -10,3 +10,4 @@ Internal documentation for project maintainers
|
||||
- Push a release branch and add it as last PR merge into master
|
||||
- Edit the release-draft and add the "Full changelog" link + everything from the "Merged pull requests" section from CHANGELOG.md
|
||||
- Create the release
|
||||
- Post a new issue at [YunoHost tracker for Kimai 2](https://github.com/YunoHost-Apps/kimai2_ynh)
|
||||
Reference in New Issue
Block a user