Saved reports
POST Load the previously saved report
https://api.track.toggl.com/reports/api/v3/shared/{report_token}
Returns the previously saved report.
Authentication
A public report is accessible by anyone, a private one is only accessible by the report's owner or workspace admin. If the criteria aren't met it returns 403 status code.
Parameters
The report can be executed without parameters, and in this case the saved or default parameters will be used.
- cURL
- Go
- Ruby
- JavaScript
- Python
- Rust
curl -X POST https://api.track.toggl.com/reports/api/v3/shared/{report_token} \
-H "Content-Type: application/json" \
-u <email>:<password>
req, err := http.NewRequest(http.MethodPost,
"https://api.track.toggl.com/reports/api/v3/shared/{report_token}")
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/shared/{report_token}')
http = Net::HTTP.new(uri.host, uri.port)
req = Net::HTTP::Post.new(uri.path)
req['Content-Type'] = "application/json"
request.basic_auth '<email>', '<password>'
res = http.request(req)
puts JSON.parse(res.body)
fetch("https://api.track.toggl.com/reports/api/v3/shared/{report_token}", {
method: "POST",
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/shared/{report_token}', 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/shared/{report_token}".to_string())
.header(CONTENT_TYPE, "application/json")
.send()
.await?
.json()
.await?;
println!("{:#?}", json);
Ok(())
}
Response
200
Returns report information
Name | Type | Description |
---|---|---|
detailed_results | object | - |
dictionaries | object | - |
features | object | - |
fixed_daterange | boolean | - |
hide_amounts | boolean | - |
input_params | object | - |
is_commenting_enabled | boolean | - |
public | boolean | - |
report_name | string | - |
report_type | string | - |
saved_params | object | - |
summary_results | object | - |
weekly_results | object | - |
workspace_logo | string | - |
detailed_results
Name | Type | Description |
---|---|---|
report | Array of object | - |
totals | object | - |
report
Name | Type | Description |
---|---|---|
billable | boolean | - |
billable_amount_in_cents | integer | - |
client_name | string | - |
currency | string | - |
description | string | - |
string | - | |
hourly_rate_in_cents | integer | - |
project_color | string | - |
project_hex | string | - |
project_id | integer | - |
project_name | string | - |
row_number | integer | - |
tag_ids | Array of integer | - |
tag_names | Array of string | - |
task_id | integer | - |
task_name | string | - |
time_entries | Array of object | - |
user_id | integer | - |
username | string | - |
time_entries
Name | Type | Description |
---|---|---|
at | string | - |
at_tz | string | used by reports v2 proxy |
id | integer | - |
seconds | integer | - |
start | string | - |
stop | string | - |
totals
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 | - |
dictionaries
Name | Type | Description |
---|---|---|
clients | object | - |
filters | object | Remove it after FlexQ release. |
projects | object | - |
tags | object | - |
tasks | object | - |
user_groups | object | - |
users | object | - |
clients
filters
Name | Type | Description |
---|---|---|
clients | object | - |
projects | object | - |
tags | object | - |
tasks | object | - |
user_groups | object | - |
users | object | - |
clients
projects
tags
tasks
user_groups
users
projects
tags
tasks
user_groups
users
features
input_params
saved_params
summary_results
Name | Type | Description |
---|---|---|
report | object | - |
totals | object | - |
report
Name | Type | Description |
---|---|---|
groups | Array of Object | - |
totals
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 | - |
weekly_results
Name | Type | Description |
---|---|---|
report | Array of object | - |
totals | object | - |
report
Name | Type | Description |
---|---|---|
billable_amounts_in_cents | string | - |
billable_seconds | string | - |
client_name | string | - |
currency | string | - |
hourly_rate_in_cents | integer | In cents |
planned_task_id | integer | - |
project_color | string | - |
project_hex_color | string | - |
project_id | integer | - |
project_name | string | - |
seconds | string | - |
user_id | integer | - |
user_name | string | - |
totals
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:
- report_type does not exist in params
- The report period is not supported
401
Possible error messages:
- Unable to extract authentication data
- Incorrect username and/or password
403
Invalid token
404
Not found
500
report is too big to be exported
POST Export CSV for saved report
https://api.track.toggl.com/reports/api/v3/shared/{report_token}.csv
Downloads a previously saved report in csv.
Authentication
A public report is accessible by anyone, a private one is only accessible by the report's owner or workspace admin. If the criteria aren't met it returns 403 status code.
Parameters
The report can be executed without parameters, and in this case the saved or default parameters will be used.
- cURL
- Go
- Ruby
- JavaScript
- Python
- Rust
curl -X POST https://api.track.toggl.com/reports/api/v3/shared/{report_token}.csv \
-H "Content-Type: application/json" \
-u <email>:<password>
req, err := http.NewRequest(http.MethodPost,
"https://api.track.toggl.com/reports/api/v3/shared/{report_token}.csv")
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/shared/{report_token}.csv')
http = Net::HTTP.new(uri.host, uri.port)
req = Net::HTTP::Post.new(uri.path)
req['Content-Type'] = "application/json"
request.basic_auth '<email>', '<password>'
res = http.request(req)
puts JSON.parse(res.body)
fetch("https://api.track.toggl.com/reports/api/v3/shared/{report_token}.csv", {
method: "POST",
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/shared/{report_token}.csv', 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/shared/{report_token}.csv".to_string())
.header(CONTENT_TYPE, "application/json")
.send()
.await?
.json()
.await?;
println!("{:#?}", json);
Ok(())
}
Response
200
Returns report information in csv form
400
Possible error messages:
- report_type does not exist in params
- The report period is not supported
401
Possible error messages:
- Unable to extract authentication data
- Incorrect username and/or password
403
Possible error messages:
- Invalid token
- Workspace was not found or the report's owner is no longer active on it
404
Not found
500
parameter `since` is missing
POST Export XSLX saved report
https://api.track.toggl.com/reports/api/v3/shared/{report_token}.xlsx
Downloads a previously saved report in xlsx.
Authentication
A public report is accessible by anyone, a private one is only accessible by the report's owner or workspace admin. If the criteria aren't met it returns 403 status code.
Parameters
The report can be executed without parameters, and in this case the saved or default parameters will be used.
- cURL
- Go
- Ruby
- JavaScript
- Python
- Rust
curl -X POST https://api.track.toggl.com/reports/api/v3/shared/{report_token}.xlsx \
-H "Content-Type: application/json" \
-u <email>:<password>
req, err := http.NewRequest(http.MethodPost,
"https://api.track.toggl.com/reports/api/v3/shared/{report_token}.xlsx")
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/shared/{report_token}.xlsx')
http = Net::HTTP.new(uri.host, uri.port)
req = Net::HTTP::Post.new(uri.path)
req['Content-Type'] = "application/json"
request.basic_auth '<email>', '<password>'
res = http.request(req)
puts JSON.parse(res.body)
fetch("https://api.track.toggl.com/reports/api/v3/shared/{report_token}.xlsx", {
method: "POST",
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/shared/{report_token}.xlsx', 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/shared/{report_token}.xlsx".to_string())
.header(CONTENT_TYPE, "application/json")
.send()
.await?
.json()
.await?;
println!("{:#?}", json);
Ok(())
}
Response
200
Returns report information in xlsx form
400
Possible error messages:
- report_type does not exist in params
- The report period is not supported
401
Possible error messages:
- Unable to extract authentication data
- Incorrect username and/or password
403
Possible error messages:
- Invalid token
- Workspace was not found or the report's owner is no longer active on it
404
Not found
500
parameter `since` is missing
POST Export saved report in pdf format
https://api.track.toggl.com/reports/api/v3/shared/{report_token}/pdf
Authentication
A public report is accessible by anyone, a private one is only accessible by the report's owner or workspace admin. If the criteria aren't met it returns 403 status code.
Parameters
The report can be executed without parameters, and in this case the saved or default parameters will be used.
- cURL
- Go
- Ruby
- JavaScript
- Python
- Rust
curl -X POST https://api.track.toggl.com/reports/api/v3/shared/{report_token}/pdf \
-H "Content-Type: application/json" \
-u <email>:<password>
req, err := http.NewRequest(http.MethodPost,
"https://api.track.toggl.com/reports/api/v3/shared/{report_token}/pdf")
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/shared/{report_token}/pdf')
http = Net::HTTP.new(uri.host, uri.port)
req = Net::HTTP::Post.new(uri.path)
req['Content-Type'] = "application/json"
request.basic_auth '<email>', '<password>'
res = http.request(req)
puts JSON.parse(res.body)
fetch("https://api.track.toggl.com/reports/api/v3/shared/{report_token}/pdf", {
method: "POST",
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/shared/{report_token}/pdf', 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/shared/{report_token}/pdf".to_string())
.header(CONTENT_TYPE, "application/json")
.send()
.await?
.json()
.await?;
println!("{:#?}", json);
Ok(())
}
Response
200
Returns report information in pdf form
400
Possible error messages:
- report_type does not exist in params
- The report period is not supported
401
Possible error messages:
- Unable to extract authentication data
- Incorrect username and/or password
403
Possible error messages:
- Invalid token
- Workspace was not found or the report's owner is no longer active on it
404
Not found
500
parameter `since` is missing