“Groups” Endpoints - PATCH Patch group

https://api.track.toggl.com/api/v9/organizations/{organization_id}/groups/{group_id}

Patches a group in the specified organization. Patches are applied individually.

  • 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/organizations/{organization_id}/groups/{group_id}".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
organization_id integer true Numeric ID of the organization.
group_id integer true Numeric ID of the group.

Body

Name Type Description
items Array of object -
items
Name Type Description
op string -
path string -
value Array of integer -

Response

200

Returns the result of the requested operations.

Name Type Description
failure Array of object -
success Array of object -
failure
Name Type Description
message string -
patch object -
patch
Name Type Description
op string -
path string -
value Array of integer -
success
Name Type Description
op string -
path string -
value Array of integer -

400

Possible error messages:

  • Invalid JSON input
  • Empty or invalid patch operation
  • Empty or invalid patch path
  • Unknown group at organization
  • Too many patches_Too many values per patch_

403

Forbidden

404

Invalid group ID.

To be blunt, your API documentation is really confusing and missing key information.
For example:

  • What are the accepted values for op?
  • What are the accepted values for path?
  • There’s also a major contradiction for the value field. The description says it’s an “Array of integer,” but the example shows an “Array of object.” Which one is correct?
    And if value is supposed to be an array of integers, how are we supposed to update string fields, like a group’s name?

Honestly, it feels like this documentation wasn’t reviewed before being published. This makes it extremely difficult for us, as paying customers, to integrate with your service.