Projects
GET Get workspace projects users
https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/project_users
List all projects users for a given workspace.
- cURL
- Go
- Ruby
- JavaScript
- Python
- Rust
curl https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/project_users \
-H "Content-Type: application/json" \
-u <email>:<password>
req, err := http.NewRequest(http.MethodGet,
"https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/project_users")
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/api/v9/workspaces/{workspace_id}/project_users')
http = Net::HTTP.new(uri.host, uri.port)
req = Net::HTTP::Get.new(uri.path)
req['Content-Type'] = "application/json"
request.basic_auth '<email>', '<password>'
res = http.request(req)
puts JSON.parse(res.body)
fetch("https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/project_users", {
method: "GET",
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.get('https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/project_users', 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::GET, "https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/project_users".to_string())
.header(CONTENT_TYPE, "application/json")
.send()
.await?
.json()
.await?;
println!("{:#?}", json);
Ok(())
}
Parameters
Path
name | type | required | description |
---|---|---|---|
workspace_id | integer | true | Numeric ID of the workspace |
Response
- 200
- 400
- 403
- 500
Successful operation.
Possible error messages:
* Workspace not found
* project_ids cannot exceed 200 elements.
User does not have access to this resource.
Internal Server Error
POST Add an user into workspace projects users
https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/project_users
Include a project user for a given workspace.
- cURL
- Go
- Ruby
- JavaScript
- Python
- Rust
curl -X POST https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/project_users \
-H "Content-Type: application/json" \
-d '{"labour_cost":"integer","manager":"boolean","project_id":"integer","rate_change_mode":"string","user_id":"integer"}' \
-u <email>:<password>
bytes, err := json.Marshal('{"labour_cost":"integer","manager":"boolean","project_id":"integer","rate_change_mode":"string","user_id":"integer"}')
if err != nil {
print(err)
}
req, err := http.NewRequest(http.MethodPost,
"https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/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/api/v9/workspaces/{workspace_id}/project_users')
http = Net::HTTP.new(uri.host, uri.port)
req = Net::HTTP::Post.new(uri.path)
req['Content-Type'] = "application/json"
req.body = {"labour_cost":"integer","manager":"boolean","project_id":"integer","rate_change_mode":"string","user_id":"integer"}.to_json
request.basic_auth '<email>', '<password>'
res = http.request(req)
puts JSON.parse(res.body)
fetch("https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/project_users", {
method: "POST",
body: {"labour_cost":"integer","manager":"boolean","project_id":"integer","rate_change_mode":"string","user_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/api/v9/workspaces/{workspace_id}/project_users', json='{"labour_cost":"integer","manager":"boolean","project_id":"integer","rate_change_mode":"string","user_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/api/v9/workspaces/{workspace_id}/project_users".to_string())
.json(&serde_json::json!({"labour_cost":"integer","manager":"boolean","project_id":"integer","rate_change_mode":"string","user_id":"integer"}))
.header(CONTENT_TYPE, "application/json")
.send()
.await?
.json()
.await?;
println!("{:#?}", json);
Ok(())
}
Parameters
Path
name | type | required | description |
---|---|---|---|
workspace_id | integer | true | Numeric ID of the workspace |
Body
name | type | required | description |
---|---|---|---|
labour_cost | integer | false | - |
manager | boolean | false | - |
postedFields | undefined | false | - |
project_id | integer | false | - |
rate_change_mode | string | false | - |
user_id | integer | false | - |
Response
- 200
- 400
- 403
- 500
{"at":{"type":"string"},"gid":{"type":"integer"},"group_id":{"type":"integer"},"id":{"type":"integer"},"labour_cost":{"type":"integer"},"manager":{"type":"boolean"},"project_id":{"type":"integer"},"rate_last_updated":{"type":"string"},"user_id":{"type":"integer"},"workspace_id":{"type":"integer"}}
Possible error messages:
* Workspace not found
* Invalid project_id
* Invalid user_id
User does not have access to this resource.
Internal Server Error
PATCH Patch project users from workspace
https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/project_users/{project_user_ids}
Patch a list of project users for a given workspace.
- cURL
- Go
- Ruby
- JavaScript
- Python
- Rust
curl -X PATCH https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/project_users/{project_user_ids} \
-H "Content-Type: application/json" \
-u <email>:<password>
req, err := http.NewRequest(http.MethodGet,
"https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/project_users/{project_user_ids}")
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/api/v9/workspaces/{workspace_id}/project_users/{project_user_ids}')
http = Net::HTTP.new(uri.host, uri.port)
req = Net::HTTP::Patch.new(uri.path)
req['Content-Type'] = "application/json"
request.basic_auth '<email>', '<password>'
res = http.request(req)
puts JSON.parse(res.body)
fetch("https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/project_users/{project_user_ids}", {
method: "PATCH",
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.patch('https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/project_users/{project_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::PATCH, "https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/project_users/{project_user_ids}".to_string())
.header(CONTENT_TYPE, "application/json")
.send()
.await?
.json()
.await?;
println!("{:#?}", json);
Ok(())
}
Parameters
Path
name | type | required | description |
---|---|---|---|
workspace_id | integer | true | Numeric ID of the workspace |
Query
name | type | required | description |
---|---|---|---|
project_user_ids | array | true | Numeric IDs of the project users |
Response
- 200
- 400
- 403
- 500
Successful operation.
Possible error messages:
* Workspace not found
* Project user not found/accessible
* Invalid value as user IDs
User does not have access to this resource.
Internal Server Error
PUT Update an user into workspace projects users
https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/project_users/{project_user_id}
Update the data for a project user for a given workspace.
- cURL
- Go
- Ruby
- JavaScript
- Python
- Rust
curl -X PUT https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/project_users/{project_user_id} \
-H "Content-Type: application/json" \
-d '{"labour_cost":"integer","manager":"boolean","rate_change_mode":"string"}' \
-u <email>:<password>
bytes, err := json.Marshal('{"labour_cost":"integer","manager":"boolean","rate_change_mode":"string"}')
if err != nil {
print(err)
}
req, err := http.NewRequest(http.MethodPut,
"https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/project_users/{project_user_id}", 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/api/v9/workspaces/{workspace_id}/project_users/{project_user_id}')
http = Net::HTTP.new(uri.host, uri.port)
req = Net::HTTP::Put.new(uri.path)
req['Content-Type'] = "application/json"
req.body = {"labour_cost":"integer","manager":"boolean","rate_change_mode":"string"}.to_json
request.basic_auth '<email>', '<password>'
res = http.request(req)
puts JSON.parse(res.body)
fetch("https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/project_users/{project_user_id}", {
method: "PUT",
body: {"labour_cost":"integer","manager":"boolean","rate_change_mode":"string"},
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.put('https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/project_users/{project_user_id}', json='{"labour_cost":"integer","manager":"boolean","rate_change_mode":"string"}', 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::PUT, "https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/project_users/{project_user_id}".to_string())
.json(&serde_json::json!({"labour_cost":"integer","manager":"boolean","rate_change_mode":"string"}))
.header(CONTENT_TYPE, "application/json")
.send()
.await?
.json()
.await?;
println!("{:#?}", json);
Ok(())
}
Parameters
Path
name | type | required | description |
---|---|---|---|
workspace_id | integer | true | Numeric ID of the workspace |
project_user_id | integer | true | Numeric ID of the project user |
Body
name | type | required | description |
---|---|---|---|
labour_cost | integer | false | - |
manager | boolean | false | - |
postedFields | undefined | false | - |
rate_change_mode | string | false | - |
Response
- 200
- 400
- 403
- 500
{"at":{"type":"string"},"gid":{"type":"integer"},"group_id":{"type":"integer"},"id":{"type":"integer"},"labour_cost":{"type":"integer"},"manager":{"type":"boolean"},"project_id":{"type":"integer"},"rate_last_updated":{"type":"string"},"user_id":{"type":"integer"},"workspace_id":{"type":"integer"}}
Possible error messages:
* Workspace not found
* Missing data
* Invalid project_id
* Invalid user_id
User does not have access to this resource.
Internal Server Error
DELETE Delete a project user from workspace projects users
https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/project_users/{project_user_id}
Delete a project user for a given workspace.
- cURL
- Go
- Ruby
- JavaScript
- Python
- Rust
curl -X DELETE https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/project_users/{project_user_id} \
-H "Content-Type: application/json" \
-u <email>:<password>
req, err := http.NewRequest(http.MethodPut,
"https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/project_users/{project_user_id}")
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/api/v9/workspaces/{workspace_id}/project_users/{project_user_id}')
http = Net::HTTP.new(uri.host, uri.port)
req = Net::HTTP::Delete.new(uri.path)
req['Content-Type'] = "application/json"
request.basic_auth '<email>', '<password>'
res = http.request(req)
puts JSON.parse(res.body)
fetch("https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/project_users/{project_user_id}", {
method: "DELETE",
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.delete('https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/project_users/{project_user_id}', 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::DELETE, "https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/project_users/{project_user_id}".to_string())
.header(CONTENT_TYPE, "application/json")
.send()
.await?
.json()
.await?;
println!("{:#?}", json);
Ok(())
}
Parameters
Path
name | type | required | description |
---|---|---|---|
workspace_id | integer | true | Numeric ID of the workspace |
project_user_id | integer | true | Numeric ID of the project user |
Response
- 200
- 400
- 403
- 500
Successful operation.
Possible error messages:
* Workspace not found
* Project user not found/accessible
* Invalid project_id
User does not have access to this resource.
Internal Server Error
GET WorkspaceProjects
https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/projects
Get projects for given workspace.
- cURL
- Go
- Ruby
- JavaScript
- Python
- Rust
curl https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/projects \
-H "Content-Type: application/json" \
-d '{"active":"boolean","billable":"boolean","name":"string","onlyTemplates":"boolean","page":"integer","perPage":"integer","since":"integer","sortField":"string","sortOrder":"string","uid":"integer","wid":"integer"}' \
-u <email>:<password>
bytes, err := json.Marshal('{"active":"boolean","billable":"boolean","name":"string","onlyTemplates":"boolean","page":"integer","perPage":"integer","since":"integer","sortField":"string","sortOrder":"string","uid":"integer","wid":"integer"}')
if err != nil {
print(err)
}
req, err := http.NewRequest(http.MethodGet,
"https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/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/api/v9/workspaces/{workspace_id}/projects')
http = Net::HTTP.new(uri.host, uri.port)
req = Net::HTTP::Get.new(uri.path)
req['Content-Type'] = "application/json"
req.body = {"active":"boolean","billable":"boolean","name":"string","onlyTemplates":"boolean","page":"integer","perPage":"integer","since":"integer","sortField":"string","sortOrder":"string","uid":"integer","wid":"integer"}.to_json
request.basic_auth '<email>', '<password>'
res = http.request(req)
puts JSON.parse(res.body)
fetch("https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/projects", {
method: "GET",
body: {"active":"boolean","billable":"boolean","name":"string","onlyTemplates":"boolean","page":"integer","perPage":"integer","since":"integer","sortField":"string","sortOrder":"string","uid":"integer","wid":"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.get('https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/projects', json='{"active":"boolean","billable":"boolean","name":"string","onlyTemplates":"boolean","page":"integer","perPage":"integer","since":"integer","sortField":"string","sortOrder":"string","uid":"integer","wid":"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::GET, "https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/projects".to_string())
.json(&serde_json::json!({"active":"boolean","billable":"boolean","name":"string","onlyTemplates":"boolean","page":"integer","perPage":"integer","since":"integer","sortField":"string","sortOrder":"string","uid":"integer","wid":"integer"}))
.header(CONTENT_TYPE, "application/json")
.send()
.await?
.json()
.await?;
println!("{:#?}", json);
Ok(())
}
Parameters
Path
name | type | required | description |
---|---|---|---|
workspace_id | integer | true | Numeric ID of the workspace |
Body
name | type | required | description |
---|---|---|---|
active | boolean | false | - |
billable | boolean | false | - |
clientIds | undefined | false | - |
groupIds | undefined | false | - |
name | string | false | - |
onlyTemplates | boolean | false | - |
page | integer | false | - |
perPage | integer | false | - |
since | integer | false | - |
sortField | string | false | - |
sortOrder | string | false | - |
uid | integer | false | - |
userIds | undefined | false | - |
wid | integer | false | - |
Response
- 200
- 403
- 500
Successful operation.
User does not have access to this resource.
Internal Server Error
POST WorkspaceProjects
https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/projects
Create project for given workspace.
- cURL
- Go
- Ruby
- JavaScript
- Python
- Rust
curl -X POST https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/projects \
-H "Content-Type: application/json" \
-d '{"active":"boolean","auto_estimates":"boolean","billable":"Pro features","cid":"Ideally we want object_id type fields, so yeah, those here are for
that and proper field as priority, hence if that set, we use that","client_id":"integer","client_name":"string","color":"string","currency":"string","estimated_hours":"integer","foreign_id":"End pro features
Pipes helper","is_private":"boolean","name":"string","rate_change_mode":"string","recurring":"boolean","template":"boolean","template_id":"integer"}' \
-u <email>:<password>
bytes, err := json.Marshal('{"active":"boolean","auto_estimates":"boolean","billable":"Pro features","cid":"Ideally we want object_id type fields, so yeah, those here are for
that and proper field as priority, hence if that set, we use that","client_id":"integer","client_name":"string","color":"string","currency":"string","estimated_hours":"integer","foreign_id":"End pro features
Pipes helper","is_private":"boolean","name":"string","rate_change_mode":"string","recurring":"boolean","template":"boolean","template_id":"integer"}')
if err != nil {
print(err)
}
req, err := http.NewRequest(http.MethodPost,
"https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/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/api/v9/workspaces/{workspace_id}/projects')
http = Net::HTTP.new(uri.host, uri.port)
req = Net::HTTP::Post.new(uri.path)
req['Content-Type'] = "application/json"
req.body = {"active":"boolean","auto_estimates":"boolean","billable":"Pro features","cid":"Ideally we want object_id type fields, so yeah, those here are for
that and proper field as priority, hence if that set, we use that","client_id":"integer","client_name":"string","color":"string","currency":"string","estimated_hours":"integer","foreign_id":"End pro features
Pipes helper","is_private":"boolean","name":"string","rate_change_mode":"string","recurring":"boolean","template":"boolean","template_id":"integer"}.to_json
request.basic_auth '<email>', '<password>'
res = http.request(req)
puts JSON.parse(res.body)
fetch("https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/projects", {
method: "POST",
body: {"active":"boolean","auto_estimates":"boolean","billable":"Pro features","cid":"Ideally we want object_id type fields, so yeah, those here are for
that and proper field as priority, hence if that set, we use that","client_id":"integer","client_name":"string","color":"string","currency":"string","estimated_hours":"integer","foreign_id":"End pro features
Pipes helper","is_private":"boolean","name":"string","rate_change_mode":"string","recurring":"boolean","template":"boolean","template_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/api/v9/workspaces/{workspace_id}/projects', json='{"active":"boolean","auto_estimates":"boolean","billable":"Pro features","cid":"Ideally we want object_id type fields, so yeah, those here are for
that and proper field as priority, hence if that set, we use that","client_id":"integer","client_name":"string","color":"string","currency":"string","estimated_hours":"integer","foreign_id":"End pro features
Pipes helper","is_private":"boolean","name":"string","rate_change_mode":"string","recurring":"boolean","template":"boolean","template_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/api/v9/workspaces/{workspace_id}/projects".to_string())
.json(&serde_json::json!({"active":"boolean","auto_estimates":"boolean","billable":"Pro features","cid":"Ideally we want object_id type fields, so yeah, those here are for
that and proper field as priority, hence if that set, we use that","client_id":"integer","client_name":"string","color":"string","currency":"string","estimated_hours":"integer","foreign_id":"End pro features
Pipes helper","is_private":"boolean","name":"string","rate_change_mode":"string","recurring":"boolean","template":"boolean","template_id":"integer"}))
.header(CONTENT_TYPE, "application/json")
.send()
.await?
.json()
.await?;
println!("{:#?}", json);
Ok(())
}
Parameters
Path
name | type | required | description |
---|---|---|---|
workspace_id | integer | true | Numeric ID of the workspace |
Body
name | type | required | description |
---|---|---|---|
active | boolean | false | - |
auto_estimates | boolean | false | - |
billable | boolean | false | Pro features |
cid | integer | false | Ideally we want object_id type fields, so yeah, those here are for that and proper field as priority, hence if that set, we use that |
client_id | integer | false | - |
client_name | string | false | - |
color | string | false | - |
currency | string | false | - |
estimated_hours | integer | false | - |
foreign_id | string | false | End pro features Pipes helper |
is_private | boolean | false | - |
name | string | false | - |
postedFields | undefined | false | - |
rate_change_mode | string | false | - |
recurring | boolean | false | - |
recurring_parameters | undefined | false | - |
template | boolean | false | - |
template_id | integer | false | - |
Response
- 200
- 403
- 500
{"active":{"type":"boolean"},"actual_hours":{"description":"End pro features","type":"integer"},"at":{"type":"string"},"auto_estimates":{"type":"boolean"},"billable":{"description":"Pro features","type":"boolean"},"cid":{"type":"integer"},"client_id":{"type":"integer"},"color":{"type":"string"},"created_at":{"type":"string"},"currency":{"type":"string"},"current_period":{"end_date":{"type":"string"},"start_date":{"type":"string"}},"estimated_hours":{"type":"integer"},"foreign_id":{"description":"ForeignID - meta information for pipes, it should not be saved into DB!","type":"string"},"id":{"type":"integer"},"is_private":{"type":"boolean"},"name":{"type":"string"},"rate_last_updated":{"type":"string"},"recurring":{"type":"boolean"},"recurring_parameters":{},"server_deleted_at":{"type":"string"},"template":{"type":"boolean"},"wid":{"description":"Ideally we'd want object_id type things, but for usual reasons we need to keep both around, so, that's that","type":"integer"},"workspace_id":{"type":"integer"}}
User does not have access to this resource.
Internal Server Error
PATCH WorkspaceProjects
https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/projects/{project_ids}
Bulk editing workspace projects.
- cURL
- Go
- Ruby
- JavaScript
- Python
- Rust
curl -X PATCH https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/projects/{project_ids} \
-H "Content-Type: application/json" \
-d '{"op":"string","path":"string"}' \
-u <email>:<password>
bytes, err := json.Marshal('{"op":"string","path":"string"}')
if err != nil {
print(err)
}
req, err := http.NewRequest(http.MethodGet,
"https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/projects/{project_ids}", 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/api/v9/workspaces/{workspace_id}/projects/{project_ids}')
http = Net::HTTP.new(uri.host, uri.port)
req = Net::HTTP::Patch.new(uri.path)
req['Content-Type'] = "application/json"
req.body = {"op":"string","path":"string"}.to_json
request.basic_auth '<email>', '<password>'
res = http.request(req)
puts JSON.parse(res.body)
fetch("https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/projects/{project_ids}", {
method: "PATCH",
body: {"op":"string","path":"string"},
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.patch('https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/projects/{project_ids}', json='{"op":"string","path":"string"}', 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::PATCH, "https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/projects/{project_ids}".to_string())
.json(&serde_json::json!({"op":"string","path":"string"}))
.header(CONTENT_TYPE, "application/json")
.send()
.await?
.json()
.await?;
println!("{:#?}", json);
Ok(())
}
Parameters
Path
name | type | required | description |
---|---|---|---|
workspace_id | integer | true | Numeric ID of the workspace |
project_ids | string | true | Numeric IDs of project ids, separated by comma. E.g.: 204301830,202700150,202687559 |
Body
name | type | required | description |
---|---|---|---|
op | string | false | - |
path | string | false | - |
Response
- 200
- 500
{"failure":{},"success":{}}
Internal Server Error
GET WorkspaceProject
https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/projects/{project_id}
Get project for given workspace.
- cURL
- Go
- Ruby
- JavaScript
- Python
- Rust
curl https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/projects/{project_id} \
-H "Content-Type: application/json" \
-u <email>:<password>
req, err := http.NewRequest(http.MethodGet,
"https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/projects/{project_id}")
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/api/v9/workspaces/{workspace_id}/projects/{project_id}')
http = Net::HTTP.new(uri.host, uri.port)
req = Net::HTTP::Get.new(uri.path)
req['Content-Type'] = "application/json"
request.basic_auth '<email>', '<password>'
res = http.request(req)
puts JSON.parse(res.body)
fetch("https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/projects/{project_id}", {
method: "GET",
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.get('https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/projects/{project_id}', 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::GET, "https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/projects/{project_id}".to_string())
.header(CONTENT_TYPE, "application/json")
.send()
.await?
.json()
.await?;
println!("{:#?}", json);
Ok(())
}
Parameters
Path
name | type | required | description |
---|---|---|---|
workspace_id | integer | true | Numeric ID of the workspace |
project_id | integer | true | Numeric ID of the project |
Response
- 200
- 403
- 500
{"active":{"type":"boolean"},"actual_hours":{"description":"End pro features","type":"integer"},"at":{"type":"string"},"auto_estimates":{"type":"boolean"},"billable":{"description":"Pro features","type":"boolean"},"cid":{"type":"integer"},"client_id":{"type":"integer"},"color":{"type":"string"},"created_at":{"type":"string"},"currency":{"type":"string"},"current_period":{"end_date":{"type":"string"},"start_date":{"type":"string"}},"estimated_hours":{"type":"integer"},"foreign_id":{"description":"ForeignID - meta information for pipes, it should not be saved into DB!","type":"string"},"id":{"type":"integer"},"is_private":{"type":"boolean"},"name":{"type":"string"},"rate_last_updated":{"type":"string"},"recurring":{"type":"boolean"},"recurring_parameters":{},"server_deleted_at":{"type":"string"},"template":{"type":"boolean"},"wid":{"description":"Ideally we'd want object_id type things, but for usual reasons we need to keep both around, so, that's that","type":"integer"},"workspace_id":{"type":"integer"}}
User does not have access to this resource.
Internal Server Error
POST WorkspaceProject
https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/projects/{project_id}
Post project for given workspace.
- cURL
- Go
- Ruby
- JavaScript
- Python
- Rust
curl -X POST https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/projects/{project_id} \
-H "Content-Type: application/json" \
-d '{"active":"boolean","auto_estimates":"boolean","billable":"Pro features","cid":"Ideally we want object_id type fields, so yeah, those here are for
that and proper field as priority, hence if that set, we use that","client_id":"integer","client_name":"string","color":"string","currency":"string","estimated_hours":"integer","foreign_id":"End pro features
Pipes helper","is_private":"boolean","name":"string","rate_change_mode":"string","recurring":"boolean","template":"boolean","template_id":"integer"}' \
-u <email>:<password>
bytes, err := json.Marshal('{"active":"boolean","auto_estimates":"boolean","billable":"Pro features","cid":"Ideally we want object_id type fields, so yeah, those here are for
that and proper field as priority, hence if that set, we use that","client_id":"integer","client_name":"string","color":"string","currency":"string","estimated_hours":"integer","foreign_id":"End pro features
Pipes helper","is_private":"boolean","name":"string","rate_change_mode":"string","recurring":"boolean","template":"boolean","template_id":"integer"}')
if err != nil {
print(err)
}
req, err := http.NewRequest(http.MethodPost,
"https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/projects/{project_id}", 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/api/v9/workspaces/{workspace_id}/projects/{project_id}')
http = Net::HTTP.new(uri.host, uri.port)
req = Net::HTTP::Post.new(uri.path)
req['Content-Type'] = "application/json"
req.body = {"active":"boolean","auto_estimates":"boolean","billable":"Pro features","cid":"Ideally we want object_id type fields, so yeah, those here are for
that and proper field as priority, hence if that set, we use that","client_id":"integer","client_name":"string","color":"string","currency":"string","estimated_hours":"integer","foreign_id":"End pro features
Pipes helper","is_private":"boolean","name":"string","rate_change_mode":"string","recurring":"boolean","template":"boolean","template_id":"integer"}.to_json
request.basic_auth '<email>', '<password>'
res = http.request(req)
puts JSON.parse(res.body)
fetch("https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/projects/{project_id}", {
method: "POST",
body: {"active":"boolean","auto_estimates":"boolean","billable":"Pro features","cid":"Ideally we want object_id type fields, so yeah, those here are for
that and proper field as priority, hence if that set, we use that","client_id":"integer","client_name":"string","color":"string","currency":"string","estimated_hours":"integer","foreign_id":"End pro features
Pipes helper","is_private":"boolean","name":"string","rate_change_mode":"string","recurring":"boolean","template":"boolean","template_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/api/v9/workspaces/{workspace_id}/projects/{project_id}', json='{"active":"boolean","auto_estimates":"boolean","billable":"Pro features","cid":"Ideally we want object_id type fields, so yeah, those here are for
that and proper field as priority, hence if that set, we use that","client_id":"integer","client_name":"string","color":"string","currency":"string","estimated_hours":"integer","foreign_id":"End pro features
Pipes helper","is_private":"boolean","name":"string","rate_change_mode":"string","recurring":"boolean","template":"boolean","template_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/api/v9/workspaces/{workspace_id}/projects/{project_id}".to_string())
.json(&serde_json::json!({"active":"boolean","auto_estimates":"boolean","billable":"Pro features","cid":"Ideally we want object_id type fields, so yeah, those here are for
that and proper field as priority, hence if that set, we use that","client_id":"integer","client_name":"string","color":"string","currency":"string","estimated_hours":"integer","foreign_id":"End pro features
Pipes helper","is_private":"boolean","name":"string","rate_change_mode":"string","recurring":"boolean","template":"boolean","template_id":"integer"}))
.header(CONTENT_TYPE, "application/json")
.send()
.await?
.json()
.await?;
println!("{:#?}", json);
Ok(())
}
Parameters
Path
name | type | required | description |
---|---|---|---|
workspace_id | integer | true | Numeric ID of the workspace |
project_id | integer | true | Numeric ID of the project |
Body
name | type | required | description |
---|---|---|---|
active | boolean | false | - |
auto_estimates | boolean | false | - |
billable | boolean | false | Pro features |
cid | integer | false | Ideally we want object_id type fields, so yeah, those here are for that and proper field as priority, hence if that set, we use that |
client_id | integer | false | - |
client_name | string | false | - |
color | string | false | - |
currency | string | false | - |
estimated_hours | integer | false | - |
foreign_id | string | false | End pro features Pipes helper |
is_private | boolean | false | - |
name | string | false | - |
postedFields | undefined | false | - |
rate_change_mode | string | false | - |
recurring | boolean | false | - |
recurring_parameters | undefined | false | - |
template | boolean | false | - |
template_id | integer | false | - |
Response
- 200
- 403
- 500
{"active":{"type":"boolean"},"actual_hours":{"description":"End pro features","type":"integer"},"at":{"type":"string"},"auto_estimates":{"type":"boolean"},"billable":{"description":"Pro features","type":"boolean"},"cid":{"type":"integer"},"client_id":{"type":"integer"},"color":{"type":"string"},"created_at":{"type":"string"},"currency":{"type":"string"},"current_period":{"end_date":{"type":"string"},"start_date":{"type":"string"}},"estimated_hours":{"type":"integer"},"foreign_id":{"description":"ForeignID - meta information for pipes, it should not be saved into DB!","type":"string"},"id":{"type":"integer"},"is_private":{"type":"boolean"},"name":{"type":"string"},"rate_last_updated":{"type":"string"},"recurring":{"type":"boolean"},"recurring_parameters":{},"server_deleted_at":{"type":"string"},"template":{"type":"boolean"},"wid":{"description":"Ideally we'd want object_id type things, but for usual reasons we need to keep both around, so, that's that","type":"integer"},"workspace_id":{"type":"integer"}}
User does not have access to this resource.
Internal Server Error
DELETE WorkspaceProject
https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/projects/{project_id}
Delete project for given workspace.
- cURL
- Go
- Ruby
- JavaScript
- Python
- Rust
curl -X DELETE https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/projects/{project_id} \
-H "Content-Type: application/json" \
-u <email>:<password>
req, err := http.NewRequest(http.MethodPut,
"https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/projects/{project_id}")
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/api/v9/workspaces/{workspace_id}/projects/{project_id}')
http = Net::HTTP.new(uri.host, uri.port)
req = Net::HTTP::Delete.new(uri.path)
req['Content-Type'] = "application/json"
request.basic_auth '<email>', '<password>'
res = http.request(req)
puts JSON.parse(res.body)
fetch("https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/projects/{project_id}", {
method: "DELETE",
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.delete('https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/projects/{project_id}', 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::DELETE, "https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/projects/{project_id}".to_string())
.header(CONTENT_TYPE, "application/json")
.send()
.await?
.json()
.await?;
println!("{:#?}", json);
Ok(())
}
Parameters
Path
name | type | required | description |
---|---|---|---|
workspace_id | integer | true | Numeric ID of the workspace |
project_id | integer | true | Numeric ID of the project |
Response
- 200
- 403
- 500
Successful operation.
User does not have access to this resource.
Internal Server Error