Skip to main content

Smart Batch 취소

SmartBatch(및 연결된 모든 FeatureRunner 실행)를 취소합니다. 배치는 status: "cancelled"로 전환되고 completedAt이 설정됩니다.

이미 종료 상태("completed", "failed" 또는 "cancelled")에 있는 배치는 취소할 수 없으며 400 BadRequest (batch_already_terminal)를 반환합니다.

엔드포인트​

POST https://api.verifik.co/v2/smart-batches/{id}/cancel

클라이언트별 Authorization: Bearer <VERIFIK_JWT>를 사용하여 Smart-Agent 프록시(https://ai.verifik.co/v2/smart-batches/{id}/cancel)를 통해서도 호출할 수 있습니다. 공유 x402 실행은 403 Forbidden으로 차단됩니다.

헤더​

이름값설명
Content-Typeapplication/json요청 페이로드 형식.
AuthorizationBearer <VERIFIK_JWT>클라이언트 범위 JWT (authUser.clientId).

매개변수​

이름타입필수설명
idstring예취소할 SmartBatch ObjectId.

요청​

import axios from "axios";

const run = async () => {
const batchId = "6801a2b3c4d5e6f7a8b9c0d3";

const { data } = await axios.post(
`https://api.verifik.co/v2/smart-batches/${batchId}/cancel`,
{},
{
headers: {
"Content-Type": "application/json",
Authorization: `Bearer ${process.env.VERIFIK_JWT}`,
},
}
);

console.log(data);
};

run();

응답​

{
"data": {
"_id": "6801a2b3c4d5e6f7a8b9c0d3",
"batchConfiguration": "6801a2b3c4d5e6f7a8b9c0d4",
"client": "507f1f77bcf86cd799439013",
"name": "Colombia Onboarding — November",
"status": "cancelled",
"executor": "queue",
"source": "smart_batch",
"headlessRun": false,
"creditsSpent": 0.4,
"rows": [],
"totalRows": 25,
"completedRows": 10,
"failedRows": 0,
"partialRows": 0,
"startedAt": "2026-11-24T20:10:00.000Z",
"completedAt": "2026-11-24T20:25:00.000Z",
"createdAt": "2026-11-24T20:00:00.000Z",
"updatedAt": "2026-11-24T20:25:00.000Z"
}
}

참고​

  • 취소된 배치는 이전에 수집된 모든 행 결과를 보존하며, 나중에 Smart Batch 시작을 통해 다시 시작할 수 있습니다.
  • 처리를 일시적으로 중단하고 다시 시작하지 않은 채 나중에 계속하려면 Smart Batch 일시 중지를 사용하세요.

관련​