https://api.track.toggl.com/reports/api/v3/workspace/{workspace_id}/search/time_entries/totals
Returns totals sums for detailed report.
- cURL
- Go
- Ruby
- JavaScript
- Python
- Rust
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}/search/time_entries/totals".to_string()).json(&serde_json::json!(\{"billable":"boolean","client_ids":[\{\}],"description":"string","end_date":"string","granularity":"string","group_ids":[\{\}],"grouped":"boolean","max_duration_seconds":"integer","min_duration_seconds":"integer","project_ids":[\{\}],"resolution":"string","rounding":"integer","rounding_minutes":"integer","startTime":"string","start_date":"string","tag_ids":[\{\}],"task_ids":[\{\}],"time_entry_ids":[\{\}],"user_ids":[\{\}],"withInlineRates":"boolean","with_graph":"boolean"\})) .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 |
---|---|---|
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. |
end_date | string | End date, example time.DateOnly. Should be greater than Start date. |
granularity | string | Totals granularity, optional, overrides resolution values. Possible values: day, week and month. |
group_ids | Array of integer | Group IDs, optional, filtering attribute. |
grouped | boolean | Whether time entries should be grouped, optional, default false. |
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]. |
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. |
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 | Time entry IDs, optional. |
user_ids | Array of integer | User IDs, optional, filtering attribute. |
withInlineRates | boolean | Whether results should be returned in line, optional, default false. |
with_graph | boolean | Whether Graph information should be loaded, optional, default false. |
Response
200
Returns totals values sums for detailed report
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