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
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