“Projects” Endpoints - PATCH Workspace Projects

https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/projects/{project_ids}

Bulk editing workspace projects.

  • 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::PATCH, "https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/projects/{project_ids}".to_string()).json(&serde_json::json!([\{"op":"string","path":"string","value":\{\}\}]))  .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 Description
items Array of object -
items
Name Type Description
op string Patch operation to perform, one of “add”, “remove”, “replace”
path string Path to the field to patch, example: “/color”
value object Value to set when operation is “add” or “replace”, example: “#000000”. The value type actually depends on the field being patched.
value

Response

200

Name Type Description
failure Array of object -
success Array of integer -
failure
Name Type Description
id integer -
message string -

500

Internal Server Error