Skip to content

Latest commit

 

History

History
169 lines (121 loc) · 5.82 KB

TimelogApi.md

File metadata and controls

169 lines (121 loc) · 5.82 KB

VereTech\SyncroMSP_PHPclient\Client\TimelogApi

All URIs are relative to https://{subdomain}.syncromsp.com/api/v1

Method HTTP request Description
timelogsGet GET /timelogs Returns a paginated list of Timelogs
timelogsLastGet GET /timelogs/last Returns last Timelog
timelogsPut PUT /timelogs Updates a Timelog

timelogsGet

timelogsGet($user_id)

Returns a paginated list of Timelogs

Users with permission "Timelogs - Manage" may see timelogs for any/all users. Otherwise, results scoped to current user.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: bearerAuth
$config = VereTech\SyncroMSP_PHPclient\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = VereTech\SyncroMSP_PHPclient\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$apiInstance = new VereTech\SyncroMSP_PHPclient\Client\Api\TimelogApi(
    // 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_id = 56; // int | Returns Timelogs that belong to a User

try {
    $apiInstance->timelogsGet($user_id);
} catch (Exception $e) {
    echo 'Exception when calling TimelogApi->timelogsGet: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
user_id int Returns Timelogs that belong to a User [optional]

Return type

void (empty response body)

Authorization

bearerAuth

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

timelogsLastGet

timelogsLastGet($user_id)

Returns last Timelog

Users with permission "Timelogs - Manage" may see timelogs for any/all users. Otherwise, results scoped to current user.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: bearerAuth
$config = VereTech\SyncroMSP_PHPclient\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = VereTech\SyncroMSP_PHPclient\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$apiInstance = new VereTech\SyncroMSP_PHPclient\Client\Api\TimelogApi(
    // 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_id = 56; // int | Returns Timelogs that belong to a User. The default is current user ID.

try {
    $apiInstance->timelogsLastGet($user_id);
} catch (Exception $e) {
    echo 'Exception when calling TimelogApi->timelogsLastGet: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
user_id int Returns Timelogs that belong to a User. The default is current user ID. [optional]

Return type

void (empty response body)

Authorization

bearerAuth

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

timelogsPut

timelogsPut($body)

Updates a Timelog

Users with permission "Timelogs - Manage" may see timelogs for any/all users. Otherwise, results scoped to current user.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: bearerAuth
$config = VereTech\SyncroMSP_PHPclient\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = VereTech\SyncroMSP_PHPclient\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$apiInstance = new VereTech\SyncroMSP_PHPclient\Client\Api\TimelogApi(
    // 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 \VereTech\SyncroMSP_PHPclient\Client\Model\TimelogsBody(); // \VereTech\SyncroMSP_PHPclient\Client\Model\TimelogsBody | 

try {
    $apiInstance->timelogsPut($body);
} catch (Exception $e) {
    echo 'Exception when calling TimelogApi->timelogsPut: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
body \VereTech\SyncroMSP_PHPclient\Client\Model\TimelogsBody [optional]

Return type

void (empty response body)

Authorization

bearerAuth

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]