All URIs are relative to http://localhost.
Method | HTTP request | Description |
---|---|---|
apiTagsGet() | GET /api/tags | Fetch all existing tags |
apiTagsIdDelete() | DELETE /api/tags/{id} | Delete a tag |
apiTagsPost() | POST /api/tags | Creates a new tag |
apiTagsGet($name): string[]
Fetch all existing tags
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: apiToken
$config = Fiteco\KimaiClient\Configuration::getDefaultConfiguration()->setApiKey('X-AUTH-TOKEN', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Fiteco\KimaiClient\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-AUTH-TOKEN', 'Bearer');
// Configure API key authorization: apiUser
$config = Fiteco\KimaiClient\Configuration::getDefaultConfiguration()->setApiKey('X-AUTH-USER', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Fiteco\KimaiClient\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-AUTH-USER', 'Bearer');
$apiInstance = new Fiteco\KimaiClient\Api\TagApi(
// 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
);
$name = 'name_example'; // string | Search term to filter tag list
try {
$result = $apiInstance->apiTagsGet($name);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling TagApi->apiTagsGet: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
name | string | Search term to filter tag list | [optional] |
string[]
- Content-Type: Not defined
- Accept:
*/*
[Back to top] [Back to API list] [Back to Model list] [Back to README]
apiTagsIdDelete($id)
Delete a tag
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: apiToken
$config = Fiteco\KimaiClient\Configuration::getDefaultConfiguration()->setApiKey('X-AUTH-TOKEN', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Fiteco\KimaiClient\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-AUTH-TOKEN', 'Bearer');
// Configure API key authorization: apiUser
$config = Fiteco\KimaiClient\Configuration::getDefaultConfiguration()->setApiKey('X-AUTH-USER', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Fiteco\KimaiClient\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-AUTH-USER', 'Bearer');
$apiInstance = new Fiteco\KimaiClient\Api\TagApi(
// 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 = 56; // int | Tag ID to delete
try {
$apiInstance->apiTagsIdDelete($id);
} catch (Exception $e) {
echo 'Exception when calling TagApi->apiTagsIdDelete: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
id | int | Tag ID to delete |
void (empty response body)
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
apiTagsPost($body): \Fiteco\KimaiClient\Model\TagEntity
Creates a new tag
Creates a new tag and returns it afterwards
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: apiToken
$config = Fiteco\KimaiClient\Configuration::getDefaultConfiguration()->setApiKey('X-AUTH-TOKEN', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Fiteco\KimaiClient\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-AUTH-TOKEN', 'Bearer');
// Configure API key authorization: apiUser
$config = Fiteco\KimaiClient\Configuration::getDefaultConfiguration()->setApiKey('X-AUTH-USER', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Fiteco\KimaiClient\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-AUTH-USER', 'Bearer');
$apiInstance = new Fiteco\KimaiClient\Api\TagApi(
// 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
);
$body = new \Fiteco\KimaiClient\Model\TagEditForm(); // \Fiteco\KimaiClient\Model\TagEditForm
try {
$result = $apiInstance->apiTagsPost($body);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling TagApi->apiTagsPost: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
body | \Fiteco\KimaiClient\Model\TagEditForm |
\Fiteco\KimaiClient\Model\TagEntity
- Content-Type: Not defined
- Accept:
*/*
[Back to top] [Back to API list] [Back to Model list] [Back to README]