Delete a completed parse or extraction job
curl --request DELETE \
--url https://transform.unstructured.io/api/v2/jobs/{jobId} \
--header 'unstructured-api-key: <api-key>'import requests
url = "https://transform.unstructured.io/api/v2/jobs/{jobId}"
headers = {"unstructured-api-key": "<api-key>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {'unstructured-api-key': '<api-key>'}};
fetch('https://transform.unstructured.io/api/v2/jobs/{jobId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://transform.unstructured.io/api/v2/jobs/{jobId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"unstructured-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://transform.unstructured.io/api/v2/jobs/{jobId}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("unstructured-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://transform.unstructured.io/api/v2/jobs/{jobId}")
.header("unstructured-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://transform.unstructured.io/api/v2/jobs/{jobId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["unstructured-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_bodyAPI endpoints
Delete a finished job
Remove a terminal job from API listings asynchronously. Review deletion responses and understand how source and output retention differ.
DELETE
/
api
/
v2
/
jobs
/
{jobId}
Delete a completed parse or extraction job
curl --request DELETE \
--url https://transform.unstructured.io/api/v2/jobs/{jobId} \
--header 'unstructured-api-key: <api-key>'import requests
url = "https://transform.unstructured.io/api/v2/jobs/{jobId}"
headers = {"unstructured-api-key": "<api-key>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {'unstructured-api-key': '<api-key>'}};
fetch('https://transform.unstructured.io/api/v2/jobs/{jobId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://transform.unstructured.io/api/v2/jobs/{jobId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"unstructured-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://transform.unstructured.io/api/v2/jobs/{jobId}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("unstructured-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://transform.unstructured.io/api/v2/jobs/{jobId}")
.header("unstructured-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://transform.unstructured.io/api/v2/jobs/{jobId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["unstructured-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_bodyRemove a terminal job from the API asynchronously. This operation does not immediately delete the source file or output data.
Start with Parse your first document.
Authorizations
ApiKeyAuthBearerAuth
Path Parameters
Response
The deletion request was accepted.
Was this page helpful?

