Summary reports
POST List project users
https://api.track.toggl.com/reports/api/v3/workspace/{workspace_id}/projects/summary
Returns summary user projects.
- cURL
- Go
- Ruby
- JavaScript
- Python
- Rust
curl -X POST https://api.track.toggl.com/reports/api/v3/workspace/{workspace_id}/projects/summary \
-H "Content-Type: application/json" \
-d '\{"end_date":"string","startTime":"string","start_date":"string"\}' \
-u <email>:<password>
bytes, err := json.Marshal('\{"end_date":"string","startTime":"string","start_date":"string"\}')
if err != nil {
print(err)
}
req, err := http.NewRequest(http.MethodPost,
"https://api.track.toggl.com/reports/api/v3/workspace/{workspace_id}/projects/summary", bytes.NewBuffer(bytes))
if err != nil {
print(err)
}
req.Header.Set("Content-Type", "application/json; charset=utf-8")
req.SetBasicAuth("<email>", "<password>")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
print(err)
}
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
print(err)
}
fmt.Print(string(body))
require 'net/http'
require 'uri'
require 'json'
uri = URI('https://api.track.toggl.com/reports/api/v3/workspace/{workspace_id}/projects/summary')
http = Net::HTTP.new(uri.host, uri.port)
req = Net::HTTP::Post.new(uri.path)
req['Content-Type'] = "application/json"
req.body = \{"end_date":"string","startTime":"string","start_date":"string"\}.to_json
request.basic_auth '<email>', '<password>'
res = http.request(req)
puts JSON.parse(res.body)
fetch("https://api.track.toggl.com/reports/api/v3/workspace/{workspace_id}/projects/summary", {
method: "POST",
body: \{"end_date":"string","startTime":"string","start_date":"string"\},
headers: {
"Content-Type": "application/json",
"Authorization": `Basic ${base64.encode(<email>:<password>)}`
},
})
.then((resp) => resp.json())
.then((json) => {
console.log(json);
})
.catch(err => console.error(err));
import requests
from base64 import b64encode
data = requests.post('https://api.track.toggl.com/reports/api/v3/workspace/{workspace_id}/projects/summary', json=\{"end_date":"string","startTime":"string","start_date":"string"\}, headers={'content-type': 'application/json', 'Authorization' : 'Basic %s' % b64encode(b"<email>:<password>").decode("ascii")})
print(data.json())
extern crate tokio;
extern crate serde_json;
use reqwest::{Client};
use reqwest::header::{CONTENT_TYPE};
#[tokio::main]
async fn main() -> Result<(), reqwest::Error> {
let client = Client::new().basic_auth("<email>", "<password>");
let json = client.request(Method::POST, "https://api.track.toggl.com/reports/api/v3/workspace/{workspace_id}/projects/summary".to_string())
.json(&serde_json::json!(\{"end_date":"string","startTime":"string","start_date":"string"\}))
.header(CONTENT_TYPE, "application/json")
.send()
.await?
.json()
.await?;
println!("{:#?}", json);
Ok(())
}
Parameters
Path
name | type | required | description |
---|---|---|---|
workspace_id | integer | true | Workspace ID |
Body
Name | Type | Description |
---|---|---|
end_date | string | End date, example time.DateOnly. Should be greater than Start date. |
startTime | string | - |
start_date | string | Start date, example time.DateOnly. Should be less than End date. |
Response
200
Returns summary user projects
Name | Type | Description |
---|---|---|
items | Array of object | - |
items
Name | Type | Description |
---|---|---|
billable_seconds | integer | - |
project_id | integer | - |
tracked_seconds | integer | - |
user_id | integer | - |
400
Possible error messages:
- At least one parameter must be set
- Invalid workspace id
500
Internal Server Error
POST Load project summary
https://api.track.toggl.com/reports/api/v3/workspace/{workspace_id}/projects/{project_id}/summary
Returns project's summary.
- cURL
- Go
- Ruby
- JavaScript
- Python
- Rust
curl -X POST https://api.track.toggl.com/reports/api/v3/workspace/{workspace_id}/projects/{project_id}/summary \
-H "Content-Type: application/json" \
-d '\{"end_date":"string","startTime":"string","start_date":"string"\}' \
-u <email>:<password>
bytes, err := json.Marshal('\{"end_date":"string","startTime":"string","start_date":"string"\}')
if err != nil {
print(err)
}
req, err := http.NewRequest(http.MethodPost,
"https://api.track.toggl.com/reports/api/v3/workspace/{workspace_id}/projects/{project_id}/summary", bytes.NewBuffer(bytes))
if err != nil {
print(err)
}
req.Header.Set("Content-Type", "application/json; charset=utf-8")
req.SetBasicAuth("<email>", "<password>")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
print(err)
}
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
print(err)
}
fmt.Print(string(body))
require 'net/http'
require 'uri'
require 'json'
uri = URI('https://api.track.toggl.com/reports/api/v3/workspace/{workspace_id}/projects/{project_id}/summary')
http = Net::HTTP.new(uri.host, uri.port)
req = Net::HTTP::Post.new(uri.path)
req['Content-Type'] = "application/json"
req.body = \{"end_date":"string","startTime":"string","start_date":"string"\}.to_json
request.basic_auth '<email>', '<password>'
res = http.request(req)
puts JSON.parse(res.body)
fetch("https://api.track.toggl.com/reports/api/v3/workspace/{workspace_id}/projects/{project_id}/summary", {
method: "POST",
body: \{"end_date":"string","startTime":"string","start_date":"string"\},
headers: {
"Content-Type": "application/json",
"Authorization": `Basic ${base64.encode(<email>:<password>)}`
},
})
.then((resp) => resp.json())
.then((json) => {
console.log(json);
})
.catch(err => console.error(err));
import requests
from base64 import b64encode
data = requests.post('https://api.track.toggl.com/reports/api/v3/workspace/{workspace_id}/projects/{project_id}/summary', json=\{"end_date":"string","startTime":"string","start_date":"string"\}, headers={'content-type': 'application/json', 'Authorization' : 'Basic %s' % b64encode(b"<email>:<password>").decode("ascii")})
print(data.json())
extern crate tokio;
extern crate serde_json;
use reqwest::{Client};
use reqwest::header::{CONTENT_TYPE};
#[tokio::main]
async fn main() -> Result<(), reqwest::Error> {
let client = Client::new().basic_auth("<email>", "<password>");
let json = client.request(Method::POST, "https://api.track.toggl.com/reports/api/v3/workspace/{workspace_id}/projects/{project_id}/summary".to_string())
.json(&serde_json::json!(\{"end_date":"string","startTime":"string","start_date":"string"\}))
.header(CONTENT_TYPE, "application/json")
.send()
.await?
.json()
.await?;
println!("{:#?}", json);
Ok(())
}
Parameters
Path
name | type | required | description |
---|---|---|---|
workspace_id | integer | true | Workspace ID |
project_id | integer | true | Project ID |
Body
Name | Type | Description |
---|---|---|
end_date | string | End date, example time.DateOnly. Should be greater than Start date. |
startTime | string | - |
start_date | string | Start date, example time.DateOnly. Should be less than End date. |
Response
200
Returns project summary
Name | Type | Description |
---|---|---|
billable_amount_in_cents | integer | - |
graph | Array of object | - |
labour_cost_in_cents | integer | - |
rates | Array of object | - |
resolution | string | - |
seconds | integer | - |
tracked_days | integer | - |
graph
Name | Type | Description |
---|---|---|
billable_amount_in_cents | integer | - |
by_rate | object | - |
labour_cost_in_cents | integer | - |
seconds | integer | - |
by_rate
rates
Name | Type | Description |
---|---|---|
billable_seconds | integer | - |
currency | string | - |
hourly_rate_in_cents | integer | - |
400
Possible error messages:
- Invalid workspace id
- Invalid project id
- The {parameter} parameter is required
- Invalid {parameter} format
- {date_range} should be within 2006-01-01 to 2030-01-01
402
Workspace needs to have the {feature} feature enabled
403
Possible error messages:
- Workspace not found/accessible
- project not found or not accessible
500
Internal Server Error
POST Search time entries
https://api.track.toggl.com/reports/api/v3/workspace/{workspace_id}/summary/time_entries
Returns time entries for summary report according to the given filters.
- cURL
- Go
- Ruby
- JavaScript
- Python
- Rust
curl -X POST https://api.track.toggl.com/reports/api/v3/workspace/{workspace_id}/summary/time_entries \
-H "Content-Type: application/json" \
-d '\{"audit":\{"group_filter":\{"currency":"string","max_amount_cents":"integer","max_duration_seconds":"integer","min_amount_cents":"integer","min_duration_seconds":"integer"\},"show_empty_groups":"boolean","show_tracked_groups":"boolean"\},"billable":"boolean","client_ids":[\{\}],"description":"string","distinguish_rates":"boolean","end_date":"string","group_ids":[\{\}],"grouping":"string","include_time_entry_ids":"boolean","max_duration_seconds":"integer","min_duration_seconds":"integer","project_ids":[\{\}],"rounding":"integer","rounding_minutes":"integer","startTime":"string","start_date":"string","sub_grouping":"string","tag_ids":[\{\}],"task_ids":[\{\}],"time_entry_ids":[\{\}],"user_ids":[\{\}]\}' \
-u <email>:<password>
bytes, err := json.Marshal('\{"audit":\{"group_filter":\{"currency":"string","max_amount_cents":"integer","max_duration_seconds":"integer","min_amount_cents":"integer","min_duration_seconds":"integer"\},"show_empty_groups":"boolean","show_tracked_groups":"boolean"\},"billable":"boolean","client_ids":[\{\}],"description":"string","distinguish_rates":"boolean","end_date":"string","group_ids":[\{\}],"grouping":"string","include_time_entry_ids":"boolean","max_duration_seconds":"integer","min_duration_seconds":"integer","project_ids":[\{\}],"rounding":"integer","rounding_minutes":"integer","startTime":"string","start_date":"string","sub_grouping":"string","tag_ids":[\{\}],"task_ids":[\{\}],"time_entry_ids":[\{\}],"user_ids":[\{\}]\}')
if err != nil {
print(err)
}
req, err := http.NewRequest(http.MethodPost,
"https://api.track.toggl.com/reports/api/v3/workspace/{workspace_id}/summary/time_entries", bytes.NewBuffer(bytes))
if err != nil {
print(err)
}
req.Header.Set("Content-Type", "application/json; charset=utf-8")
req.SetBasicAuth("<email>", "<password>")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
print(err)
}
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
print(err)
}
fmt.Print(string(body))
require 'net/http'
require 'uri'
require 'json'
uri = URI('https://api.track.toggl.com/reports/api/v3/workspace/{workspace_id}/summary/time_entries')
http = Net::HTTP.new(uri.host, uri.port)
req = Net::HTTP::Post.new(uri.path)
req['Content-Type'] = "application/json"
req.body = \{"audit":\{"group_filter":\{"currency":"string","max_amount_cents":"integer","max_duration_seconds":"integer","min_amount_cents":"integer","min_duration_seconds":"integer"\},"show_empty_groups":"boolean","show_tracked_groups":"boolean"\},"billable":"boolean","client_ids":[\{\}],"description":"string","distinguish_rates":"boolean","end_date":"string","group_ids":[\{\}],"grouping":"string","include_time_entry_ids":"boolean","max_duration_seconds":"integer","min_duration_seconds":"integer","project_ids":[\{\}],"rounding":"integer","rounding_minutes":"integer","startTime":"string","start_date":"string","sub_grouping":"string","tag_ids":[\{\}],"task_ids":[\{\}],"time_entry_ids":[\{\}],"user_ids":[\{\}]\}.to_json
request.basic_auth '<email>', '<password>'
res = http.request(req)
puts JSON.parse(res.body)
fetch("https://api.track.toggl.com/reports/api/v3/workspace/{workspace_id}/summary/time_entries", {
method: "POST",
body: \{"audit":\{"group_filter":\{"currency":"string","max_amount_cents":"integer","max_duration_seconds":"integer","min_amount_cents":"integer","min_duration_seconds":"integer"\},"show_empty_groups":"boolean","show_tracked_groups":"boolean"\},"billable":"boolean","client_ids":[\{\}],"description":"string","distinguish_rates":"boolean","end_date":"string","group_ids":[\{\}],"grouping":"string","include_time_entry_ids":"boolean","max_duration_seconds":"integer","min_duration_seconds":"integer","project_ids":[\{\}],"rounding":"integer","rounding_minutes":"integer","startTime":"string","start_date":"string","sub_grouping":"string","tag_ids":[\{\}],"task_ids":[\{\}],"time_entry_ids":[\{\}],"user_ids":[\{\}]\},
headers: {
"Content-Type": "application/json",
"Authorization": `Basic ${base64.encode(<email>:<password>)}`
},
})
.then((resp) => resp.json())
.then((json) => {
console.log(json);
})
.catch(err => console.error(err));
import requests
from base64 import b64encode
data = requests.post('https://api.track.toggl.com/reports/api/v3/workspace/{workspace_id}/summary/time_entries', json=\{"audit":\{"group_filter":\{"currency":"string","max_amount_cents":"integer","max_duration_seconds":"integer","min_amount_cents":"integer","min_duration_seconds":"integer"\},"show_empty_groups":"boolean","show_tracked_groups":"boolean"\},"billable":"boolean","client_ids":[\{\}],"description":"string","distinguish_rates":"boolean","end_date":"string","group_ids":[\{\}],"grouping":"string","include_time_entry_ids":"boolean","max_duration_seconds":"integer","min_duration_seconds":"integer","project_ids":[\{\}],"rounding":"integer","rounding_minutes":"integer","startTime":"string","start_date":"string","sub_grouping":"string","tag_ids":[\{\}],"task_ids":[\{\}],"time_entry_ids":[\{\}],"user_ids":[\{\}]\}, headers={'content-type': 'application/json', 'Authorization' : 'Basic %s' % b64encode(b"<email>:<password>").decode("ascii")})
print(data.json())
extern crate tokio;
extern crate serde_json;
use reqwest::{Client};
use reqwest::header::{CONTENT_TYPE};
#[tokio::main]
async fn main() -> Result<(), reqwest::Error> {
let client = Client::new().basic_auth("<email>", "<password>");
let json = client.request(Method::POST, "https://api.track.toggl.com/reports/api/v3/workspace/{workspace_id}/summary/time_entries".to_string())
.json(&serde_json::json!(\{"audit":\{"group_filter":\{"currency":"string","max_amount_cents":"integer","max_duration_seconds":"integer","min_amount_cents":"integer","min_duration_seconds":"integer"\},"show_empty_groups":"boolean","show_tracked_groups":"boolean"\},"billable":"boolean","client_ids":[\{\}],"description":"string","distinguish_rates":"boolean","end_date":"string","group_ids":[\{\}],"grouping":"string","include_time_entry_ids":"boolean","max_duration_seconds":"integer","min_duration_seconds":"integer","project_ids":[\{\}],"rounding":"integer","rounding_minutes":"integer","startTime":"string","start_date":"string","sub_grouping":"string","tag_ids":[\{\}],"task_ids":[\{\}],"time_entry_ids":[\{\}],"user_ids":[\{\}]\}))
.header(CONTENT_TYPE, "application/json")
.send()
.await?
.json()
.await?;
println!("{:#?}", json);
Ok(())
}
Parameters
Path
name | type | required | description |
---|---|---|---|
workspace_id | integer | true | Workspace ID |
Body
Name | Type | Description |
---|---|---|
audit | object | - |
billable | boolean | Whether the time entry is set as billable, optional, premium feature. |
client_ids | Array of integer | Client IDs, optional, filtering attribute. To filter records with no clients, use [null]. |
description | string | Description, optional, filtering attribute. |
distinguish_rates | boolean | DistinguishRates will create new subgroups for each rate, optional, default false. |
end_date | string | End date, example time.DateOnly. Should be greater than Start date. |
group_ids | Array of integer | Group IDs, optional, filtering attribute. |
grouping | string | Grouping option, optional. |
include_time_entry_ids | boolean | Whether time entry IDs should be included in the results, optional, default false. Not applicable for export. |
max_duration_seconds | integer | Max duration seconds, optional, filtering attribute. Time Audit only, should be greater than MinDurationSeconds. |
min_duration_seconds | integer | Min duration seconds, optional, filtering attribute. Time Audit only, should be less than MaxDurationSeconds. |
project_ids | Array of integer | Project IDs, optional, filtering attribute. To filter records with no projects, use [null]. |
rounding | integer | Whether time should be rounded, optional, default from user preferences. |
rounding_minutes | integer | Rounding minutes value, optional, default from user preferences. Should be 0, 1, 5, 6, 10, 12, 15, 30, 60 or 240. |
startTime | string | - |
start_date | string | Start date, example time.DateOnly. Should be less than End date. |
sub_grouping | string | SubGrouping option, optional. |
tag_ids | Array of integer | Tag IDs, optional, filtering attribute. To filter records with no tags, use [null]. |
task_ids | Array of integer | Task IDs, optional, filtering attribute. To filter records with no tasks, use [null]. |
time_entry_ids | Array of integer | TimeEntryIDs filters by time entries. This was added to support retro-compatibility with reports v2. |
user_ids | Array of integer | User IDs, optional, filtering attribute. |
audit
Name | Type | Description |
---|---|---|
group_filter | object | - |
show_empty_groups | boolean | Whether empty groups should be displayed, default false, premium feature. |
show_tracked_groups | boolean | Whether tacked groups should be displayed, default true, premium feature. |
group_filter
Name | Type | Description |
---|---|---|
currency | string | Audit currency, optional, example "USD", premium feature. |
max_amount_cents | integer | Audit max amount in cents, optional, premium feature. |
max_duration_seconds | integer | Audit max duration in seconds, optional, premium feature. |
min_amount_cents | integer | Audit min amount in cents, optional, premium feature. |
min_duration_seconds | integer | Audit min duration in seconds, optional, premium feature. |
Response
200
Returns the summary time entries
400
Possible error messages:
- At least one parameter must be set
- Invalid workspace id
- Invalid '{parameter}' value, allowed values are: '{valid_values}'
402
Workspace needs to have this feature enabled
403
Workspace not found/accessible
500
Internal Server Error
POST Export summary report
https://api.track.toggl.com/reports/api/v3/workspace/{workspace_id}/summary/time_entries.pdf
Downloads summary report in pdf format.
- cURL
- Go
- Ruby
- JavaScript
- Python
- Rust
curl -X POST https://api.track.toggl.com/reports/api/v3/workspace/{workspace_id}/summary/time_entries.pdf \
-H "Content-Type: application/json" \
-d '\{"audit":\{"group_filter":\{"currency":"string","max_amount_cents":"integer","max_duration_seconds":"integer","min_amount_cents":"integer","min_duration_seconds":"integer"\},"show_empty_groups":"boolean","show_tracked_groups":"boolean"\},"billable":"boolean","cents_separator":"string","client_ids":[\{\}],"collapse":"boolean","date_format":"string","description":"string","distinguish_rates":"boolean","duration_format":"string","end_date":"string","group_ids":[\{\}],"grouping":"string","hide_amounts":"boolean","hide_rates":"boolean","include_time_entry_ids":"boolean","max_duration_seconds":"integer","min_duration_seconds":"integer","order_by":"string","order_dir":"string","project_ids":[\{\}],"resolution":"string","rounding":"integer","rounding_minutes":"integer","startTime":"string","start_date":"string","sub_grouping":"string","tag_ids":[\{\}],"task_ids":[\{\}],"time_entry_ids":[\{\}],"user_ids":[\{\}]\}' \
-u <email>:<password>
bytes, err := json.Marshal('\{"audit":\{"group_filter":\{"currency":"string","max_amount_cents":"integer","max_duration_seconds":"integer","min_amount_cents":"integer","min_duration_seconds":"integer"\},"show_empty_groups":"boolean","show_tracked_groups":"boolean"\},"billable":"boolean","cents_separator":"string","client_ids":[\{\}],"collapse":"boolean","date_format":"string","description":"string","distinguish_rates":"boolean","duration_format":"string","end_date":"string","group_ids":[\{\}],"grouping":"string","hide_amounts":"boolean","hide_rates":"boolean","include_time_entry_ids":"boolean","max_duration_seconds":"integer","min_duration_seconds":"integer","order_by":"string","order_dir":"string","project_ids":[\{\}],"resolution":"string","rounding":"integer","rounding_minutes":"integer","startTime":"string","start_date":"string","sub_grouping":"string","tag_ids":[\{\}],"task_ids":[\{\}],"time_entry_ids":[\{\}],"user_ids":[\{\}]\}')
if err != nil {
print(err)
}
req, err := http.NewRequest(http.MethodPost,
"https://api.track.toggl.com/reports/api/v3/workspace/{workspace_id}/summary/time_entries.pdf", bytes.NewBuffer(bytes))
if err != nil {
print(err)
}
req.Header.Set("Content-Type", "application/json; charset=utf-8")
req.SetBasicAuth("<email>", "<password>")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
print(err)
}
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
print(err)
}
fmt.Print(string(body))
require 'net/http'
require 'uri'
require 'json'
uri = URI('https://api.track.toggl.com/reports/api/v3/workspace/{workspace_id}/summary/time_entries.pdf')
http = Net::HTTP.new(uri.host, uri.port)
req = Net::HTTP::Post.new(uri.path)
req['Content-Type'] = "application/json"
req.body = \{"audit":\{"group_filter":\{"currency":"string","max_amount_cents":"integer","max_duration_seconds":"integer","min_amount_cents":"integer","min_duration_seconds":"integer"\},"show_empty_groups":"boolean","show_tracked_groups":"boolean"\},"billable":"boolean","cents_separator":"string","client_ids":[\{\}],"collapse":"boolean","date_format":"string","description":"string","distinguish_rates":"boolean","duration_format":"string","end_date":"string","group_ids":[\{\}],"grouping":"string","hide_amounts":"boolean","hide_rates":"boolean","include_time_entry_ids":"boolean","max_duration_seconds":"integer","min_duration_seconds":"integer","order_by":"string","order_dir":"string","project_ids":[\{\}],"resolution":"string","rounding":"integer","rounding_minutes":"integer","startTime":"string","start_date":"string","sub_grouping":"string","tag_ids":[\{\}],"task_ids":[\{\}],"time_entry_ids":[\{\}],"user_ids":[\{\}]\}.to_json
request.basic_auth '<email>', '<password>'
res = http.request(req)
puts JSON.parse(res.body)
fetch("https://api.track.toggl.com/reports/api/v3/workspace/{workspace_id}/summary/time_entries.pdf", {
method: "POST",
body: \{"audit":\{"group_filter":\{"currency":"string","max_amount_cents":"integer","max_duration_seconds":"integer","min_amount_cents":"integer","min_duration_seconds":"integer"\},"show_empty_groups":"boolean","show_tracked_groups":"boolean"\},"billable":"boolean","cents_separator":"string","client_ids":[\{\}],"collapse":"boolean","date_format":"string","description":"string","distinguish_rates":"boolean","duration_format":"string","end_date":"string","group_ids":[\{\}],"grouping":"string","hide_amounts":"boolean","hide_rates":"boolean","include_time_entry_ids":"boolean","max_duration_seconds":"integer","min_duration_seconds":"integer","order_by":"string","order_dir":"string","project_ids":[\{\}],"resolution":"string","rounding":"integer","rounding_minutes":"integer","startTime":"string","start_date":"string","sub_grouping":"string","tag_ids":[\{\}],"task_ids":[\{\}],"time_entry_ids":[\{\}],"user_ids":[\{\}]\},
headers: {
"Content-Type": "application/json",
"Authorization": `Basic ${base64.encode(<email>:<password>)}`
},
})
.then((resp) => resp.json())
.then((json) => {
console.log(json);
})
.catch(err => console.error(err));
import requests
from base64 import b64encode
data = requests.post('https://api.track.toggl.com/reports/api/v3/workspace/{workspace_id}/summary/time_entries.pdf', json=\{"audit":\{"group_filter":\{"currency":"string","max_amount_cents":"integer","max_duration_seconds":"integer","min_amount_cents":"integer","min_duration_seconds":"integer"\},"show_empty_groups":"boolean","show_tracked_groups":"boolean"\},"billable":"boolean","cents_separator":"string","client_ids":[\{\}],"collapse":"boolean","date_format":"string","description":"string","distinguish_rates":"boolean","duration_format":"string","end_date":"string","group_ids":[\{\}],"grouping":"string","hide_amounts":"boolean","hide_rates":"boolean","include_time_entry_ids":"boolean","max_duration_seconds":"integer","min_duration_seconds":"integer","order_by":"string","order_dir":"string","project_ids":[\{\}],"resolution":"string","rounding":"integer","rounding_minutes":"integer","startTime":"string","start_date":"string","sub_grouping":"string","tag_ids":[\{\}],"task_ids":[\{\}],"time_entry_ids":[\{\}],"user_ids":[\{\}]\}, headers={'content-type': 'application/json', 'Authorization' : 'Basic %s' % b64encode(b"<email>:<password>").decode("ascii")})
print(data.json())
extern crate tokio;
extern crate serde_json;
use reqwest::{Client};
use reqwest::header::{CONTENT_TYPE};
#[tokio::main]
async fn main() -> Result<(), reqwest::Error> {
let client = Client::new().basic_auth("<email>", "<password>");
let json = client.request(Method::POST, "https://api.track.toggl.com/reports/api/v3/workspace/{workspace_id}/summary/time_entries.pdf".to_string())
.json(&serde_json::json!(\{"audit":\{"group_filter":\{"currency":"string","max_amount_cents":"integer","max_duration_seconds":"integer","min_amount_cents":"integer","min_duration_seconds":"integer"\},"show_empty_groups":"boolean","show_tracked_groups":"boolean"\},"billable":"boolean","cents_separator":"string","client_ids":[\{\}],"collapse":"boolean","date_format":"string","description":"string","distinguish_rates":"boolean","duration_format":"string","end_date":"string","group_ids":[\{\}],"grouping":"string","hide_amounts":"boolean","hide_rates":"boolean","include_time_entry_ids":"boolean","max_duration_seconds":"integer","min_duration_seconds":"integer","order_by":"string","order_dir":"string","project_ids":[\{\}],"resolution":"string","rounding":"integer","rounding_minutes":"integer","startTime":"string","start_date":"string","sub_grouping":"string","tag_ids":[\{\}],"task_ids":[\{\}],"time_entry_ids":[\{\}],"user_ids":[\{\}]\}))
.header(CONTENT_TYPE, "application/json")
.send()
.await?
.json()
.await?;
println!("{:#?}", json);
Ok(())
}
Parameters
Path
name | type | required | description |
---|---|---|---|
workspace_id | integer | true | Workspace ID |
Body
Name | Type | Description |
---|---|---|
audit | object | - |
billable | boolean | Whether the time entry is set as billable, optional, premium feature. |
cents_separator | string | - |
client_ids | Array of integer | Client IDs, optional, filtering attribute. To filter records with no clients, use [null]. |
collapse | boolean | Whether collapse others, optional, default false. |
date_format | string | Date format, optional, default "MM/DD/YYYY". Can be "MM/DD/YYYY", "DD-MM-YYYY", "MM-DD-YYYY", "YYYY-MM-DD", "DD/MM/YYYY" or "DD.MM.YYYY". |
description | string | Description, optional, filtering attribute. |
distinguish_rates | boolean | DistinguishRates will create new subgroups for each rate, optional, default false. |
duration_format | string | Duration format, optional, default "classic". Can be "classic", "decimal" or "improved". |
end_date | string | End date, example time.DateOnly. Should be greater than Start date. |
group_ids | Array of integer | Group IDs, optional, filtering attribute. |
grouping | string | Grouping option, optional. |
hide_amounts | boolean | Whether amounts should be hidden, optional, default false. |
hide_rates | boolean | Whether rates should be hidden, optional, default false. |
include_time_entry_ids | boolean | Whether time entry IDs should be included in the results, optional, default false. Not applicable for export. |
max_duration_seconds | integer | Max duration seconds, optional, filtering attribute. Time Audit only, should be greater than MinDurationSeconds. |
min_duration_seconds | integer | Min duration seconds, optional, filtering attribute. Time Audit only, should be less than MaxDurationSeconds. |
order_by | string | Order by option, optional, default title. Can be title or duration. |
order_dir | string | Order direction, optional. Can be ASC or DESC. |
project_ids | Array of integer | Project IDs, optional, filtering attribute. To filter records with no projects, use [null]. |
resolution | string | Graph resolution, optional. Allow clients to explicitly request a resolution. |
rounding | integer | Whether time should be rounded, optional, default from user preferences. |
rounding_minutes | integer | Rounding minutes value, optional, default from user preferences. Should be 0, 1, 5, 6, 10, 12, 15, 30, 60 or 240. |
startTime | string | - |
start_date | string | Start date, example time.DateOnly. Should be less than End date. |
sub_grouping | string | SubGrouping option, optional. |
tag_ids | Array of integer | Tag IDs, optional, filtering attribute. To filter records with no tags, use [null]. |
task_ids | Array of integer | Task IDs, optional, filtering attribute. To filter records with no tasks, use [null]. |
time_entry_ids | Array of integer | TimeEntryIDs filters by time entries. This was added to support retro-compatibility with reports v2. |
user_ids | Array of integer | User IDs, optional, filtering attribute. |
audit
Name | Type | Description |
---|---|---|
group_filter | object | - |
show_empty_groups | boolean | Whether empty groups should be displayed, default false, premium feature. |
show_tracked_groups | boolean | Whether tacked groups should be displayed, default true, premium feature. |
group_filter
Name | Type | Description |
---|---|---|
currency | string | Audit currency, optional, example "USD", premium feature. |
max_amount_cents | integer | Audit max amount in cents, optional, premium feature. |
max_duration_seconds | integer | Audit max duration in seconds, optional, premium feature. |
min_amount_cents | integer | Audit min amount in cents, optional, premium feature. |
min_duration_seconds | integer | Audit min duration in seconds, optional, premium feature. |
Response
200
Returns the summary report in pdf format
400
Possible error messages:
- At least one parameter must be set
- Invalid workspace id
- Invalid '{parameter}' value, allowed values are: '{valid_values}'
402
Workspace needs to have this feature enabled
403
Workspace not found/accessible
500
Internal Server Error
POST Export summary report
https://api.track.toggl.com/reports/api/v3/workspace/{workspace_id}/summary/time_entries.{extension}
Downloads summary report in the specified in the specified format: csv or xlsx.
- cURL
- Go
- Ruby
- JavaScript
- Python
- Rust
curl -X POST https://api.track.toggl.com/reports/api/v3/workspace/{workspace_id}/summary/time_entries.{extension} \
-H "Content-Type: application/json" \
-d '\{"audit":\{"group_filter":\{"currency":"string","max_amount_cents":"integer","max_duration_seconds":"integer","min_amount_cents":"integer","min_duration_seconds":"integer"\},"show_empty_groups":"boolean","show_tracked_groups":"boolean"\},"billable":"boolean","client_ids":[\{\}],"collapse":"boolean","description":"string","distinguish_rates":"boolean","duration_format":"string","end_date":"string","group_ids":[\{\}],"grouping":"string","hide_amounts":"boolean","hide_rates":"boolean","include_time_entry_ids":"boolean","max_duration_seconds":"integer","min_duration_seconds":"integer","order_by":"string","order_dir":"string","project_ids":[\{\}],"rounding":"integer","rounding_minutes":"integer","startTime":"string","start_date":"string","sub_grouping":"string","tag_ids":[\{\}],"task_ids":[\{\}],"time_entry_ids":[\{\}],"user_ids":[\{\}]\}' \
-u <email>:<password>
bytes, err := json.Marshal('\{"audit":\{"group_filter":\{"currency":"string","max_amount_cents":"integer","max_duration_seconds":"integer","min_amount_cents":"integer","min_duration_seconds":"integer"\},"show_empty_groups":"boolean","show_tracked_groups":"boolean"\},"billable":"boolean","client_ids":[\{\}],"collapse":"boolean","description":"string","distinguish_rates":"boolean","duration_format":"string","end_date":"string","group_ids":[\{\}],"grouping":"string","hide_amounts":"boolean","hide_rates":"boolean","include_time_entry_ids":"boolean","max_duration_seconds":"integer","min_duration_seconds":"integer","order_by":"string","order_dir":"string","project_ids":[\{\}],"rounding":"integer","rounding_minutes":"integer","startTime":"string","start_date":"string","sub_grouping":"string","tag_ids":[\{\}],"task_ids":[\{\}],"time_entry_ids":[\{\}],"user_ids":[\{\}]\}')
if err != nil {
print(err)
}
req, err := http.NewRequest(http.MethodPost,
"https://api.track.toggl.com/reports/api/v3/workspace/{workspace_id}/summary/time_entries.{extension}", bytes.NewBuffer(bytes))
if err != nil {
print(err)
}
req.Header.Set("Content-Type", "application/json; charset=utf-8")
req.SetBasicAuth("<email>", "<password>")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
print(err)
}
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
print(err)
}
fmt.Print(string(body))
require 'net/http'
require 'uri'
require 'json'
uri = URI('https://api.track.toggl.com/reports/api/v3/workspace/{workspace_id}/summary/time_entries.{extension}')
http = Net::HTTP.new(uri.host, uri.port)
req = Net::HTTP::Post.new(uri.path)
req['Content-Type'] = "application/json"
req.body = \{"audit":\{"group_filter":\{"currency":"string","max_amount_cents":"integer","max_duration_seconds":"integer","min_amount_cents":"integer","min_duration_seconds":"integer"\},"show_empty_groups":"boolean","show_tracked_groups":"boolean"\},"billable":"boolean","client_ids":[\{\}],"collapse":"boolean","description":"string","distinguish_rates":"boolean","duration_format":"string","end_date":"string","group_ids":[\{\}],"grouping":"string","hide_amounts":"boolean","hide_rates":"boolean","include_time_entry_ids":"boolean","max_duration_seconds":"integer","min_duration_seconds":"integer","order_by":"string","order_dir":"string","project_ids":[\{\}],"rounding":"integer","rounding_minutes":"integer","startTime":"string","start_date":"string","sub_grouping":"string","tag_ids":[\{\}],"task_ids":[\{\}],"time_entry_ids":[\{\}],"user_ids":[\{\}]\}.to_json
request.basic_auth '<email>', '<password>'
res = http.request(req)
puts JSON.parse(res.body)
fetch("https://api.track.toggl.com/reports/api/v3/workspace/{workspace_id}/summary/time_entries.{extension}", {
method: "POST",
body: \{"audit":\{"group_filter":\{"currency":"string","max_amount_cents":"integer","max_duration_seconds":"integer","min_amount_cents":"integer","min_duration_seconds":"integer"\},"show_empty_groups":"boolean","show_tracked_groups":"boolean"\},"billable":"boolean","client_ids":[\{\}],"collapse":"boolean","description":"string","distinguish_rates":"boolean","duration_format":"string","end_date":"string","group_ids":[\{\}],"grouping":"string","hide_amounts":"boolean","hide_rates":"boolean","include_time_entry_ids":"boolean","max_duration_seconds":"integer","min_duration_seconds":"integer","order_by":"string","order_dir":"string","project_ids":[\{\}],"rounding":"integer","rounding_minutes":"integer","startTime":"string","start_date":"string","sub_grouping":"string","tag_ids":[\{\}],"task_ids":[\{\}],"time_entry_ids":[\{\}],"user_ids":[\{\}]\},
headers: {
"Content-Type": "application/json",
"Authorization": `Basic ${base64.encode(<email>:<password>)}`
},
})
.then((resp) => resp.json())
.then((json) => {
console.log(json);
})
.catch(err => console.error(err));
import requests
from base64 import b64encode
data = requests.post('https://api.track.toggl.com/reports/api/v3/workspace/{workspace_id}/summary/time_entries.{extension}', json=\{"audit":\{"group_filter":\{"currency":"string","max_amount_cents":"integer","max_duration_seconds":"integer","min_amount_cents":"integer","min_duration_seconds":"integer"\},"show_empty_groups":"boolean","show_tracked_groups":"boolean"\},"billable":"boolean","client_ids":[\{\}],"collapse":"boolean","description":"string","distinguish_rates":"boolean","duration_format":"string","end_date":"string","group_ids":[\{\}],"grouping":"string","hide_amounts":"boolean","hide_rates":"boolean","include_time_entry_ids":"boolean","max_duration_seconds":"integer","min_duration_seconds":"integer","order_by":"string","order_dir":"string","project_ids":[\{\}],"rounding":"integer","rounding_minutes":"integer","startTime":"string","start_date":"string","sub_grouping":"string","tag_ids":[\{\}],"task_ids":[\{\}],"time_entry_ids":[\{\}],"user_ids":[\{\}]\}, headers={'content-type': 'application/json', 'Authorization' : 'Basic %s' % b64encode(b"<email>:<password>").decode("ascii")})
print(data.json())
extern crate tokio;
extern crate serde_json;
use reqwest::{Client};
use reqwest::header::{CONTENT_TYPE};
#[tokio::main]
async fn main() -> Result<(), reqwest::Error> {
let client = Client::new().basic_auth("<email>", "<password>");
let json = client.request(Method::POST, "https://api.track.toggl.com/reports/api/v3/workspace/{workspace_id}/summary/time_entries.{extension}".to_string())
.json(&serde_json::json!(\{"audit":\{"group_filter":\{"currency":"string","max_amount_cents":"integer","max_duration_seconds":"integer","min_amount_cents":"integer","min_duration_seconds":"integer"\},"show_empty_groups":"boolean","show_tracked_groups":"boolean"\},"billable":"boolean","client_ids":[\{\}],"collapse":"boolean","description":"string","distinguish_rates":"boolean","duration_format":"string","end_date":"string","group_ids":[\{\}],"grouping":"string","hide_amounts":"boolean","hide_rates":"boolean","include_time_entry_ids":"boolean","max_duration_seconds":"integer","min_duration_seconds":"integer","order_by":"string","order_dir":"string","project_ids":[\{\}],"rounding":"integer","rounding_minutes":"integer","startTime":"string","start_date":"string","sub_grouping":"string","tag_ids":[\{\}],"task_ids":[\{\}],"time_entry_ids":[\{\}],"user_ids":[\{\}]\}))
.header(CONTENT_TYPE, "application/json")
.send()
.await?
.json()
.await?;
println!("{:#?}", json);
Ok(())
}
Parameters
Path
name | type | required | description |
---|---|---|---|
workspace_id | integer | true | Workspace ID |
extension | string | true | csv,xlsx |
Body
Name | Type | Description |
---|---|---|
audit | object | - |
billable | boolean | Whether the time entry is set as billable, optional, premium feature. |
client_ids | Array of integer | Client IDs, optional, filtering attribute. To filter records with no clients, use [null]. |
collapse | boolean | Whether collapse others, optional, default false. |
description | string | Description, optional, filtering attribute. |
distinguish_rates | boolean | DistinguishRates will create new subgroups for each rate, optional, default false. |
duration_format | string | Duration format, optional, default "classic". Can be "classic", "decimal" or "improved". |
end_date | string | End date, example time.DateOnly. Should be greater than Start date. |
group_ids | Array of integer | Group IDs, optional, filtering attribute. |
grouping | string | Grouping option, optional. |
hide_amounts | boolean | Whether amounts should be hidden, optional, default false. |
hide_rates | boolean | Whether rates should be hidden, optional, default false. |
include_time_entry_ids | boolean | Whether time entry IDs should be included in the results, optional, default false. Not applicable for export. |
max_duration_seconds | integer | Max duration seconds, optional, filtering attribute. Time Audit only, should be greater than MinDurationSeconds. |
min_duration_seconds | integer | Min duration seconds, optional, filtering attribute. Time Audit only, should be less than MaxDurationSeconds. |
order_by | string | Order by option, optional, default title. Can be title or duration. |
order_dir | string | Order direction, optional. Can be ASC or DESC. |
project_ids | Array of integer | Project IDs, optional, filtering attribute. To filter records with no projects, use [null]. |
rounding | integer | Whether time should be rounded, optional, default from user preferences. |
rounding_minutes | integer | Rounding minutes value, optional, default from user preferences. Should be 0, 1, 5, 6, 10, 12, 15, 30, 60 or 240. |
startTime | string | - |
start_date | string | Start date, example time.DateOnly. Should be less than End date. |
sub_grouping | string | SubGrouping option, optional. |
tag_ids | Array of integer | Tag IDs, optional, filtering attribute. To filter records with no tags, use [null]. |
task_ids | Array of integer | Task IDs, optional, filtering attribute. To filter records with no tasks, use [null]. |
time_entry_ids | Array of integer | TimeEntryIDs filters by time entries. This was added to support retro-compatibility with reports v2. |
user_ids | Array of integer | User IDs, optional, filtering attribute. |
audit
Name | Type | Description |
---|---|---|
group_filter | object | - |
show_empty_groups | boolean | Whether empty groups should be displayed, default false, premium feature. |
show_tracked_groups | boolean | Whether tacked groups should be displayed, default true, premium feature. |
group_filter
Name | Type | Description |
---|---|---|
currency | string | Audit currency, optional, example "USD", premium feature. |
max_amount_cents | integer | Audit max amount in cents, optional, premium feature. |
max_duration_seconds | integer | Audit max duration in seconds, optional, premium feature. |
min_amount_cents | integer | Audit min amount in cents, optional, premium feature. |
min_duration_seconds | integer | Audit min duration in seconds, optional, premium feature. |
Response
200
Returns the summary report on the specified format: csv or xlsx
400
Possible error messages:
- At least one parameter must be set
- Invalid workspace id
- Invalid '{parameter}' value, allowed values are: '{valid_values}'
402
Workspace needs to have this feature enabled
403
Workspace not found/accessible
500
Internal Server Error