https://api.track.toggl.com/insights/api/v1/workspace/{workspace_id}/profitability/employees.{extension}
Downloads employee profitability insights in the specified format: csv or xlsx.
- 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/insights/api/v1/workspace/{workspace_id}/profitability/employees.{extension}".to_string()).json(&serde_json::json!(\{"currency":"string","end_date":"string","group_ids":"string","resolution":"string","rounding":"integer","rounding_minutes":"integer","start_date":"string","user_ids":"string"\})) .header(CONTENT_TYPE, "application/json") .send() .await? .json() .await?; println!("{:#?}", json); Ok(())}
Parameters
Body
| Name | Type | Description |
|---|---|---|
| currency | string | - |
| end_date | string | - |
| group_ids | string | - |
| resolution | string | - |
| rounding | integer | - |
| rounding_minutes | integer | - |
| start_date | string | - |
| user_ids | string | - |
Response
200
A stream with the csv or xlsx for the report being exported
400
Invalid parameters
403
User has no access to workspace or is not admin
500
Internal Server Error