kimai_client_lib 1.0.0

JSON API for the Kimai time-tracking software. Read our [API documentation](https://www.kimai.org/documentation/rest-api.html) and download the [Open API definition](doc.json) to import into your API client.
Documentation
# \ActivityApi

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

Method | HTTP request | Description
------------- | ------------- | -------------
[**delete_delete_activity**]ActivityApi.md#delete_delete_activity | **DELETE** /api/activities/{id} | Delete an existing activity
[**delete_delete_activity_rate**]ActivityApi.md#delete_delete_activity_rate | **DELETE** /api/activities/{id}/rates/{rateId} | Deletes one rate for an activity
[**get_get_activities**]ActivityApi.md#get_get_activities | **GET** /api/activities | Returns a collection of activities (which are visible to the user)
[**get_get_activity**]ActivityApi.md#get_get_activity | **GET** /api/activities/{id} | Returns one activity
[**get_get_activity_rates**]ActivityApi.md#get_get_activity_rates | **GET** /api/activities/{id}/rates | Returns a collection of all rates for one activity
[**patch_app_api_activity_meta**]ActivityApi.md#patch_app_api_activity_meta | **PATCH** /api/activities/{id}/meta | Sets the value of a meta-field for an existing activity
[**patch_patch_activity**]ActivityApi.md#patch_patch_activity | **PATCH** /api/activities/{id} | Update an existing activity
[**post_post_activity**]ActivityApi.md#post_post_activity | **POST** /api/activities | Creates a new activity
[**post_post_activity_rate**]ActivityApi.md#post_post_activity_rate | **POST** /api/activities/{id}/rates | Adds a new rate to an activity



## delete_delete_activity

> delete_delete_activity(id)
Delete an existing activity

[DANGER] This will also delete ALL linked timesheets. Maybe use `PATCH` instead and mark it as inactive with `visible=false`?

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**id** | **String** | Activity ID to delete | [required] |

### Return type

 (empty response body)

### Authorization

[bearer](../README.md#bearer)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: Not defined

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## delete_delete_activity_rate

> delete_delete_activity_rate(id, rate_id)
Deletes one rate for an activity

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**id** | **String** | The activity whose rate will be removed | [required] |
**rate_id** | **String** | The rate to remove | [required] |

### Return type

 (empty response body)

### Authorization

[bearer](../README.md#bearer)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: Not defined

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## get_get_activities

> Vec<models::ActivityCollection> get_get_activities(project, projects_left_square_bracket_right_square_bracket, visible, globals, order_by, order, term)
Returns a collection of activities (which are visible to the user)

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**project** | Option<**String**> | Project ID to filter activities |  |
**projects_left_square_bracket_right_square_bracket** | Option<[**Vec<serde_json::Value>**]serde_json::Value.md> | List of project IDs to filter activities, e.g.: projects[]=1&projects[]=2 |  |[default to []]
**visible** | Option<**String**> | Visibility status to filter activities: 1=visible, 2=hidden, 3=all |  |[default to 1]
**globals** | Option<**String**> | Use if you want to fetch only global activities. Allowed values: 0|1 (default: 0 for false) |  |
**order_by** | Option<**String**> | The field by which results will be ordered. Allowed values: id, name, project (default: name) |  |
**order** | Option<**String**> | The result order. Allowed values: ASC, DESC (default: ASC) |  |
**term** | Option<**String**> | Free search term |  |

### Return type

[**Vec<models::ActivityCollection>**](ActivityCollection.md)

### Authorization

[bearer](../README.md#bearer)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## get_get_activity

> models::ActivityEntity get_get_activity(id)
Returns one activity

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**id** | **String** | Activity ID to fetch | [required] |

### Return type

[**models::ActivityEntity**](ActivityEntity.md)

### Authorization

[bearer](../README.md#bearer)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## get_get_activity_rates

> Vec<models::ActivityRate> get_get_activity_rates(id)
Returns a collection of all rates for one activity

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**id** | **String** | The activity whose rates will be returned | [required] |

### Return type

[**Vec<models::ActivityRate>**](ActivityRate.md)

### Authorization

[bearer](../README.md#bearer)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## patch_app_api_activity_meta

> models::ActivityEntity patch_app_api_activity_meta(id, patch_kimaiplugin_expenses_api_expense_meta_request)
Sets the value of a meta-field for an existing activity

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**id** | **String** | Activity record ID to set the meta-field value for | [required] |
**patch_kimaiplugin_expenses_api_expense_meta_request** | Option<[**PatchKimaipluginExpensesApiExpenseMetaRequest**]PatchKimaipluginExpensesApiExpenseMetaRequest.md> |  |  |

### Return type

[**models::ActivityEntity**](ActivityEntity.md)

### Authorization

[bearer](../README.md#bearer)

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## patch_patch_activity

> models::ActivityEntity patch_patch_activity(id, activity_edit_form)
Update an existing activity

Update an existing activity, you can pass all or just a subset of all attributes

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**id** | **String** | Activity ID to update | [required] |
**activity_edit_form** | [**ActivityEditForm**]ActivityEditForm.md |  | [required] |

### Return type

[**models::ActivityEntity**](ActivityEntity.md)

### Authorization

[bearer](../README.md#bearer)

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## post_post_activity

> models::ActivityEntity post_post_activity(activity_edit_form)
Creates a new activity

Creates a new activity and returns it afterwards

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**activity_edit_form** | [**ActivityEditForm**]ActivityEditForm.md |  | [required] |

### Return type

[**models::ActivityEntity**](ActivityEntity.md)

### Authorization

[bearer](../README.md#bearer)

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## post_post_activity_rate

> models::ActivityRate post_post_activity_rate(id, activity_rate_form)
Adds a new rate to an activity

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**id** | **String** | The activity to add the rate for | [required] |
**activity_rate_form** | [**ActivityRateForm**]ActivityRateForm.md |  | [required] |

### Return type

[**models::ActivityRate**](ActivityRate.md)

### Authorization

[bearer](../README.md#bearer)

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)