All URIs are relative to https://api.timeular.com/api/v2/
Method | HTTP request | Description |
---|---|---|
edit_tracking | PATCH /tracking/{activityId} | Edit Tracking |
get_current_tracking | GET /tracking | Show current Tracking |
start_tracking | POST /tracking/{activityId}/start | Start Tracking |
stop_tracking | POST /tracking/{activityId}/stop | Stop Tracking |
EditTrackingResponse edit_tracking(activity_id, changed_note_of_a_tracking=changed_note_of_a_tracking)
Edit Tracking
With this endpoint, you can set/edit/remove Note of current Tracking. To remove a Note, just set the complete object to null and all values within the object will be deleted too.
from __future__ import print_function
import time
import timeular_api
from timeular_api.rest import ApiException
from pprint import pprint
# Configure API key authorization: AuthorizationHeader
configuration = timeular_api.Configuration()
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
# create an instance of the API class
api_instance = timeular_api.TimeTrackingCurrentTrackingApi(timeular_api.ApiClient(configuration))
activity_id = 'activity_id_example' # str | ID of an Activity on which you are tracking time, eg. `123`
changed_note_of_a_tracking = timeular_api.EditTrackingRequest() # EditTrackingRequest | changed note of a Tracking (optional)
try:
# Edit Tracking
api_response = api_instance.edit_tracking(activity_id, changed_note_of_a_tracking=changed_note_of_a_tracking)
pprint(api_response)
except ApiException as e:
print("Exception when calling TimeTrackingCurrentTrackingApi->edit_tracking: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
activity_id | str | ID of an Activity on which you are tracking time, eg. `123` | |
changed_note_of_a_tracking | EditTrackingRequest | changed note of a Tracking | [optional] |
- Content-Type: application/json
- Accept: application/json;charset=UTF-8
[Back to top] [Back to API list] [Back to Model list] [Back to README]
CurrentTrackingResponse get_current_tracking()
Show current Tracking
from __future__ import print_function
import time
import timeular_api
from timeular_api.rest import ApiException
from pprint import pprint
# Configure API key authorization: AuthorizationHeader
configuration = timeular_api.Configuration()
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
# create an instance of the API class
api_instance = timeular_api.TimeTrackingCurrentTrackingApi(timeular_api.ApiClient(configuration))
try:
# Show current Tracking
api_response = api_instance.get_current_tracking()
pprint(api_response)
except ApiException as e:
print("Exception when calling TimeTrackingCurrentTrackingApi->get_current_tracking: %s\n" % e)
This endpoint does not need any parameter.
- Content-Type: application/json
- Accept: application/json;charset=UTF-8
[Back to top] [Back to API list] [Back to Model list] [Back to README]
StartedTrackingResponse start_tracking(activity_id, start_timestamp_of_a_tracking=start_timestamp_of_a_tracking)
Start Tracking
from __future__ import print_function
import time
import timeular_api
from timeular_api.rest import ApiException
from pprint import pprint
# Configure API key authorization: AuthorizationHeader
configuration = timeular_api.Configuration()
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
# create an instance of the API class
api_instance = timeular_api.TimeTrackingCurrentTrackingApi(timeular_api.ApiClient(configuration))
activity_id = 'activity_id_example' # str | ID of an Activity on which you want to track time, eg. `123`
start_timestamp_of_a_tracking = timeular_api.StartTrackingRequest() # StartTrackingRequest | start timestamp of a Tracking (optional)
try:
# Start Tracking
api_response = api_instance.start_tracking(activity_id, start_timestamp_of_a_tracking=start_timestamp_of_a_tracking)
pprint(api_response)
except ApiException as e:
print("Exception when calling TimeTrackingCurrentTrackingApi->start_tracking: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
activity_id | str | ID of an Activity on which you want to track time, eg. `123` | |
start_timestamp_of_a_tracking | StartTrackingRequest | start timestamp of a Tracking | [optional] |
- Content-Type: application/json
- Accept: application/json;charset=UTF-8
[Back to top] [Back to API list] [Back to Model list] [Back to README]
StoppedTrackingResponse stop_tracking(activity_id, stop_timestamp_of_a_tracking=stop_timestamp_of_a_tracking)
Stop Tracking
With this endpoint, you can create a new Time Entry by stopping current time Tracking. Resulting Time Entry should have duration no shorter than 1 minute. The new Time Entry will be created even if it overlaps with other Time Entries – in result existing Time Entries will be split or deleted in such manner, that new one will fit without overlapping.
from __future__ import print_function
import time
import timeular_api
from timeular_api.rest import ApiException
from pprint import pprint
# Configure API key authorization: AuthorizationHeader
configuration = timeular_api.Configuration()
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
# create an instance of the API class
api_instance = timeular_api.TimeTrackingCurrentTrackingApi(timeular_api.ApiClient(configuration))
activity_id = 'activity_id_example' # str | ID of an Activity on which you are tracking time, eg. `123`
stop_timestamp_of_a_tracking = timeular_api.StopTrackingRequest() # StopTrackingRequest | stop timestamp of a Tracking (optional)
try:
# Stop Tracking
api_response = api_instance.stop_tracking(activity_id, stop_timestamp_of_a_tracking=stop_timestamp_of_a_tracking)
pprint(api_response)
except ApiException as e:
print("Exception when calling TimeTrackingCurrentTrackingApi->stop_tracking: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
activity_id | str | ID of an Activity on which you are tracking time, eg. `123` | |
stop_timestamp_of_a_tracking | StopTrackingRequest | stop timestamp of a Tracking | [optional] |
- Content-Type: application/json
- Accept: application/json;charset=UTF-8
[Back to top] [Back to API list] [Back to Model list] [Back to README]