All URIs are relative to https://api.timeular.com/api/v2/
Method | HTTP request | Description |
---|---|---|
create_time_entry | POST /time-entries | Create Time Entry |
delete_time_entry | DELETE /time-entries/{timeEntryId} | Delete a Time Entry |
edit_time_entry | PATCH /time-entries/{timeEntryId} | Edit a Time Entry |
get_time_entries_in_range | GET /time-entries/{stoppedAfter}/{startedBefore} | Find Time Entries in given range |
get_time_entry | GET /time-entries/{timeEntryId} | Find Time Entry by its ID |
TimeEntryResponse create_time_entry(properties_of_a_new_time_entry=properties_of_a_new_time_entry)
Create Time Entry
With this endpoint, you can create a new Time Entry. It should be connected to an Activity and have a duration no shorter than 1 minute. A Note can be provided too, but it's not required. Within this Note, you can refer one or more Tags or Mentions, each of the prefixes must be configured with the start and the end index within the Note text and can be defined with a key. If key is not defined a random id will be generated and assigned. If you are referring to an existing Tag or Mention you can provide that key but the content of the Tag or Mention must be the same. If the related Activity is bound to some Integration, let's say JIRA Project, JIRA task IDs is a valid Tag too. 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.TimeTrackingTimeEntriesApi(timeular_api.ApiClient(configuration))
properties_of_a_new_time_entry = timeular_api.TimeEntryCreationRequest() # TimeEntryCreationRequest | properties of a new Time Entry (optional)
try:
# Create Time Entry
api_response = api_instance.create_time_entry(properties_of_a_new_time_entry=properties_of_a_new_time_entry)
pprint(api_response)
except ApiException as e:
print("Exception when calling TimeTrackingTimeEntriesApi->create_time_entry: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
properties_of_a_new_time_entry | TimeEntryCreationRequest | properties of a new Time Entry | [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]
SuccessWithIgnoredErrorsResponse delete_time_entry(time_entry_id)
Delete a Time Entry
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.TimeTrackingTimeEntriesApi(timeular_api.ApiClient(configuration))
time_entry_id = 'time_entry_id_example' # str | ID of a Time Entry, eg. `987`
try:
# Delete a Time Entry
api_response = api_instance.delete_time_entry(time_entry_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling TimeTrackingTimeEntriesApi->delete_time_entry: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
time_entry_id | str | ID of a Time Entry, eg. `987` |
SuccessWithIgnoredErrorsResponse
- Content-Type: application/json
- Accept: application/json;charset=UTF-8
[Back to top] [Back to API list] [Back to Model list] [Back to README]
TimeEntryResponse edit_time_entry(time_entry_id, properties_to_change=properties_to_change)
Edit a Time Entry
With this endpoint you can edit existing Time Entry. When changing Activity ID please note, that both new and old Activity attached to Time Entry have to belong to same Integration. 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.TimeTrackingTimeEntriesApi(timeular_api.ApiClient(configuration))
time_entry_id = 'time_entry_id_example' # str | ID of a Time Entry, eg. `987`
properties_to_change = timeular_api.TimeEntryEditionRequest() # TimeEntryEditionRequest | properties to change (optional)
try:
# Edit a Time Entry
api_response = api_instance.edit_time_entry(time_entry_id, properties_to_change=properties_to_change)
pprint(api_response)
except ApiException as e:
print("Exception when calling TimeTrackingTimeEntriesApi->edit_time_entry: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
time_entry_id | str | ID of a Time Entry, eg. `987` | |
properties_to_change | TimeEntryEditionRequest | properties to change | [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]
TimeEntriesResponse get_time_entries_in_range(stopped_after, started_before)
Find Time Entries in given range
Find Time Entries which have at least one millisecond in common with provided time range.
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.TimeTrackingTimeEntriesApi(timeular_api.ApiClient(configuration))
stopped_after = 'stopped_after_example' # str | Timestamp which matches all Time Entries stopped after it. Eg. `2017-01-01T00:00:00.000`.
started_before = 'started_before_example' # str | Timestamp which matches all Time Entries started before it. Eg. `2017-12-31T23:59:59.999`.
try:
# Find Time Entries in given range
api_response = api_instance.get_time_entries_in_range(stopped_after, started_before)
pprint(api_response)
except ApiException as e:
print("Exception when calling TimeTrackingTimeEntriesApi->get_time_entries_in_range: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
stopped_after | str | Timestamp which matches all Time Entries stopped after it. Eg. `2017-01-01T00:00:00.000`. | |
started_before | str | Timestamp which matches all Time Entries started before it. Eg. `2017-12-31T23:59:59.999`. |
- Content-Type: application/json
- Accept: application/json;charset=UTF-8
[Back to top] [Back to API list] [Back to Model list] [Back to README]
TimeEntryResponse get_time_entry(time_entry_id)
Find Time Entry by its ID
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.TimeTrackingTimeEntriesApi(timeular_api.ApiClient(configuration))
time_entry_id = 'time_entry_id_example' # str | ID of a Time Entry, eg. `987`
try:
# Find Time Entry by its ID
api_response = api_instance.get_time_entry(time_entry_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling TimeTrackingTimeEntriesApi->get_time_entry: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
time_entry_id | str | ID of a Time Entry, eg. `987` |
- Content-Type: application/json
- Accept: application/json;charset=UTF-8
[Back to top] [Back to API list] [Back to Model list] [Back to README]