All URIs are relative to https://localhost:8080/api/v9
Method | HTTP request | Description |
---|---|---|
reports_api_v3_workspace_workspace_id_weekly_time_entries_csv_post | POST /reports/api/v3/workspace/{workspace_id}/weekly/time_entries.csv | Export weekly report |
reports_api_v3_workspace_workspace_id_weekly_time_entries_pdf_post | POST /reports/api/v3/workspace/{workspace_id}/weekly/time_entries.pdf | Export weekly report |
reports_api_v3_workspace_workspace_id_weekly_time_entries_post | POST /reports/api/v3/workspace/{workspace_id}/weekly/time_entries | Search time entries |
str reports_api_v3_workspace_workspace_id_weekly_time_entries_csv_post(workspace_id, weekly_export_post)
Export weekly report
Downloads weekly report in csv format.
from __future__ import print_function
import time
import toggl
from toggl.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: BasicAuth
configuration = toggl.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# create an instance of the API class
api_instance = toggl.WeeklyReportsApi(toggl.ApiClient(configuration))
workspace_id = 56 # int | Workspace ID
weekly_export_post = toggl.WeeklyExportPost() # WeeklyExportPost | Weekly report conditions
try:
# Export weekly report
api_response = api_instance.reports_api_v3_workspace_workspace_id_weekly_time_entries_csv_post(workspace_id, weekly_export_post)
pprint(api_response)
except ApiException as e:
print("Exception when calling WeeklyReportsApi->reports_api_v3_workspace_workspace_id_weekly_time_entries_csv_post: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
workspace_id | int | Workspace ID | |
weekly_export_post | WeeklyExportPost | Weekly report conditions |
str
- Content-Type: Not defined
- Accept: text/csv
[Back to top] [Back to API list] [Back to Model list] [Back to README]
str reports_api_v3_workspace_workspace_id_weekly_time_entries_pdf_post(workspace_id, weekly_export_pdf_post)
Export weekly report
Downloads weekly report in pdf format.
from __future__ import print_function
import time
import toggl
from toggl.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: BasicAuth
configuration = toggl.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# create an instance of the API class
api_instance = toggl.WeeklyReportsApi(toggl.ApiClient(configuration))
workspace_id = 56 # int | Workspace ID
weekly_export_pdf_post = toggl.WeeklyExportPDFPost() # WeeklyExportPDFPost | Weekly report conditions
try:
# Export weekly report
api_response = api_instance.reports_api_v3_workspace_workspace_id_weekly_time_entries_pdf_post(workspace_id, weekly_export_pdf_post)
pprint(api_response)
except ApiException as e:
print("Exception when calling WeeklyReportsApi->reports_api_v3_workspace_workspace_id_weekly_time_entries_pdf_post: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
workspace_id | int | Workspace ID | |
weekly_export_pdf_post | WeeklyExportPDFPost | Weekly report conditions |
str
- Content-Type: Not defined
- Accept: application/pdf
[Back to top] [Back to API list] [Back to Model list] [Back to README]
str reports_api_v3_workspace_workspace_id_weekly_time_entries_post(workspace_id, post)
Search time entries
Returns time entries for weekly report according to the given filters.
from __future__ import print_function
import time
import toggl
from toggl.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: BasicAuth
configuration = toggl.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# create an instance of the API class
api_instance = toggl.WeeklyReportsApi(toggl.ApiClient(configuration))
workspace_id = 56 # int | Workspace ID
post = toggl.BasePost() # BasePost | Weekly report conditions
try:
# Search time entries
api_response = api_instance.reports_api_v3_workspace_workspace_id_weekly_time_entries_post(workspace_id, post)
pprint(api_response)
except ApiException as e:
print("Exception when calling WeeklyReportsApi->reports_api_v3_workspace_workspace_id_weekly_time_entries_post: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
workspace_id | int | Workspace ID | |
post | BasePost | Weekly report conditions |
str
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]