Utils
POST List clients
https://api.track.toggl.com/reports/api/v3/workspace/{workspace_id}/filters/clients
Returns filtered clients from a workspace (only ID and name).
- cURL
- Go
- Ruby
- JavaScript
- Python
- Rust
curl -X POST https://api.track.toggl.com/reports/api/v3/workspace/{workspace_id}/filters/clients \
-H "Content-Type: application/json" \
-d '\{"ids":[\{\}],"name":"string","start":"integer"\}' \
-u <email>:<password>
bytes, err := json.Marshal('\{"ids":[\{\}],"name":"string","start":"integer"\}')
if err != nil {
print(err)
}
req, err := http.NewRequest(http.MethodPost,
"https://api.track.toggl.com/reports/api/v3/workspace/{workspace_id}/filters/clients", bytes.NewBuffer(bytes))
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/workspace/{workspace_id}/filters/clients')
http = Net::HTTP.new(uri.host, uri.port)
req = Net::HTTP::Post.new(uri.path)
req['Content-Type'] = "application/json"
req.body = \{"ids":[\{\}],"name":"string","start":"integer"\}.to_json
request.basic_auth '<email>', '<password>'
res = http.request(req)
puts JSON.parse(res.body)
fetch("https://api.track.toggl.com/reports/api/v3/workspace/{workspace_id}/filters/clients", {
method: "POST",
body: \{"ids":[\{\}],"name":"string","start":"integer"\},
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/workspace/{workspace_id}/filters/clients', json=\{"ids":[\{\}],"name":"string","start":"integer"\}, 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/workspace/{workspace_id}/filters/clients".to_string())
.json(&serde_json::json!(\{"ids":[\{\}],"name":"string","start":"integer"\}))
.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 |
---|---|---|
ids | Array of integer | Client IDs for filtering. |
name | string | Client name for filtering. |
start | integer | Start is the client ID cursor for pagination. |
Response
200
Returns filtered clients
Name | Type | Description |
---|---|---|
items | Array of object | - |
items
Name | Type | Description |
---|---|---|
id | integer | Client ID. |
name | string | Client name. |
400
Maximum count of posted IDs is 2000
403
Workspace not found/accessible
500
Internal Server Error
POST List project groups filter
https://api.track.toggl.com/reports/api/v3/workspace/{workspace_id}/filters/project_groups
Returns the project groups from a workspace.
- cURL
- Go
- Ruby
- JavaScript
- Python
- Rust
curl -X POST https://api.track.toggl.com/reports/api/v3/workspace/{workspace_id}/filters/project_groups \
-H "Content-Type: application/json" \
-d '\{"group_ids":[\{\}],"project_ids":[\{\}],"start_id":"integer"\}' \
-u <email>:<password>
bytes, err := json.Marshal('\{"group_ids":[\{\}],"project_ids":[\{\}],"start_id":"integer"\}')
if err != nil {
print(err)
}
req, err := http.NewRequest(http.MethodPost,
"https://api.track.toggl.com/reports/api/v3/workspace/{workspace_id}/filters/project_groups", bytes.NewBuffer(bytes))
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/workspace/{workspace_id}/filters/project_groups')
http = Net::HTTP.new(uri.host, uri.port)
req = Net::HTTP::Post.new(uri.path)
req['Content-Type'] = "application/json"
req.body = \{"group_ids":[\{\}],"project_ids":[\{\}],"start_id":"integer"\}.to_json
request.basic_auth '<email>', '<password>'
res = http.request(req)
puts JSON.parse(res.body)
fetch("https://api.track.toggl.com/reports/api/v3/workspace/{workspace_id}/filters/project_groups", {
method: "POST",
body: \{"group_ids":[\{\}],"project_ids":[\{\}],"start_id":"integer"\},
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/workspace/{workspace_id}/filters/project_groups', json=\{"group_ids":[\{\}],"project_ids":[\{\}],"start_id":"integer"\}, 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/workspace/{workspace_id}/filters/project_groups".to_string())
.json(&serde_json::json!(\{"group_ids":[\{\}],"project_ids":[\{\}],"start_id":"integer"\}))
.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 |
---|---|---|
group_ids | Array of integer | Group IDs, optional. At least Projects IDs or Group IDs should be informed. |
project_ids | Array of integer | Project IDs, optional. At least Projects IDs or Group IDs should be informed. |
start_id | integer | - |
Response
200
Returns project groups
Name | Type | Description |
---|---|---|
items | Array of object | - |
items
Name | Type | Description |
---|---|---|
group_id | integer | - |
id | integer | - |
name | string | - |
project_id | integer | - |
400
Possible error messages:
- At least one parameter must be set
- Maximum count of posted IDs is {value}
403
Workspace not found/accessible
500
Internal Server Error
POST List project users
https://api.track.toggl.com/reports/api/v3/workspace/{workspace_id}/filters/project_users
Returns filtered user projects.
- cURL
- Go
- Ruby
- JavaScript
- Python
- Rust
curl -X POST https://api.track.toggl.com/reports/api/v3/workspace/{workspace_id}/filters/project_users \
-H "Content-Type: application/json" \
-d '\{"client_ids":[\{\}],"project_ids":[\{\}],"start_id":"integer"\}' \
-u <email>:<password>
bytes, err := json.Marshal('\{"client_ids":[\{\}],"project_ids":[\{\}],"start_id":"integer"\}')
if err != nil {
print(err)
}
req, err := http.NewRequest(http.MethodPost,
"https://api.track.toggl.com/reports/api/v3/workspace/{workspace_id}/filters/project_users", bytes.NewBuffer(bytes))
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/workspace/{workspace_id}/filters/project_users')
http = Net::HTTP.new(uri.host, uri.port)
req = Net::HTTP::Post.new(uri.path)
req['Content-Type'] = "application/json"
req.body = \{"client_ids":[\{\}],"project_ids":[\{\}],"start_id":"integer"\}.to_json
request.basic_auth '<email>', '<password>'
res = http.request(req)
puts JSON.parse(res.body)
fetch("https://api.track.toggl.com/reports/api/v3/workspace/{workspace_id}/filters/project_users", {
method: "POST",
body: \{"client_ids":[\{\}],"project_ids":[\{\}],"start_id":"integer"\},
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/workspace/{workspace_id}/filters/project_users', json=\{"client_ids":[\{\}],"project_ids":[\{\}],"start_id":"integer"\}, 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/workspace/{workspace_id}/filters/project_users".to_string())
.json(&serde_json::json!(\{"client_ids":[\{\}],"project_ids":[\{\}],"start_id":"integer"\}))
.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 |
---|---|---|
client_ids | Array of integer | Client IDs, optional. |
project_ids | Array of integer | Project IDs, optional. |
start_id | integer | - |
Response
200
Returns project users
Name | Type | Description |
---|---|---|
items | Array of object | - |
items
Name | Type | Description |
---|---|---|
group_id | integer | Group ID. |
hourly_rate | number | Hourly rate. |
id | integer | Project user ID. |
labour_cost | integer | Labor cost. |
project_id | integer | Project ID. |
user_id | integer | User ID. |
400
Possible error messages:
- At least one parameter must be set
- Maximum count of posted IDs is {value}
403
Workspace not found/accessible
500
Internal Server Error
POST List projects
https://api.track.toggl.com/reports/api/v3/workspace/{workspace_id}/filters/projects
Returns filtered projects from a workspace.
- cURL
- Go
- Ruby
- JavaScript
- Python
- Rust
curl -X POST https://api.track.toggl.com/reports/api/v3/workspace/{workspace_id}/filters/projects \
-H "Content-Type: application/json" \
-d '\{"client_ids":[\{\}],"currency":"string","ids":[\{\}],"is_active":"boolean","is_billable":"boolean","is_private":"boolean","name":"string","page_size":"integer","start":"integer"\}' \
-u <email>:<password>
bytes, err := json.Marshal('\{"client_ids":[\{\}],"currency":"string","ids":[\{\}],"is_active":"boolean","is_billable":"boolean","is_private":"boolean","name":"string","page_size":"integer","start":"integer"\}')
if err != nil {
print(err)
}
req, err := http.NewRequest(http.MethodPost,
"https://api.track.toggl.com/reports/api/v3/workspace/{workspace_id}/filters/projects", bytes.NewBuffer(bytes))
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/workspace/{workspace_id}/filters/projects')
http = Net::HTTP.new(uri.host, uri.port)
req = Net::HTTP::Post.new(uri.path)
req['Content-Type'] = "application/json"
req.body = \{"client_ids":[\{\}],"currency":"string","ids":[\{\}],"is_active":"boolean","is_billable":"boolean","is_private":"boolean","name":"string","page_size":"integer","start":"integer"\}.to_json
request.basic_auth '<email>', '<password>'
res = http.request(req)
puts JSON.parse(res.body)
fetch("https://api.track.toggl.com/reports/api/v3/workspace/{workspace_id}/filters/projects", {
method: "POST",
body: \{"client_ids":[\{\}],"currency":"string","ids":[\{\}],"is_active":"boolean","is_billable":"boolean","is_private":"boolean","name":"string","page_size":"integer","start":"integer"\},
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/workspace/{workspace_id}/filters/projects', json=\{"client_ids":[\{\}],"currency":"string","ids":[\{\}],"is_active":"boolean","is_billable":"boolean","is_private":"boolean","name":"string","page_size":"integer","start":"integer"\}, 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/workspace/{workspace_id}/filters/projects".to_string())
.json(&serde_json::json!(\{"client_ids":[\{\}],"currency":"string","ids":[\{\}],"is_active":"boolean","is_billable":"boolean","is_private":"boolean","name":"string","page_size":"integer","start":"integer"\}))
.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 |
---|---|---|
client_ids | Array of integer | Client IDs, optional. |
currency | string | Currency, optional, example "EUR". |
ids | Array of integer | Project IDs, optional. |
is_active | boolean | Whether the wanted projects are archived, optional, default false. |
is_billable | boolean | Whether the wanted projects are billable, optional, premium feature, default false. |
is_private | boolean | Whether the wanted projects are private, optional, default false. |
name | string | Project name, optional. |
page_size | integer | PageSize is the number of records returned per page. If unset, the default value of 201 will be used. |
start | integer | Start is used for pagination, optional, default 0. The api will return the next projects page with id >= Start. |
Response
200
Returns filtered projects
Name | Type | Description |
---|---|---|
items | Array of object | - |
items
Name | Type | Description |
---|---|---|
active | boolean | - |
billable | boolean | - |
client_id | integer | - |
color | string | - |
currency | string | - |
id | integer | - |
name | string | - |
400
Maximum count of posted IDs is {value}
403
Workspace not found/accessible
500
Internal Server Error
POST List projects statuses
https://api.track.toggl.com/reports/api/v3/workspace/{workspace_id}/filters/projects/status
Returns filtered projects statuses from a workspace.
- cURL
- Go
- Ruby
- JavaScript
- Python
- Rust
curl -X POST https://api.track.toggl.com/reports/api/v3/workspace/{workspace_id}/filters/projects/status \
-H "Content-Type: application/json" \
-d '\{"active":"boolean","ids":[\{\}]\}' \
-u <email>:<password>
bytes, err := json.Marshal('\{"active":"boolean","ids":[\{\}]\}')
if err != nil {
print(err)
}
req, err := http.NewRequest(http.MethodPost,
"https://api.track.toggl.com/reports/api/v3/workspace/{workspace_id}/filters/projects/status", bytes.NewBuffer(bytes))
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/workspace/{workspace_id}/filters/projects/status')
http = Net::HTTP.new(uri.host, uri.port)
req = Net::HTTP::Post.new(uri.path)
req['Content-Type'] = "application/json"
req.body = \{"active":"boolean","ids":[\{\}]\}.to_json
request.basic_auth '<email>', '<password>'
res = http.request(req)
puts JSON.parse(res.body)
fetch("https://api.track.toggl.com/reports/api/v3/workspace/{workspace_id}/filters/projects/status", {
method: "POST",
body: \{"active":"boolean","ids":[\{\}]\},
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/workspace/{workspace_id}/filters/projects/status', json=\{"active":"boolean","ids":[\{\}]\}, 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/workspace/{workspace_id}/filters/projects/status".to_string())
.json(&serde_json::json!(\{"active":"boolean","ids":[\{\}]\}))
.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 |
---|---|---|
active | boolean | Whether the wanted projects statuses are archived, optional, default false. |
ids | Array of integer | Project IDs. |
Response
200
Returns projects statuses
Name | Type | Description |
---|---|---|
items | Array of object | - |
items
Name | Type | Description |
---|---|---|
billable_amount | integer | - |
billable_seconds | integer | - |
currency | string | - |
estimated_seconds | integer | - |
id | integer | - |
tracked_seconds | integer | - |
403
Workspace not found/accessible
500
Internal Server Error
POST List tasks statuses
https://api.track.toggl.com/reports/api/v3/workspace/{workspace_id}/filters/tasks/status
Filter tasks statuses from a workspace
- cURL
- Go
- Ruby
- JavaScript
- Python
- Rust
curl -X POST https://api.track.toggl.com/reports/api/v3/workspace/{workspace_id}/filters/tasks/status \
-H "Content-Type: application/json" \
-d '\{"ids":[\{\}]\}' \
-u <email>:<password>
bytes, err := json.Marshal('\{"ids":[\{\}]\}')
if err != nil {
print(err)
}
req, err := http.NewRequest(http.MethodPost,
"https://api.track.toggl.com/reports/api/v3/workspace/{workspace_id}/filters/tasks/status", bytes.NewBuffer(bytes))
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/workspace/{workspace_id}/filters/tasks/status')
http = Net::HTTP.new(uri.host, uri.port)
req = Net::HTTP::Post.new(uri.path)
req['Content-Type'] = "application/json"
req.body = \{"ids":[\{\}]\}.to_json
request.basic_auth '<email>', '<password>'
res = http.request(req)
puts JSON.parse(res.body)
fetch("https://api.track.toggl.com/reports/api/v3/workspace/{workspace_id}/filters/tasks/status", {
method: "POST",
body: \{"ids":[\{\}]\},
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/workspace/{workspace_id}/filters/tasks/status', json=\{"ids":[\{\}]\}, 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/workspace/{workspace_id}/filters/tasks/status".to_string())
.json(&serde_json::json!(\{"ids":[\{\}]\}))
.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 |
---|---|---|
ids | Array of integer | Time entries IDs. |
Response
200
Returns filtered tasks
Name | Type | Description |
---|---|---|
items | Array of object | - |
items
Name | Type | Description |
---|---|---|
billable_amount | integer | - |
billable_seconds | integer | - |
currency | string | - |
estimated_seconds | integer | - |
id | integer | - |
tracked_seconds | integer | - |
400
At least one parameter must be set
402
Tasks are a premium feature
403
Workspace not found/accessible
500
Internal Server Error
POST List users
https://api.track.toggl.com/reports/api/v3/workspace/{workspace_id}/filters/users
Returns filtered users from a workspace.
- cURL
- Go
- Ruby
- JavaScript
- Python
- Rust
curl -X POST https://api.track.toggl.com/reports/api/v3/workspace/{workspace_id}/filters/users \
-H "Content-Type: application/json" \
-d '\{"active":"boolean","ids":[\{\}],"start":"integer"\}' \
-u <email>:<password>
bytes, err := json.Marshal('\{"active":"boolean","ids":[\{\}],"start":"integer"\}')
if err != nil {
print(err)
}
req, err := http.NewRequest(http.MethodPost,
"https://api.track.toggl.com/reports/api/v3/workspace/{workspace_id}/filters/users", bytes.NewBuffer(bytes))
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/workspace/{workspace_id}/filters/users')
http = Net::HTTP.new(uri.host, uri.port)
req = Net::HTTP::Post.new(uri.path)
req['Content-Type'] = "application/json"
req.body = \{"active":"boolean","ids":[\{\}],"start":"integer"\}.to_json
request.basic_auth '<email>', '<password>'
res = http.request(req)
puts JSON.parse(res.body)
fetch("https://api.track.toggl.com/reports/api/v3/workspace/{workspace_id}/filters/users", {
method: "POST",
body: \{"active":"boolean","ids":[\{\}],"start":"integer"\},
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/workspace/{workspace_id}/filters/users', json=\{"active":"boolean","ids":[\{\}],"start":"integer"\}, 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/workspace/{workspace_id}/filters/users".to_string())
.json(&serde_json::json!(\{"active":"boolean","ids":[\{\}],"start":"integer"\}))
.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 |
---|---|---|
active | boolean | Whether the wanted users are active, optional, default true. |
ids | Array of integer | User IDs, optional. |
start | integer | Cursor to point from where to start the search, it should be a user ID, optional. |
Response
200
Returns filtered users
Name | Type | Description |
---|---|---|
items | Array of object | - |
items
Name | Type | Description |
---|---|---|
deleted_at | string | - |
id | integer | - |
name | string | - |
400
Maximum count of posted IDs is 100
403
Workspace not found/accessible
500
Internal Server Error
POST Search clients
https://api.track.toggl.com/reports/api/v3/workspace/{workspace_id}/search/clients
Returns filtered clients from a workspace (whole client object).
- cURL
- Go
- Ruby
- JavaScript
- Python
- Rust
curl -X POST https://api.track.toggl.com/reports/api/v3/workspace/{workspace_id}/search/clients \
-H "Content-Type: application/json" \
-d '\{"ids":[\{\}],"name":"string","start":"integer"\}' \
-u <email>:<password>
bytes, err := json.Marshal('\{"ids":[\{\}],"name":"string","start":"integer"\}')
if err != nil {
print(err)
}
req, err := http.NewRequest(http.MethodPost,
"https://api.track.toggl.com/reports/api/v3/workspace/{workspace_id}/search/clients", bytes.NewBuffer(bytes))
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/workspace/{workspace_id}/search/clients')
http = Net::HTTP.new(uri.host, uri.port)
req = Net::HTTP::Post.new(uri.path)
req['Content-Type'] = "application/json"
req.body = \{"ids":[\{\}],"name":"string","start":"integer"\}.to_json
request.basic_auth '<email>', '<password>'
res = http.request(req)
puts JSON.parse(res.body)
fetch("https://api.track.toggl.com/reports/api/v3/workspace/{workspace_id}/search/clients", {
method: "POST",
body: \{"ids":[\{\}],"name":"string","start":"integer"\},
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/workspace/{workspace_id}/search/clients', json=\{"ids":[\{\}],"name":"string","start":"integer"\}, 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/workspace/{workspace_id}/search/clients".to_string())
.json(&serde_json::json!(\{"ids":[\{\}],"name":"string","start":"integer"\}))
.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 |
---|---|---|
ids | Array of integer | Client IDs for filtering. |
name | string | Client name for filtering. |
start | integer | Start is the client ID cursor for pagination. |
Response
200
Returns searched clients
Name | Type | Description |
---|---|---|
items | Array of object | - |
items
Name | Type | Description |
---|---|---|
id | integer | Client ID. |
name | string | Client name. |
400
Possible error messages:
- At least one parameter must be set
- Maximum count of posted IDs is 2000
403
Workspace not found/accessible
500
Internal Server Error
POST List projects
https://api.track.toggl.com/reports/api/v3/workspace/{workspace_id}/search/projects
Returns filtered projects from a workspace (whole project object).
- cURL
- Go
- Ruby
- JavaScript
- Python
- Rust
curl -X POST https://api.track.toggl.com/reports/api/v3/workspace/{workspace_id}/search/projects \
-H "Content-Type: application/json" \
-d '\{"client_ids":[\{\}],"currency":"string","ids":[\{\}],"is_active":"boolean","is_billable":"boolean","is_private":"boolean","name":"string","page_size":"integer","start":"integer"\}' \
-u <email>:<password>
bytes, err := json.Marshal('\{"client_ids":[\{\}],"currency":"string","ids":[\{\}],"is_active":"boolean","is_billable":"boolean","is_private":"boolean","name":"string","page_size":"integer","start":"integer"\}')
if err != nil {
print(err)
}
req, err := http.NewRequest(http.MethodPost,
"https://api.track.toggl.com/reports/api/v3/workspace/{workspace_id}/search/projects", bytes.NewBuffer(bytes))
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/workspace/{workspace_id}/search/projects')
http = Net::HTTP.new(uri.host, uri.port)
req = Net::HTTP::Post.new(uri.path)
req['Content-Type'] = "application/json"
req.body = \{"client_ids":[\{\}],"currency":"string","ids":[\{\}],"is_active":"boolean","is_billable":"boolean","is_private":"boolean","name":"string","page_size":"integer","start":"integer"\}.to_json
request.basic_auth '<email>', '<password>'
res = http.request(req)
puts JSON.parse(res.body)
fetch("https://api.track.toggl.com/reports/api/v3/workspace/{workspace_id}/search/projects", {
method: "POST",
body: \{"client_ids":[\{\}],"currency":"string","ids":[\{\}],"is_active":"boolean","is_billable":"boolean","is_private":"boolean","name":"string","page_size":"integer","start":"integer"\},
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/workspace/{workspace_id}/search/projects', json=\{"client_ids":[\{\}],"currency":"string","ids":[\{\}],"is_active":"boolean","is_billable":"boolean","is_private":"boolean","name":"string","page_size":"integer","start":"integer"\}, 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/workspace/{workspace_id}/search/projects".to_string())
.json(&serde_json::json!(\{"client_ids":[\{\}],"currency":"string","ids":[\{\}],"is_active":"boolean","is_billable":"boolean","is_private":"boolean","name":"string","page_size":"integer","start":"integer"\}))
.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 |
---|---|---|
client_ids | Array of integer | Client IDs, optional. |
currency | string | Currency, optional, example "EUR". |
ids | Array of integer | Project IDs, optional. |
is_active | boolean | Whether the wanted projects are archived, optional, default false. |
is_billable | boolean | Whether the wanted projects are billable, optional, premium feature, default false. |
is_private | boolean | Whether the wanted projects are private, optional, default false. |
name | string | Project name, optional. |
page_size | integer | PageSize is the number of records returned per page. If unset, the default value of 201 will be used. |
start | integer | Start is used for pagination, optional, default 0. The api will return the next projects page with id >= Start. |
Response
200
Returns projects
Name | Type | Description |
---|---|---|
items | Array of object | - |
items
Name | Type | Description |
---|---|---|
active | boolean | - |
billable | boolean | - |
client_id | integer | - |
color | string | - |
currency | string | - |
id | integer | - |
name | string | - |
400
Possible error messages:
- At least one parameter must be set
- Maximum count of posted IDs is {value}
403
Workspace not found/accessible
500
Internal Server Error
POST List users
https://api.track.toggl.com/reports/api/v3/workspace/{workspace_id}/search/users
Returns filtered users from a workspace.
- cURL
- Go
- Ruby
- JavaScript
- Python
- Rust
curl -X POST https://api.track.toggl.com/reports/api/v3/workspace/{workspace_id}/search/users \
-H "Content-Type: application/json" \
-d '\{"active":"boolean","ids":[\{\}],"start":"integer"\}' \
-u <email>:<password>
bytes, err := json.Marshal('\{"active":"boolean","ids":[\{\}],"start":"integer"\}')
if err != nil {
print(err)
}
req, err := http.NewRequest(http.MethodPost,
"https://api.track.toggl.com/reports/api/v3/workspace/{workspace_id}/search/users", bytes.NewBuffer(bytes))
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/workspace/{workspace_id}/search/users')
http = Net::HTTP.new(uri.host, uri.port)
req = Net::HTTP::Post.new(uri.path)
req['Content-Type'] = "application/json"
req.body = \{"active":"boolean","ids":[\{\}],"start":"integer"\}.to_json
request.basic_auth '<email>', '<password>'
res = http.request(req)
puts JSON.parse(res.body)
fetch("https://api.track.toggl.com/reports/api/v3/workspace/{workspace_id}/search/users", {
method: "POST",
body: \{"active":"boolean","ids":[\{\}],"start":"integer"\},
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/workspace/{workspace_id}/search/users', json=\{"active":"boolean","ids":[\{\}],"start":"integer"\}, 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/workspace/{workspace_id}/search/users".to_string())
.json(&serde_json::json!(\{"active":"boolean","ids":[\{\}],"start":"integer"\}))
.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 |
---|---|---|
active | boolean | Whether the wanted users are active, optional, default true. |
ids | Array of integer | User IDs, optional. |
start | integer | Cursor to point from where to start the search, it should be a user ID, optional. |
Response
200
Returns users
Name | Type | Description |
---|---|---|
items | Array of object | - |
items
Name | Type | Description |
---|---|---|
active | boolean | Whether the user is active or not. |
avatar | string | Avatar file name |
deactivated | boolean | Whether the user is deactivated or not. |
deleted_at | string | Deleted at date. |
string | ||
fullname | string | Full name |
id | integer | User ID |
workspace_user_id | integer | Workspace User ID |
400
Possible error messages:
- At least one parameter must be set
- Maximum count of posted IDs is 100
403
Workspace not found/accessible
500
Internal Server Error
POST List tasks
https://api.track.toggl.com/reports/api/v3/workspace/{workspace_id}/{action}/tasks
Returns filtered tasks from workspace.
- cURL
- Go
- Ruby
- JavaScript
- Python
- Rust
curl -X POST https://api.track.toggl.com/reports/api/v3/workspace/{workspace_id}/{action}/tasks \
-H "Content-Type: application/json" \
-d '\{"active":"boolean","ids":[\{\}],"name":"string","page_size":"integer","project_active":"boolean","project_ids":[\{\}],"start":"integer","user_ids":[\{\}]\}' \
-u <email>:<password>
bytes, err := json.Marshal('\{"active":"boolean","ids":[\{\}],"name":"string","page_size":"integer","project_active":"boolean","project_ids":[\{\}],"start":"integer","user_ids":[\{\}]\}')
if err != nil {
print(err)
}
req, err := http.NewRequest(http.MethodPost,
"https://api.track.toggl.com/reports/api/v3/workspace/{workspace_id}/{action}/tasks", bytes.NewBuffer(bytes))
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/workspace/{workspace_id}/{action}/tasks')
http = Net::HTTP.new(uri.host, uri.port)
req = Net::HTTP::Post.new(uri.path)
req['Content-Type'] = "application/json"
req.body = \{"active":"boolean","ids":[\{\}],"name":"string","page_size":"integer","project_active":"boolean","project_ids":[\{\}],"start":"integer","user_ids":[\{\}]\}.to_json
request.basic_auth '<email>', '<password>'
res = http.request(req)
puts JSON.parse(res.body)
fetch("https://api.track.toggl.com/reports/api/v3/workspace/{workspace_id}/{action}/tasks", {
method: "POST",
body: \{"active":"boolean","ids":[\{\}],"name":"string","page_size":"integer","project_active":"boolean","project_ids":[\{\}],"start":"integer","user_ids":[\{\}]\},
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/workspace/{workspace_id}/{action}/tasks', json=\{"active":"boolean","ids":[\{\}],"name":"string","page_size":"integer","project_active":"boolean","project_ids":[\{\}],"start":"integer","user_ids":[\{\}]\}, 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/workspace/{workspace_id}/{action}/tasks".to_string())
.json(&serde_json::json!(\{"active":"boolean","ids":[\{\}],"name":"string","page_size":"integer","project_active":"boolean","project_ids":[\{\}],"start":"integer","user_ids":[\{\}]\}))
.header(CONTENT_TYPE, "application/json")
.send()
.await?
.json()
.await?;
println!("{:#?}", json);
Ok(())
}
Parameters
Path
name | type | required | description |
---|---|---|---|
workspace_id | integer | true | Workspace ID |
action | string | true | search,filters |
Body
Name | Type | Description |
---|---|---|
active | boolean | - |
ids | Array of integer | - |
name | string | - |
page_size | integer | - |
project_active | boolean | - |
project_ids | Array of integer | - |
start | integer | - |
user_ids | Array of integer | - |
Response
200
Returns tasks
Name | Type | Description |
---|---|---|
items | Array of object | - |
items
Name | Type | Description |
---|---|---|
active | boolean | - |
at | string | - |
client_name | string | null |
due_date | string | null |
estimated_seconds | integer | null |
id | integer | - |
integration_ext_id | string | - |
integration_ext_type | string | - |
name | string | - |
permissions | string | - |
project_billable | boolean | - |
project_color | string | - |
project_id | integer | - |
project_name | string | - |
rate | number | - |
rate_last_updated | string | null |
recurring | boolean | - |
toggl_accounts_id | string | null |
tracked_seconds | integer | - |
user_id | integer | null |
workspace_id | integer | - |
400
Possible error messages:
- At least one parameter must be set
- Maximum count of posted IDs is 2000
403
Workspace not found/accessible
500
Internal Server Error