Requeue rows as a new run
curl --request POST \
--url https://apiv2.vodex.ai/v1/batches/{id}/restart \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"rows": "failed",
"concurrency": 50,
"window": {
"timezone": "America/New_York",
"start": "09:00",
"end": "20:00",
"days": [
3
]
}
}
'import requests
url = "https://apiv2.vodex.ai/v1/batches/{id}/restart"
payload = {
"rows": "failed",
"concurrency": 50,
"window": {
"timezone": "America/New_York",
"start": "09:00",
"end": "20:00",
"days": [3]
}
}
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({
rows: 'failed',
concurrency: 50,
window: {timezone: 'America/New_York', start: '09:00', end: '20:00', days: [3]}
})
};
fetch('https://apiv2.vodex.ai/v1/batches/{id}/restart', 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://apiv2.vodex.ai/v1/batches/{id}/restart",
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([
'rows' => 'failed',
'concurrency' => 50,
'window' => [
'timezone' => 'America/New_York',
'start' => '09:00',
'end' => '20:00',
'days' => [
3
]
]
]),
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://apiv2.vodex.ai/v1/batches/{id}/restart"
payload := strings.NewReader("{\n \"rows\": \"failed\",\n \"concurrency\": 50,\n \"window\": {\n \"timezone\": \"America/New_York\",\n \"start\": \"09:00\",\n \"end\": \"20:00\",\n \"days\": [\n 3\n ]\n }\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://apiv2.vodex.ai/v1/batches/{id}/restart")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"rows\": \"failed\",\n \"concurrency\": 50,\n \"window\": {\n \"timezone\": \"America/New_York\",\n \"start\": \"09:00\",\n \"end\": \"20:00\",\n \"days\": [\n 3\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://apiv2.vodex.ai/v1/batches/{id}/restart")
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 \"rows\": \"failed\",\n \"concurrency\": 50,\n \"window\": {\n \"timezone\": \"America/New_York\",\n \"start\": \"09:00\",\n \"end\": \"20:00\",\n \"days\": [\n 3\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"batch": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"status": "running",
"runNo": 123,
"assistantId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"concurrency": 123,
"retry": {
"on": [
"<string>"
],
"attempts": 5,
"backoffMinutes": 5040.5
},
"window": {
"timezone": "America/New_York",
"start": "09:00",
"end": "20:00",
"days": [
3
]
},
"suppress": [
"<string>"
],
"createdAt": "2023-11-07T05:31:56Z",
"startedAt": "2023-11-07T05:31:56Z",
"completedAt": "2023-11-07T05:31:56Z",
"counts": {}
},
"requeued": 123
}{
"error": "not found"
}{
"error": "not found"
}{
"error": "not found"
}{
"error": "not found"
}{
"error": "not found"
}Batches
Requeue rows as a new run
Bumps runNo and requeues the selected rows in one transaction —
attempts keyed to a run the batch never reached would be worse than no
restart at all. Per-row attempt counters reset within the new run;
batch_attempts keeps every prior attempt, keyed by runNo.
A suppression is the consumer’s standing instruction and a restart is
not permission to override it: skipped_suppressed rows are excluded
from every scope, including all.
POST
/
batches
/
{id}
/
restart
Requeue rows as a new run
curl --request POST \
--url https://apiv2.vodex.ai/v1/batches/{id}/restart \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"rows": "failed",
"concurrency": 50,
"window": {
"timezone": "America/New_York",
"start": "09:00",
"end": "20:00",
"days": [
3
]
}
}
'import requests
url = "https://apiv2.vodex.ai/v1/batches/{id}/restart"
payload = {
"rows": "failed",
"concurrency": 50,
"window": {
"timezone": "America/New_York",
"start": "09:00",
"end": "20:00",
"days": [3]
}
}
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({
rows: 'failed',
concurrency: 50,
window: {timezone: 'America/New_York', start: '09:00', end: '20:00', days: [3]}
})
};
fetch('https://apiv2.vodex.ai/v1/batches/{id}/restart', 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://apiv2.vodex.ai/v1/batches/{id}/restart",
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([
'rows' => 'failed',
'concurrency' => 50,
'window' => [
'timezone' => 'America/New_York',
'start' => '09:00',
'end' => '20:00',
'days' => [
3
]
]
]),
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://apiv2.vodex.ai/v1/batches/{id}/restart"
payload := strings.NewReader("{\n \"rows\": \"failed\",\n \"concurrency\": 50,\n \"window\": {\n \"timezone\": \"America/New_York\",\n \"start\": \"09:00\",\n \"end\": \"20:00\",\n \"days\": [\n 3\n ]\n }\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://apiv2.vodex.ai/v1/batches/{id}/restart")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"rows\": \"failed\",\n \"concurrency\": 50,\n \"window\": {\n \"timezone\": \"America/New_York\",\n \"start\": \"09:00\",\n \"end\": \"20:00\",\n \"days\": [\n 3\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://apiv2.vodex.ai/v1/batches/{id}/restart")
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 \"rows\": \"failed\",\n \"concurrency\": 50,\n \"window\": {\n \"timezone\": \"America/New_York\",\n \"start\": \"09:00\",\n \"end\": \"20:00\",\n \"days\": [\n 3\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"batch": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"status": "running",
"runNo": 123,
"assistantId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"concurrency": 123,
"retry": {
"on": [
"<string>"
],
"attempts": 5,
"backoffMinutes": 5040.5
},
"window": {
"timezone": "America/New_York",
"start": "09:00",
"end": "20:00",
"days": [
3
]
},
"suppress": [
"<string>"
],
"createdAt": "2023-11-07T05:31:56Z",
"startedAt": "2023-11-07T05:31:56Z",
"completedAt": "2023-11-07T05:31:56Z",
"counts": {}
},
"requeued": 123
}{
"error": "not found"
}{
"error": "not found"
}{
"error": "not found"
}{
"error": "not found"
}{
"error": "not found"
}Authorizations
Tenant API key (vdx_live_…) as Authorization: Bearer.
Path Parameters
Body
application/json