“Projects” Endpoints - 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
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 integer true Numeric IDs of the project users

Response​

200​

Name Type Description
failure Array of object List of found errors
success Array of integer List of org user IDs that were successfully patched
failure​
Name Type Description
id integer Organization user ID
message string Found error message

400​

Possible error messages:

  • Invalid value as user IDs
  • No patchable fields defined
  • PATCH expects at least one ID
  • PATCH request is limited to %d entries at once
  • Invalid op:
  • Invalid path format:
  • Path not found:
  • Operation not supported ({patch_operation} {patch_path})
  • Invalid path
  • /manager expects a boolean
  • /labor_cost expects an float64 or null
  • /rate expects an float64 or null
  • Operation not supported (add /labor_cost)
  • Operation not supported (add /rate)
  • Operation not supported (add /manager)

403​

User does not have access to this resource.

500​

Internal Server Error