Smart Batch 행 단계 재시도
SmartBatch의 단일 행(rowIndex)에서 특정 sequences만 지우고 다시 큐에 넣어, 다른 모든 단계의 저장된 출력과 다른 모든 행은 그대로 유지합니다. rowIndex와 sequences는 모두 필수입니다.
배치, 대상 행, 기반 FeatureRunner 실행 또는 실행 항목이 현재 처리 중인 경우 서버는 409 Conflict로 요청을 거부합니다(batch_is_processing, row_is_processing, run_is_processing, item_is_processing).
엔드포인트
POST https://api.verifik.co/v2/smart-batches/{id}/retry-steps
클라이언트별 Authorization: Bearer <VERIFIK_JWT>를 사용하여 Smart-Agent 프록시(https://ai.verifik.co/v2/smart-batches/{id}/retry-steps)를 통해서도 호출할 수 있습니다. 공유 x402 실행은 403 Forbidden으로 차단됩니다.
헤더
| 이름 | 값 | 설명 |
|---|---|---|
Content-Type | application/json | 요청 페이로드 형식. |
Authorization | Bearer <VERIFIK_JWT> | 클라이언트 범위 JWT (authUser.clientId). |
매개변수
| 이름 | 타입 | 필수 | 설명 |
|---|---|---|---|
id | string | 예 | SmartBatch ObjectId. |
본문
| 이름 | 타입 | 필수 | 설명 |
|---|---|---|---|
rowIndex | integer | 예 | 부분 재시도할 행의 0 기반 인덱스(>= 0). |
sequences | integer[] | 예 | 해당 행에서 지우고 다시 실행할 단계 시퀀스 번호(>= 0, 최소 1개, 최대 200개 항목). |
알 수 없는 본문 키나 누락된 필수 필드는 Joi 검증에 의해 409 MissingParameter로 거부됩니다.
요청
- Node.js
- PHP
- Python
- Go
- cURL
import axios from "axios";
const run = async () => {
const batchId = "6801a2b3c4d5e6f7a8b9c0d3";
const { data } = await axios.post(
`https://api.verifik.co/v2/smart-batches/${batchId}/retry-steps`,
{
rowIndex: 2,
sequences: [2, 3],
},
{
headers: {
"Content-Type": "application/json",
Authorization: `Bearer ${process.env.VERIFIK_JWT}`,
},
}
);
console.log(data);
};
run();
<?php
$batchId = "6801a2b3c4d5e6f7a8b9c0d3";
$payload = [
"rowIndex" => 2,
"sequences" => [2, 3],
];
$ch = curl_init("https://api.verifik.co/v2/smart-batches/" . $batchId . "/retry-steps");
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"Content-Type: application/json",
"Authorization: Bearer " . getenv("VERIFIK_JWT"),
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($payload));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
import os
import requests
batch_id = "6801a2b3c4d5e6f7a8b9c0d3"
url = f"https://api.verifik.co/v2/smart-batches/{batch_id}/retry-steps"
headers = {
"Content-Type": "application/json",
"Authorization": f"Bearer {os.getenv('VERIFIK_JWT')}",
}
payload = {
"rowIndex": 2,
"sequences": [2, 3],
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
package main
import (
"bytes"
"encoding/json"
"fmt"
"net/http"
"os"
)
func main() {
batchID := "6801a2b3c4d5e6f7a8b9c0d3"
body, _ := json.Marshal(map[string]interface{}{
"rowIndex": 2,
"sequences": []int{2, 3},
})
req, _ := http.NewRequest("POST", "https://api.verifik.co/v2/smart-batches/"+batchID+"/retry-steps", bytes.NewReader(body))
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Authorization", "Bearer "+os.Getenv("VERIFIK_JWT"))
resp, _ := http.DefaultClient.Do(req)
defer resp.Body.Close()
var out map[string]interface{}
json.NewDecoder(resp.Body).Decode(&out)
fmt.Println(out)
}
curl -X POST "https://api.verifik.co/v2/smart-batches/6801a2b3c4d5e6f7a8b9c0d3/retry-steps" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $VERIFIK_JWT" \
-d '{
"rowIndex": 2,
"sequences": [2, 3]
}'
응답
- 200 OK
- 400
- 401
- 403
- 404 (배치)
- 404 (행)
- 409 (처리 중)
- 409 (MissingParameter)
- 422
{
"data": {
"batch": {
"_id": "6801a2b3c4d5e6f7a8b9c0d3",
"batchConfiguration": "6801a2b3c4d5e6f7a8b9c0d4",
"client": "507f1f77bcf86cd799439013",
"name": "Colombia Onboarding — November",
"status": "processing",
"executor": "featureRunner",
"source": "smart_batch",
"headlessRun": true,
"creditsSpent": 0.4,
"totalRows": 10,
"completedRows": 9,
"failedRows": 0,
"partialRows": 0,
"createdAt": "2026-11-24T20:00:00.000Z",
"updatedAt": "2026-11-24T20:22:00.000Z"
},
"retried": 2
}
}
{
"message": "retry_steps_invalid",
"code": "BadRequest"
}
{
"message": "Unauthorized",
"code": "Unauthorized"
}
{
"message": "Shared x402 execution is forbidden on this endpoint",
"code": "Forbidden"
}
{
"message": "batch_not_found",
"code": "NotFound"
}
{
"message": "row_not_found",
"code": "NotFound"
}
{
"message": "batch_is_processing",
"code": "Conflict"
}
{
"message": "\"sequences\" must contain at least 1 items",
"code": "MissingParameter"
}
{
"message": "UnprocessableEntity",
"code": "UnprocessableEntity"
}
참고
- 저장된
results와errors는rowIndex의 지정된sequences에 대해서만 지워지며, 다른 모든 단계 시퀀스의 결과는 그대로 유지됩니다. - 가능한
409 Conflict사유는batch_is_processing,row_is_processing,run_is_processing,item_is_processing입니다. - 유효하지 않거나 빈 단계 시퀀스 참조를 전달하면
400 BadRequest(retry_steps_invalid)가 반환됩니다. - 배치 전체에서 실패했거나 부분 완료된 전체 행을 재시도하려면 실패한 Smart Batch 행 재시도를 사용하세요.