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}')
req = Net::HTTP::Post.new(uri)
req['Content-Type'] = "application/json"
req.basic_auth '<email>', '<password>'
res = Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == 'https') do |http|
http.request(req)
end
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_account_id | integer | - |
| user_id | integer | - |
| username | string | - |
time_entries
| Name | Type | Description |
|---|---|---|
| at | string | - |
| at_tz | string | used by reports v2 proxy |
| id | integer | - |
| integration_ext_id | string | - |
| integration_provider | string | - |
| 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 | - |
groups
| Name | Type | Description |
|---|---|---|
| id | integer | - |
| ids | Array of integer | IDs will be used for tags grouping, can be ignored in all other cases. Don't confuse this IDs with the IDs in SubGroupData. |
| names | Array of string | names of the group, used for summary export |
| project_color | string | - |
| project_hex_color | string | - |
| sub_groups | object | - |
sub_groups
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 | - |