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)
PHP 5.5 and later
To install the bindings via Composer:
composer require kimai/api-php
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;
}
?>
All URIs are relative to /
Class | Method | HTTP request | Description |
---|---|---|---|
AbsenceApi | deleteDeleteAbsence | DELETE /api/absences/{id} | Delete an absence |
AbsenceApi | deleteDeletePublicHoliday | DELETE /api/public-holidays/{id} | Delete a public holiday |
AbsenceApi | deleteDeletePublicHolidayGroup | DELETE /api/public-holidays/group/{id} | Delete a public holiday group |
AbsenceApi | getGetAbsences | GET /api/absences | Returns a collection of absences (sickness, vacation, time-off, other). |
AbsenceApi | getGetAbsencesCalendar | GET /api/absences/calendar | Returns a collection of absences (sickness, vacation, time-off, other) for calendar integration. |
AbsenceApi | getGetPublicHolidays | GET /api/public-holidays | Returns a collection of public holidays. |
AbsenceApi | getGetPublicHolidaysCalendar | GET /api/public-holidays/calendar | Returns a collection of public holidays for calendar integration. |
AbsenceApi | getKimaipluginWorkcontractApiAbsenceGetabsencetypes | GET /api/absences/types | Returns a collection of absences (sickness, vacation, time-off, other). |
AbsenceApi | patchConfirmApprovalAbsence | PATCH /api/absences/{id}/confirm | Confirm an approval request |
AbsenceApi | patchRejectApprovalAbsence | PATCH /api/absences/{id}/reject | Reject an approval request |
AbsenceApi | patchRequestApprovalAbsence | PATCH /api/absences/{id}/request | Request an approval |
ActionsApi | getGetActivityActions | GET /api/actions/activity/{id}/{view}/{locale} | Get all item actions for the given Activity [for internal use] |
ActionsApi | getGetCustomerActions | GET /api/actions/customer/{id}/{view}/{locale} | Get all item actions for the given Customer [for internal use] |
ActionsApi | getGetProjectActions | GET /api/actions/project/{id}/{view}/{locale} | Get all item actions for the given Project [for internal use] |
ActionsApi | getGetTimesheetActions | GET /api/actions/timesheet/{id}/{view}/{locale} | Get all item actions for the given Timesheet [for internal use] |
ActivityApi | deleteDeleteActivity | DELETE /api/activities/{id} | Delete an existing activity |
ActivityApi | deleteDeleteActivityRate | DELETE /api/activities/{id}/rates/{rateId} | Deletes one rate for an activity |
ActivityApi | getGetActivities | GET /api/activities | Returns a collection of activities (which are visible to the user) |
ActivityApi | getGetActivity | GET /api/activities/{id} | Returns one activity |
ActivityApi | getGetActivityRates | GET /api/activities/{id}/rates | Returns a collection of all rates for one activity |
ActivityApi | patchAppApiActivityMeta | PATCH /api/activities/{id}/meta | Sets the value of a meta-field for an existing activity |
ActivityApi | patchPatchActivity | PATCH /api/activities/{id} | Update an existing activity |
ActivityApi | postPostActivity | POST /api/activities | Creates a new activity |
ActivityApi | postPostActivityRate | POST /api/activities/{id}/rates | Adds a new rate to an activity |
ApprovalBundleApiApi | getKimaipluginApprovalApiApprovalovertimeOvertimeforyearuntil | GET /api/overtime_year | |
ApprovalBundleApiApi | getKimaipluginApprovalApiApprovalovertimeweeklyWeeklyovertime | GET /api/weekly_overtime | |
ApprovalBundleApiApi | postKimaipluginApprovalApiApprovalbundleapiSubmitweek | POST /api/add_to_approve | |
ApprovalNextWeekApiApi | getKimaipluginApprovalApiApprovalnextweekapiNextweek | GET /api/next-week | |
ApprovalStatusApiApi | getKimaipluginApprovalApiApprovalstatusapiSubmitweek | GET /api/week-status | |
CustomerApi | deleteDeleteCustomer | DELETE /api/customers/{id} | Delete an existing customer |
CustomerApi | deleteDeleteCustomerRate | DELETE /api/customers/{id}/rates/{rateId} | Deletes one rate for a customer |
CustomerApi | getGetCustomer | GET /api/customers/{id} | Returns one customer |
CustomerApi | getGetCustomerRates | GET /api/customers/{id}/rates | Returns a collection of all rates for one customer |
CustomerApi | getGetCustomers | GET /api/customers | Returns a collection of customers (which are visible to the user) |
CustomerApi | patchAppApiCustomerMeta | PATCH /api/customers/{id}/meta | Sets the value of a meta-field for an existing customer |
CustomerApi | patchPatchCustomer | PATCH /api/customers/{id} | Update an existing customer |
CustomerApi | postPostCustomer | POST /api/customers | Creates a new customer |
CustomerApi | postPostCustomerRate | POST /api/customers/{id}/rates | Adds a new rate to a customer |
DefaultApi | getAppApiConfigurationColorconfig | GET /api/config/colors | Returns the configured color codes and names |
DefaultApi | getAppApiConfigurationTimesheetconfig | GET /api/config/timesheet | Returns the timesheet configuration |
DefaultApi | getAppApiStatusPing | GET /api/ping | A testing route for the API |
DefaultApi | getAppApiStatusPlugin | GET /api/plugins | Returns information about installed Plugins |
DefaultApi | getAppApiStatusVersion | GET /api/version | Returns information about the Kimai release |
DemoApi | getKimaipluginDemoApiDemoCget | GET /api/demos | Returns a collection of demo entities |
DemoApi | getKimaipluginDemoApiDemoGet | GET /api/demos/{id} | Returns one demo entity |
ExpenseApi | deleteDeleteExpense | DELETE /api/expenses/{id} | Delete an existing expense record |
ExpenseApi | getGetExpense | GET /api/expenses/{id} | Returns one expense |
ExpenseApi | getGetExpenseCategories | GET /api/expenses/categories | Get all visible expense categories (requires "manage_expense_category" permission) |
ExpenseApi | getGetExpenses | GET /api/expenses | Returns a collection of expenses |
ExpenseApi | patchDuplicateExpense | PATCH /api/expenses/{id}/duplicate | Duplicates an existing expense record |
ExpenseApi | patchKimaipluginExpensesApiExpenseMeta | PATCH /api/expenses/{id}/meta | Sets the value of a meta-field for an existing expense |
ExpenseApi | patchPatchExpense | PATCH /api/expenses/{id} | Update an existing expense |
ExpenseApi | postPostExpense | POST /api/expenses | Creates a new expense |
InvoiceApi | getGetInvoice | GET /api/invoices/{id} | Returns one invoice. |
InvoiceApi | getGetInvoices | GET /api/invoices | Returns a paginated collection of invoices. |
KioskApi | getApiKioskGetUserauthByUser | GET /api/kiosk/codes/{id} | Returns one UserAuthCodes entity |
KioskApi | getApiKioskGetUserauths | GET /api/kiosk/codes | Returns a collection of UserAuthCodes objects |
MetaFieldApi | getKimaipluginMetafieldsApiMetafieldsCget | GET /api/metafields | Returns a collection of meta-fields |
ProjectApi | deleteDeleteProject | DELETE /api/projects/{id} | Delete an existing project |
ProjectApi | deleteDeleteProjectRate | DELETE /api/projects/{id}/rates/{rateId} | Deletes one rate for a project |
ProjectApi | getGetProject | GET /api/projects/{id} | Returns one project |
ProjectApi | getGetProjectRates | GET /api/projects/{id}/rates | Returns a collection of all rates for one project |
ProjectApi | getGetProjects | GET /api/projects | Returns a collection of projects (which are visible to the user) |
ProjectApi | patchAppApiProjectMeta | PATCH /api/projects/{id}/meta | Sets the value of a meta-field for an existing project |
ProjectApi | patchPatchProject | PATCH /api/projects/{id} | Update an existing project |
ProjectApi | postPostProject | POST /api/projects | Creates a new project |
ProjectApi | postPostProjectRate | POST /api/projects/{id}/rates | Adds a new rate to a project |
TagApi | deleteDeleteTag | DELETE /api/tags/{id} | Delete a tag |
TagApi | getGetTags | GET /api/tags | Deprecated: Fetch tags by filter as string collection |
TagApi | getGetTagsFull | GET /api/tags/find | Fetch tags by filter (as full entities) |
TagApi | postPostTag | POST /api/tags | Creates a new tag |
TaskApi | deleteDeleteTask | DELETE /api/tasks/{id} | Delete an existing task record |
TaskApi | getGetTask | GET /api/tasks/{id} | Returns one task |
TaskApi | getGetTasks | GET /api/tasks | Returns a collection of tasks |
TaskApi | getTasksTimesheets | GET /api/tasks/{id}/timesheets | Returns a collection of timesheets for one task |
TaskApi | patchAssignTask | PATCH /api/tasks/{id}/assign | Assign a task to the current user |
TaskApi | patchCloseTask | PATCH /api/tasks/{id}/close | Close a task for the current user |
TaskApi | patchKimaipluginTaskmanagementApiTaskMeta | PATCH /api/tasks/{id}/meta | Sets the value of a meta-field for an existing task |
TaskApi | patchLogTask | PATCH /api/tasks/{id}/log | Logs work for a task record |
TaskApi | patchPatchTask | PATCH /api/tasks/{id} | Update an existing task |
TaskApi | patchReopenTask | PATCH /api/tasks/{id}/reopen | Reopens a task for the current user |
TaskApi | patchStartTask | PATCH /api/tasks/{id}/start | Start working on a task |
TaskApi | patchStopTask | PATCH /api/tasks/{id}/stop | Stops a task record for the current user |
TaskApi | patchUnassignTask | PATCH /api/tasks/{id}/unassign | Unassign a task from the current user |
TaskApi | postPostTask | POST /api/tasks | Creates a new Task |
TeamApi | deleteDeleteTeam | DELETE /api/teams/{id} | Delete a team |
TeamApi | deleteDeleteTeamActivity | DELETE /api/teams/{id}/activities/{activityId} | Revokes access for an activity from a team |
TeamApi | deleteDeleteTeamCustomer | DELETE /api/teams/{id}/customers/{customerId} | Revokes access for a customer from a team |
TeamApi | deleteDeleteTeamMember | DELETE /api/teams/{id}/members/{userId} | Removes a member from the team |
TeamApi | deleteDeleteTeamProject | DELETE /api/teams/{id}/projects/{projectId} | Revokes access for a project from a team |
TeamApi | getGetTeam | GET /api/teams/{id} | Returns one team |
TeamApi | getGetTeams | GET /api/teams | Fetch all existing teams (which are visible to the user) |
TeamApi | patchPatchTeam | PATCH /api/teams/{id} | Update an existing team |
TeamApi | postPostTeam | POST /api/teams | Creates a new team |
TeamApi | postPostTeamActivity | POST /api/teams/{id}/activities/{activityId} | Grant the team access to an activity |
TeamApi | postPostTeamCustomer | POST /api/teams/{id}/customers/{customerId} | Grant the team access to a customer |
TeamApi | postPostTeamMember | POST /api/teams/{id}/members/{userId} | Add a new member to a team |
TeamApi | postPostTeamProject | POST /api/teams/{id}/projects/{projectId} | Grant the team access to a project |
TimesheetApi | deleteDeleteTimesheet | DELETE /api/timesheets/{id} | Delete an existing timesheet record |
TimesheetApi | getActiveTimesheet | GET /api/timesheets/active | Returns the collection of active timesheet records |
TimesheetApi | getGetTimesheet | GET /api/timesheets/{id} | Returns one timesheet record |
TimesheetApi | getGetTimesheets | GET /api/timesheets | Returns a collection of timesheet records (which are visible to the user) |
TimesheetApi | getRecentTimesheet | GET /api/timesheets/recent | Returns the collection of recent user activities |
TimesheetApi | getRestartTimesheetGet | GET /api/timesheets/{id}/restart | Restarts a previously stopped timesheet record for the current user |
TimesheetApi | getStopTimesheetGet | GET /api/timesheets/{id}/stop | Stops an active timesheet record. |
TimesheetApi | patchAppApiTimesheetMeta | PATCH /api/timesheets/{id}/meta | Sets the value of a meta-field for an existing timesheet. |
TimesheetApi | patchDuplicateTimesheet | PATCH /api/timesheets/{id}/duplicate | Duplicates an existing timesheet record |
TimesheetApi | patchExportTimesheet | PATCH /api/timesheets/{id}/export | Switch the export state of a timesheet record to (un-)lock it |
TimesheetApi | patchPatchTimesheet | PATCH /api/timesheets/{id} | Update an existing timesheet record |
TimesheetApi | patchRestartTimesheet | PATCH /api/timesheets/{id}/restart | Restarts a previously stopped timesheet record for the current user |
TimesheetApi | patchStopTimesheet | PATCH /api/timesheets/{id}/stop | Stops an active timesheet record. |
TimesheetApi | postPostTimesheet | POST /api/timesheets | Creates a new timesheet record |
UserApi | deleteDeleteApiToken | DELETE /api/users/api-token/{id} | Delete an API token for the current user |
UserApi | getGetUser | GET /api/users/{id} | Return one user entity |
UserApi | getGetUsers | GET /api/users | Returns the collection of users (which are visible to the user) |
UserApi | getMeUser | GET /api/users/me | Return the current user entity |
UserApi | patchPatchUser | PATCH /api/users/{id} | Update an existing user |
UserApi | postPostUser | POST /api/users | Creates a new user |
- 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
- Type: HTTP bearer authentication