No description
  • Python 99.9%
  • Shell 0.1%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-09-22 21:11:11 +02:00
.openapi-generator Kimai API 0.6 2023-05-27 09:39:04 +02:00
docs Kimai API 0.6 2023-05-27 09:39:04 +02:00
kimai_python Kimai API 0.6 2023-05-27 09:39:04 +02:00
test Kimai API 0.6 2023-05-27 09:39:04 +02:00
.gitignore Kimai API 0.6 2023-05-27 09:39:04 +02:00
.openapi-generator-ignore Kimai API 0.6 2023-05-27 09:39:04 +02:00
.travis.yml Kimai API 0.6 2023-05-27 09:39:04 +02:00
GENERATE.md Kimai API 0.6 2023-05-27 09:39:04 +02:00
generate.sh Update git url 2026-09-22 21:11:11 +02:00
LICENSE Kimai API 0.6 2023-05-27 09:39:04 +02:00
README.md Update git url 2026-09-22 21:11:11 +02:00
requirements.txt Kimai API 0.6 2023-05-27 09:39:04 +02:00
setup.py Kimai API 0.6 2023-05-27 09:39:04 +02:00
test-requirements.txt Kimai API 0.6 2023-05-27 09:39:04 +02:00
tox.ini Kimai API 0.6 2023-05-27 09:39:04 +02:00

kimai-python

JSON API for the Kimai time-tracking software: API documentation, Swagger definition file

This Python package is automatically generated by the OpenAPI Generator project:

  • API version: 0.6
  • Package version: 1.0.0
  • Build package: org.openapitools.codegen.languages.PythonClientCodegen

Requirements.

Python 2.7 and 3.4+

Installation & Usage

pip install

If the python package is hosted on a repository, you can install directly using:

pip install git+https://forge.upto.se/jonas/kimai-python

(you may need to run pip with root permission: sudo pip install git+https://forge.upto.se/jonas/kimai-python)

Then import the package:

import kimai_python 

Setuptools

Install via Setuptools.

python setup.py install --user

(or sudo python setup.py install to install the package for all users)

Then import the package:

import kimai_python

Getting Started

Please follow the installation procedure and then run the following:

from __future__ import print_function
import time
import kimai_python
from kimai_python.rest import ApiException
from pprint import pprint

configuration = kimai_python.Configuration()
# Configure API key authorization: apiToken
configuration.api_key['X-AUTH-TOKEN'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-AUTH-TOKEN'] = 'Bearer'
configuration = kimai_python.Configuration()
# Configure API key authorization: apiUser
configuration.api_key['X-AUTH-USER'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-AUTH-USER'] = 'Bearer'

# Defining host is optional and default to http://localhost:8080
configuration.host = "http://localhost:8080"
# Create an instance of the API class
api_instance = kimai_python.ActivityApi(kimai_python.ApiClient(configuration))
project = 'project_example' # str | Project ID to filter activities (optional)
projects = 'projects_example' # str | Comma separated list of project IDs to filter activities (optional)
visible = 'visible_example' # str | Visibility status to filter activities. Allowed values: 1=visible, 2=hidden, 3=all (default: 1) (optional)
globals = 'globals_example' # str | Use if you want to fetch only global activities. Allowed values: true (default: false) (optional)
globals_first = 'globals_first_example' # str | Deprecated parameter, value is not used any more (optional)
order_by = 'order_by_example' # str | The field by which results will be ordered. Allowed values: id, name, project (default: name) (optional)
order = 'order_example' # str | The result order. Allowed values: ASC, DESC (default: ASC) (optional)
term = 'term_example' # str | Free search term (optional)

try:
    # Returns a collection of activities
    api_response = api_instance.api_activities_get(project=project, projects=projects, visible=visible, globals=globals, globals_first=globals_first, order_by=order_by, order=order, term=term)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ActivityApi->api_activities_get: %s\n" % e)

Documentation for API Endpoints

All URIs are relative to http://localhost:8080

Class Method HTTP request Description
ActivityApi api_activities_get GET /api/activities Returns a collection of activities
ActivityApi api_activities_id_get GET /api/activities/{id} Returns one activity
ActivityApi api_activities_id_meta_patch PATCH /api/activities/{id}/meta Sets the value of a meta-field for an existing activity
ActivityApi api_activities_id_patch PATCH /api/activities/{id} Update an existing activity
ActivityApi api_activities_id_rates_get GET /api/activities/{id}/rates Returns a collection of all rates for one activity
ActivityApi api_activities_id_rates_post POST /api/activities/{id}/rates Adds a new rate to an activity
ActivityApi api_activities_id_rates_rate_id_delete DELETE /api/activities/{id}/rates/{rateId} Deletes one rate for an activity
ActivityApi api_activities_post POST /api/activities Creates a new activity
CustomerApi api_customers_get GET /api/customers Returns a collection of customers
CustomerApi api_customers_id_get GET /api/customers/{id} Returns one customer
CustomerApi api_customers_id_meta_patch PATCH /api/customers/{id}/meta Sets the value of a meta-field for an existing customer
CustomerApi api_customers_id_patch PATCH /api/customers/{id} Update an existing customer
CustomerApi api_customers_id_rates_get GET /api/customers/{id}/rates Returns a collection of all rates for one customer
CustomerApi api_customers_id_rates_post POST /api/customers/{id}/rates Adds a new rate to a customer
CustomerApi api_customers_id_rates_rate_id_delete DELETE /api/customers/{id}/rates/{rateId} Deletes one rate for an customer
CustomerApi api_customers_post POST /api/customers Creates a new customer
DefaultApi api_config_i18n_get GET /api/config/i18n Returns the user specific locale configuration
DefaultApi api_config_timesheet_get GET /api/config/timesheet Returns the timesheet configuration
DefaultApi api_ping_get GET /api/ping A testing route for the API
DefaultApi api_plugins_get GET /api/plugins Returns information about installed Plugins
DefaultApi api_version_get GET /api/version Returns information about the Kimai release
MetaFieldApi api_metafields_get GET /api/metafields Returns a collection of meta-fields
ProjectApi api_projects_get GET /api/projects Returns a collection of projects.
ProjectApi api_projects_id_get GET /api/projects/{id} Returns one project
ProjectApi api_projects_id_meta_patch PATCH /api/projects/{id}/meta Sets the value of a meta-field for an existing project
ProjectApi api_projects_id_patch PATCH /api/projects/{id} Update an existing project
ProjectApi api_projects_id_rates_get GET /api/projects/{id}/rates Returns a collection of all rates for one project
ProjectApi api_projects_id_rates_post POST /api/projects/{id}/rates Adds a new rate to an project
ProjectApi api_projects_id_rates_rate_id_delete DELETE /api/projects/{id}/rates/{rateId} Deletes one rate for an project
ProjectApi api_projects_post POST /api/projects Creates a new project
TagApi api_tags_get GET /api/tags Fetch all existing tags
TagApi api_tags_id_delete DELETE /api/tags/{id} Delete a tag
TagApi api_tags_post POST /api/tags Creates a new tag
TeamApi api_teams_get GET /api/teams Fetch all existing teams
TeamApi api_teams_id_activities_activity_id_delete DELETE /api/teams/{id}/activities/{activityId} Revokes access for an activity from a team
TeamApi api_teams_id_activities_activity_id_post POST /api/teams/{id}/activities/{activityId} Grant the team access to an activity
TeamApi api_teams_id_customers_customer_id_delete DELETE /api/teams/{id}/customers/{customerId} Revokes access for a customer from a team
TeamApi api_teams_id_customers_customer_id_post POST /api/teams/{id}/customers/{customerId} Grant the team access to a customer
TeamApi api_teams_id_delete DELETE /api/teams/{id} Delete a team
TeamApi api_teams_id_get GET /api/teams/{id} Returns one team
TeamApi api_teams_id_members_user_id_delete DELETE /api/teams/{id}/members/{userId} Removes a member from the team
TeamApi api_teams_id_members_user_id_post POST /api/teams/{id}/members/{userId} Add a new member to a team
TeamApi api_teams_id_patch PATCH /api/teams/{id} Update an existing team
TeamApi api_teams_id_projects_project_id_delete DELETE /api/teams/{id}/projects/{projectId} Revokes access for a project from a team
TeamApi api_teams_id_projects_project_id_post POST /api/teams/{id}/projects/{projectId} Grant the team access to a project
TeamApi api_teams_post POST /api/teams Creates a new team
TimesheetApi api_timesheets_active_get GET /api/timesheets/active Returns the collection of active timesheet records
TimesheetApi api_timesheets_get GET /api/timesheets Returns a collection of timesheet records
TimesheetApi api_timesheets_id_delete DELETE /api/timesheets/{id} Delete an existing timesheet record
TimesheetApi api_timesheets_id_duplicate_patch PATCH /api/timesheets/{id}/duplicate Duplicates an existing timesheet record
TimesheetApi api_timesheets_id_export_patch PATCH /api/timesheets/{id}/export Switch the export state of a timesheet record to (un-)lock it
TimesheetApi api_timesheets_id_get GET /api/timesheets/{id} Returns one timesheet record
TimesheetApi api_timesheets_id_meta_patch PATCH /api/timesheets/{id}/meta Sets the value of a meta-field for an existing timesheet.
TimesheetApi api_timesheets_id_patch PATCH /api/timesheets/{id} Update an existing timesheet record
TimesheetApi api_timesheets_id_restart_patch PATCH /api/timesheets/{id}/restart Restarts a previously stopped timesheet record for the current user
TimesheetApi api_timesheets_id_stop_patch PATCH /api/timesheets/{id}/stop Stops an active timesheet record
TimesheetApi api_timesheets_post POST /api/timesheets Creates a new timesheet record
TimesheetApi api_timesheets_recent_get GET /api/timesheets/recent Returns the collection of recent user activities
UserApi api_users_get GET /api/users Returns the collection of all registered users
UserApi api_users_id_get GET /api/users/{id} Return one user entity
UserApi api_users_id_patch PATCH /api/users/{id} Update an existing user
UserApi api_users_me_get GET /api/users/me Return the current user entity
UserApi api_users_post POST /api/users Creates a new user
VacationApiApi api_left_vacation_get GET /api/left-vacation

Documentation For Models

Documentation For Authorization

apiToken

  • Type: API key
  • API key parameter name: X-AUTH-TOKEN
  • Location: HTTP header

apiUser

  • Type: API key
  • API key parameter name: X-AUTH-USER
  • Location: HTTP header

Author