kimai / api-php
Swagger generated API stubs for Kimai
2.0
2025-01-21 23:34 UTC
Requires
- php: ^7.4 || ^8.0
- ext-curl: *
- ext-json: *
- ext-mbstring: *
- guzzlehttp/guzzle: ^7.3
- guzzlehttp/psr7: ^1.7 || ^2.0
README
JSON API for the Kimai time-tracking software: API documentation
This PHP package is automatically generated by the Swagger Codegen project:
- API version: 1.0 (for Kimai > 2.28.0)
Requirements
PHP 5.5 and later
Installation & Usage
Composer
To install the bindings via Composer:
composer require kimai/api-php
Getting Started
Please follow the installation procedure and then run the following:
<?php require_once(__DIR__ . '/vendor/autoload.php'); $apiInstance = new Swagger\Client\Api\AbsenceApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), $config ); $id = "id_example"; // string | Absence ID to delete try { $apiInstance->deleteDeleteAbsence($id); } catch (Exception $e) { echo 'Exception when calling AbsenceApi->deleteDeleteAbsence: ', $e->getMessage(), PHP_EOL; } $apiInstance = new Swagger\Client\Api\AbsenceApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), $config ); $id = "id_example"; // string | Publi holiday ID to delete try { $apiInstance->deleteDeletePublicHoliday($id); } catch (Exception $e) { echo 'Exception when calling AbsenceApi->deleteDeletePublicHoliday: ', $e->getMessage(), PHP_EOL; } $apiInstance = new Swagger\Client\Api\AbsenceApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), $config ); $id = "id_example"; // string | Public holiday group ID to delete try { $apiInstance->deleteDeletePublicHolidayGroup($id); } catch (Exception $e) { echo 'Exception when calling AbsenceApi->deleteDeletePublicHolidayGroup: ', $e->getMessage(), PHP_EOL; } $apiInstance = new Swagger\Client\Api\AbsenceApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), $config ); $user = "user_example"; // string | User ID to filter absences. Needs permission 'contract_other_profile' (default: current user) $begin = "begin_example"; // string | Only absences after this date will be included (format: HTML5) $end = "end_example"; // string | Only absences before this date will be included (format: HTML5) try { $result = $apiInstance->getGetAbsences($user, $begin, $end); print_r($result); } catch (Exception $e) { echo 'Exception when calling AbsenceApi->getGetAbsences: ', $e->getMessage(), PHP_EOL; } $apiInstance = new Swagger\Client\Api\AbsenceApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), $config ); $user = "user_example"; // string | User ID to filter absences. Needs permission 'contract_other_profile' (default: current user) $begin = "begin_example"; // string | Only absences after this date will be included (format: HTML5) $end = "end_example"; // string | Only absences before this date will be included (format: HTML5) $language = "language_example"; // string | The language to be used for displaying the absences (format: en or en_GB) try { $result = $apiInstance->getGetAbsencesCalendar($user, $begin, $end, $language); print_r($result); } catch (Exception $e) { echo 'Exception when calling AbsenceApi->getGetAbsencesCalendar: ', $e->getMessage(), PHP_EOL; } $apiInstance = new Swagger\Client\Api\AbsenceApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), $config ); $group = "group_example"; // string | Public holiday - group ID to filter. (default: default group) $begin = "begin_example"; // string | Only absences after this date will be included (format: HTML5) $end = "end_example"; // string | Only absences before this date will be included (format: HTML5) try { $result = $apiInstance->getGetPublicHolidays($group, $begin, $end); print_r($result); } catch (Exception $e) { echo 'Exception when calling AbsenceApi->getGetPublicHolidays: ', $e->getMessage(), PHP_EOL; } $apiInstance = new Swagger\Client\Api\AbsenceApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), $config ); $group = "group_example"; // string | Public holiday - group ID to filter. (default: default group) $begin = "begin_example"; // string | Only absences after this date will be included (format: HTML5) $end = "end_example"; // string | Only absences before this date will be included (format: HTML5) try { $result = $apiInstance->getGetPublicHolidaysCalendar($group, $begin, $end); print_r($result); } catch (Exception $e) { echo 'Exception when calling AbsenceApi->getGetPublicHolidaysCalendar: ', $e->getMessage(), PHP_EOL; } $apiInstance = new Swagger\Client\Api\AbsenceApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), $config ); $language = "language_example"; // string | The language to be used for displaying the absences types (format: de or en_GB) try { $result = $apiInstance->getKimaipluginWorkcontractApiAbsenceGetabsencetypes($language); print_r($result); } catch (Exception $e) { echo 'Exception when calling AbsenceApi->getKimaipluginWorkcontractApiAbsenceGetabsencetypes: ', $e->getMessage(), PHP_EOL; } $apiInstance = new Swagger\Client\Api\AbsenceApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), $config ); $id = "id_example"; // string | Absence ID try { $result = $apiInstance->patchConfirmApprovalAbsence($id); print_r($result); } catch (Exception $e) { echo 'Exception when calling AbsenceApi->patchConfirmApprovalAbsence: ', $e->getMessage(), PHP_EOL; } $apiInstance = new Swagger\Client\Api\AbsenceApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), $config ); $id = "id_example"; // string | Absence ID try { $result = $apiInstance->patchRejectApprovalAbsence($id); print_r($result); } catch (Exception $e) { echo 'Exception when calling AbsenceApi->patchRejectApprovalAbsence: ', $e->getMessage(), PHP_EOL; } $apiInstance = new Swagger\Client\Api\AbsenceApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), $config ); $id = "id_example"; // string | Absence ID try { $result = $apiInstance->patchRequestApprovalAbsence($id); print_r($result); } catch (Exception $e) { echo 'Exception when calling AbsenceApi->patchRequestApprovalAbsence: ', $e->getMessage(), PHP_EOL; } ?>
Documentation for API Endpoints
All URIs are relative to /
Documentation For Models
- Absence
- Activity
- ActivityCollection
- ActivityEditForm
- ActivityEntity
- ActivityExpanded
- ActivityMeta
- ActivityRate
- ActivityRateForm
- CalendarEvent
- Customer
- CustomerCollection
- CustomerEditForm
- CustomerEntity
- CustomerMeta
- CustomerRate
- CustomerRateForm
- DemoEntity
- DemoForm
- ExpenseCategory
- ExpenseEditForm
- ExpenseEntity
- ExpenseMeta
- IdMetaBody
- IdMetaBody1
- IdMetaBody2
- IdMetaBody3
- IdMetaBody4
- IdMetaBody5
- IdRestartBody
- IdRestartBody1
- Invoice
- InvoiceCollection
- InvoiceMeta
- MetaFieldRule
- PageAction
- Plugin
- Project
- ProjectCollection
- ProjectEditForm
- ProjectEntity
- ProjectExpanded
- ProjectMeta
- ProjectRate
- ProjectRateForm
- PublicHoliday
- PublicHolidayGroup
- TagEditForm
- TagEntity
- Task
- TaskEditForm
- TaskLogWorkForm
- TaskMeta
- Team
- TeamCollection
- TeamEditForm
- TeamEditFormMembers
- TeamMember
- TeamMembership
- TimesheetCollection
- TimesheetCollectionExpanded
- TimesheetConfig
- TimesheetEditForm
- TimesheetEntity
- TimesheetExpanded
- TimesheetMeta
- User
- UserAuth
- UserAuthCodes
- UserCollection
- UserCreateForm
- UserEditForm
- UserEntity
- UserPreference
- Version
Documentation For Authorization
bearer
- Type: HTTP bearer authentication