Veljko
1
https://api.track.toggl.com/api/v9/workspaces/{workspace_id}/time_entries/{time_entry_ids}
In short: RFC 6902 - JavaScript Object Notation (JSON) Patch and RFC 6901 - JavaScript Object Notation (JSON) Pointer with some additions. Patch will be executed partially when there are errors with some records. No transaction, no rollback.
- 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}/time_entries/{time_entry_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 |
time_entry_ids |
string |
true |
Numeric IDs of time_entries, separated by comma. E.g.: 204301830,202700150,202687559 . The limit is 100 IDs per request. |
Query
name |
type |
required |
description |
meta |
boolean |
false |
Should the response contain data for meta entities |
Body
Name |
Type |
Description |
items |
Array of object |
- |
items
Name |
Type |
Description |
op |
string |
Operation (add/remove/replace) |
path |
string |
The path to the entity to patch (e.g. /description) |
value |
object |
The new value for the entity in path. |
value
Response
200
Name |
Type |
Description |
failure |
Array of object |
- |
success |
Array of integer |
The IDs for which the patch was succesful. |
failure
Name |
Type |
Description |
id |
integer |
The ID for which the patch operation failed. |
message |
string |
The operation failure reason. |
500
Internal Server Error