cancel_upload
DELETE
/api/v1/files/upload/{upload_id}
const url = 'https://example.com/api/v1/files/upload/example';const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}use std::str::FromStr;use reqwest;
#[tokio::main]pub async fn main() { let url = "https://example.com/api/v1/files/upload/example";
let mut headers = reqwest::header::HeaderMap::new(); headers.insert("Authorization", "Bearer <token>".parse().unwrap());
let client = reqwest::Client::new(); let response = client.request(reqwest::Method::from_str("DELETE").unwrap(), url) .headers(headers) .send() .await;
let results = response.unwrap() .json::<serde_json::Value>() .await .unwrap();
dbg!(results);}curl --request DELETE \ --url https://example.com/api/v1/files/upload/example \ --header 'Authorization: Bearer <token>'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”upload_id
required
string
Upload session ID
Responses
Section titled “Responses”Upload cancelled
Unauthorized
Session not found