Reprocess quarantine
curl --request POST \
--url https://api.example.com/v0/admin/quarantine/reprocess \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"idempotency_key": "<string>",
"corpus_id": "<string>",
"dry_run": true,
"plugin": "<string>",
"code": "<string>",
"quarantined_after": "2023-11-07T05:31:56Z",
"quarantined_before": "2023-11-07T05:31:56Z"
}
'import requests
url = "https://api.example.com/v0/admin/quarantine/reprocess"
payload = {
"idempotency_key": "<string>",
"corpus_id": "<string>",
"dry_run": True,
"plugin": "<string>",
"code": "<string>",
"quarantined_after": "2023-11-07T05:31:56Z",
"quarantined_before": "2023-11-07T05:31:56Z"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
idempotency_key: '<string>',
corpus_id: '<string>',
dry_run: true,
plugin: '<string>',
code: '<string>',
quarantined_after: '2023-11-07T05:31:56Z',
quarantined_before: '2023-11-07T05:31:56Z'
})
};
fetch('https://api.example.com/v0/admin/quarantine/reprocess', 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://api.example.com/v0/admin/quarantine/reprocess",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'idempotency_key' => '<string>',
'corpus_id' => '<string>',
'dry_run' => true,
'plugin' => '<string>',
'code' => '<string>',
'quarantined_after' => '2023-11-07T05:31:56Z',
'quarantined_before' => '2023-11-07T05:31:56Z'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v0/admin/quarantine/reprocess"
payload := strings.NewReader("{\n \"idempotency_key\": \"<string>\",\n \"corpus_id\": \"<string>\",\n \"dry_run\": true,\n \"plugin\": \"<string>\",\n \"code\": \"<string>\",\n \"quarantined_after\": \"2023-11-07T05:31:56Z\",\n \"quarantined_before\": \"2023-11-07T05:31:56Z\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/v0/admin/quarantine/reprocess")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"idempotency_key\": \"<string>\",\n \"corpus_id\": \"<string>\",\n \"dry_run\": true,\n \"plugin\": \"<string>\",\n \"code\": \"<string>\",\n \"quarantined_after\": \"2023-11-07T05:31:56Z\",\n \"quarantined_before\": \"2023-11-07T05:31:56Z\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v0/admin/quarantine/reprocess")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"idempotency_key\": \"<string>\",\n \"corpus_id\": \"<string>\",\n \"dry_run\": true,\n \"plugin\": \"<string>\",\n \"code\": \"<string>\",\n \"quarantined_after\": \"2023-11-07T05:31:56Z\",\n \"quarantined_before\": \"2023-11-07T05:31:56Z\"\n}"
response = http.request(request)
puts response.read_body{
"versions": 1,
"stages": {
"normalization": 1,
"ingestion": 1
},
"codes": {}
}{
"operation_id": "<string>",
"kind": "<string>",
"state": "queued",
"counters": {},
"errors": [
{
"code": "<string>",
"message": "<string>",
"retryable": true,
"field": "<string>",
"resync_url": "<string>"
}
],
"progress": 0.5,
"previous_operation_id": "<string>",
"corpus_id": "<string>",
"result": {
"projection_generation_id": "<string>"
},
"backfill": {
"registration_id": "<string>",
"spaces": [
"<string>"
],
"estimate": {
"registration_id": "<string>",
"spaces": [
"<string>"
],
"versions": 1,
"segments": 1,
"input_tokens": 1,
"estimated_seconds": 1,
"duration_basis": "rate",
"confirmation_required": true,
"estimated_cost_usd": 1
},
"accepted_after": "2023-11-07T05:31:56Z",
"accepted_before": "2023-11-07T05:31:56Z",
"plan_id": "<string>",
"checkpoint": "<string>"
},
"quarantine_reprocess": {
"plan_id": "<string>",
"estimate": {
"versions": 1,
"stages": {
"normalization": 1,
"ingestion": 1
},
"codes": {}
},
"plugin": "<string>",
"code": "<string>",
"quarantined_after": "2023-11-07T05:31:56Z",
"quarantined_before": "2023-11-07T05:31:56Z"
}
}{
"code": "<string>",
"message": "<string>",
"retryable": true,
"field": "<string>",
"resync_url": "<string>"
}Admin
Reprocess quarantine
Rerun, with the Pipeline Plan active now, the step a Corpus's stuck Versions failed at, typically after a plugin was fixed and activated or a plan rolled back. A Version quarantined at normalization is normalized again, published with its new Manifest and processed; one quarantined at ingestion is segmented, embedded and indexed again. A Version that succeeds goes through the normal path, as for a first success. It becomes current if its Record still desires it, searchable, its alerts are evaluated, and the change feed announces it (record.materialized when its content changed, record.retrieval_ready, record.enrichment_available). A Version that fails again stays quarantined with its new reason. The scope is the Corpus's stuck Versions (see listQuarantinedVersions), kept by the optional filters, taken when the reprocess is accepted. A dry run is required. dry_run true answers 200 with the count and records it under the idempotency key. The same body with dry_run false then accepts the reprocess as a queued Operation (202, Location). Without a dry run recorded under that key and scope, the answer is 409 dry_run_required. The same key with another scope is 409 idempotency_conflict, and an accepted key replays its Operation. A Corpus whose previous reprocess has not finished is 409 reprocess_in_progress. The reprocess runs on the backfills' task queue at the deployment's backfill.rate, pinned to the plan active when it is accepted. It can be paused, resumed, canceled and rerun. Its counters are versions_in_scope, versions_recovered, versions_quarantined (failed again) and versions_skipped (with skipped_<reason>). Requires plugins:admin, on a key of the Corpus's Organization that grants the Corpus.
POST
/
v0
/
admin
/
quarantine
/
reprocess
Reprocess quarantine
curl --request POST \
--url https://api.example.com/v0/admin/quarantine/reprocess \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"idempotency_key": "<string>",
"corpus_id": "<string>",
"dry_run": true,
"plugin": "<string>",
"code": "<string>",
"quarantined_after": "2023-11-07T05:31:56Z",
"quarantined_before": "2023-11-07T05:31:56Z"
}
'import requests
url = "https://api.example.com/v0/admin/quarantine/reprocess"
payload = {
"idempotency_key": "<string>",
"corpus_id": "<string>",
"dry_run": True,
"plugin": "<string>",
"code": "<string>",
"quarantined_after": "2023-11-07T05:31:56Z",
"quarantined_before": "2023-11-07T05:31:56Z"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
idempotency_key: '<string>',
corpus_id: '<string>',
dry_run: true,
plugin: '<string>',
code: '<string>',
quarantined_after: '2023-11-07T05:31:56Z',
quarantined_before: '2023-11-07T05:31:56Z'
})
};
fetch('https://api.example.com/v0/admin/quarantine/reprocess', 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://api.example.com/v0/admin/quarantine/reprocess",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'idempotency_key' => '<string>',
'corpus_id' => '<string>',
'dry_run' => true,
'plugin' => '<string>',
'code' => '<string>',
'quarantined_after' => '2023-11-07T05:31:56Z',
'quarantined_before' => '2023-11-07T05:31:56Z'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v0/admin/quarantine/reprocess"
payload := strings.NewReader("{\n \"idempotency_key\": \"<string>\",\n \"corpus_id\": \"<string>\",\n \"dry_run\": true,\n \"plugin\": \"<string>\",\n \"code\": \"<string>\",\n \"quarantined_after\": \"2023-11-07T05:31:56Z\",\n \"quarantined_before\": \"2023-11-07T05:31:56Z\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/v0/admin/quarantine/reprocess")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"idempotency_key\": \"<string>\",\n \"corpus_id\": \"<string>\",\n \"dry_run\": true,\n \"plugin\": \"<string>\",\n \"code\": \"<string>\",\n \"quarantined_after\": \"2023-11-07T05:31:56Z\",\n \"quarantined_before\": \"2023-11-07T05:31:56Z\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v0/admin/quarantine/reprocess")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"idempotency_key\": \"<string>\",\n \"corpus_id\": \"<string>\",\n \"dry_run\": true,\n \"plugin\": \"<string>\",\n \"code\": \"<string>\",\n \"quarantined_after\": \"2023-11-07T05:31:56Z\",\n \"quarantined_before\": \"2023-11-07T05:31:56Z\"\n}"
response = http.request(request)
puts response.read_body{
"versions": 1,
"stages": {
"normalization": 1,
"ingestion": 1
},
"codes": {}
}{
"operation_id": "<string>",
"kind": "<string>",
"state": "queued",
"counters": {},
"errors": [
{
"code": "<string>",
"message": "<string>",
"retryable": true,
"field": "<string>",
"resync_url": "<string>"
}
],
"progress": 0.5,
"previous_operation_id": "<string>",
"corpus_id": "<string>",
"result": {
"projection_generation_id": "<string>"
},
"backfill": {
"registration_id": "<string>",
"spaces": [
"<string>"
],
"estimate": {
"registration_id": "<string>",
"spaces": [
"<string>"
],
"versions": 1,
"segments": 1,
"input_tokens": 1,
"estimated_seconds": 1,
"duration_basis": "rate",
"confirmation_required": true,
"estimated_cost_usd": 1
},
"accepted_after": "2023-11-07T05:31:56Z",
"accepted_before": "2023-11-07T05:31:56Z",
"plan_id": "<string>",
"checkpoint": "<string>"
},
"quarantine_reprocess": {
"plan_id": "<string>",
"estimate": {
"versions": 1,
"stages": {
"normalization": 1,
"ingestion": 1
},
"codes": {}
},
"plugin": "<string>",
"code": "<string>",
"quarantined_after": "2023-11-07T05:31:56Z",
"quarantined_before": "2023-11-07T05:31:56Z"
}
}{
"code": "<string>",
"message": "<string>",
"retryable": true,
"field": "<string>",
"resync_url": "<string>"
}Authorizations
API key, not necessarily a JWT. Server derives Organization, permitted actions and Corpus scope; every resource access is authorized.
Body
application/json
Required string length:
1 - 200Minimum string length:
1true reports the count and records it; false starts the reprocess a dry run with the same key and scope preceded.
Only Versions whose quarantine reason names this plugin id.
Minimum string length:
1Only Versions quarantined with this reason code.
Minimum string length:
1Only Versions quarantined at or after this time.
Only Versions quarantined before this time.