Smart Batch 진행률 조회
전체 rows 배열을 전송하지 않고 SmartBatch의 경량 진행률 요약을 가져옵니다. 응답에는 행 카운터(totalRows, completedRows, failedRows, partialRows, pendingRows), 실행 타임스탬프, creditsSpent, 그리고 FeatureRunner 실행이 뒷받침되는 경우 중첩된 run 및 원장 spend 세부 정보가 포함됩니다.
서버 측 FeatureRunner 실행은 batchConfiguration.notification.webhookUrl이 구성된 경우 완료 시 smart_batch_batch_completed 웹훅 이벤트(runId 및 creditsSpent 포함)도 발생시킵니다. 이 엔드포인트를 폴링해도 크레딧이 소비되지 않습니다.
엔드포인트
GET https://api.verifik.co/v2/smart-batches/{id}/progress
클라이언트별 Authorization: Bearer <VERIFIK_JWT>를 사용하여 Smart-Agent 프록시(https://ai.verifik.co/v2/smart-batches/{id}/progress)를 통해서도 호출할 수 있습니다. 공유 x402 실행은 403 Forbidden으로 차단됩니다.
헤더
| 이름 | 값 | 설명 |
|---|---|---|
Content-Type | application/json | 요청 페이로드 형식. |
Authorization | Bearer <VERIFIK_JWT> | 클라이언트 범위 JWT (authUser.clientId). |
매개변수
| 이름 | 타입 | 필수 | 설명 |
|---|---|---|---|
id | string | 예 | 진행률을 폴링할 SmartBatch ObjectId. |
요청
- Node.js
- PHP
- Python
- Go
- cURL
import axios from "axios";
const run = async () => {
const batchId = "6801a2b3c4d5e6f7a8b9c0d3";
const { data } = await axios.get(`https://api.verifik.co/v2/smart-batches/${batchId}/progress`, {
headers: {
"Content-Type": "application/json",
Authorization: `Bearer ${process.env.VERIFIK_JWT}`,
},
});
console.log(data);
};
run();
<?php
$batchId = "6801a2b3c4d5e6f7a8b9c0d3";
$ch = curl_init("https://api.verifik.co/v2/smart-batches/" . $batchId . "/progress");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"Content-Type: application/json",
"Authorization: Bearer " . getenv("VERIFIK_JWT"),
]);
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}/progress"
headers = {
"Content-Type": "application/json",
"Authorization": f"Bearer {os.getenv('VERIFIK_JWT')}",
}
response = requests.get(url, headers=headers)
print(response.json())
package main
import (
"encoding/json"
"fmt"
"net/http"
"os"
)
func main() {
batchID := "6801a2b3c4d5e6f7a8b9c0d3"
req, _ := http.NewRequest("GET", "https://api.verifik.co/v2/smart-batches/"+batchID+"/progress", nil)
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 GET "https://api.verifik.co/v2/smart-batches/6801a2b3c4d5e6f7a8b9c0d3/progress" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $VERIFIK_JWT"
응답
- 200 OK (FeatureRunner 포함)
- 200 OK (run 미포함)
- 401
- 403
- 404
- 409
- 422
{
"data": {
"batchId": "6801a2b3c4d5e6f7a8b9c0d3",
"status": "processing",
"serverSide": true,
"totalRows": 25,
"completedRows": 12,
"failedRows": 1,
"partialRows": 2,
"pendingRows": 10,
"startedAt": "2026-11-24T20:10:00.000Z",
"creditsSpent": 1.6,
"run": {
"id": "6801a2b3c4d5e6f7a8b9c0e1",
"status": "processing",
"mergeStrategy": "sequential",
"totalItems": 25,
"completedItems": 12,
"failedItems": 1,
"partialItems": 2,
"startedAt": "2026-11-24T20:10:00.500Z",
"completedAt": null
},
"spend": {
"credits": 1.6,
"calls": 28,
"billableCalls": 24
}
}
}
{
"data": {
"batchId": "6801a2b3c4d5e6f7a8b9c0d3",
"status": "completed",
"serverSide": true,
"totalRows": 10,
"completedRows": 10,
"failedRows": 0,
"partialRows": 0,
"pendingRows": 0,
"startedAt": "2026-11-24T20:10:00.000Z",
"completedAt": "2026-11-24T20:12:30.000Z",
"creditsSpent": 0.4
}
}
{
"message": "Unauthorized",
"code": "Unauthorized"
}
{
"message": "Shared x402 execution is forbidden on this endpoint",
"code": "Forbidden"
}
{
"message": "batch_not_found",
"code": "NotFound"
}
{
"message": "\"id\" is required",
"code": "MissingParameter"
}
{
"message": "UnprocessableEntity",
"code": "UnprocessableEntity"
}
참고
run과spend는 배치에 연결된FeatureRunner실행이 있을 때 포함됩니다(참조된 실행 레코드가 반환되지 않으면run은null입니다).- 서버 측
FeatureRunner실행은batchConfiguration.notification.webhookUrl이 설정된 경우 완료 시smart_batch_batch_completed웹훅 이벤트(runId및creditsSpent포함)를 발생시킵니다. Smart Reports 웹훅을 참조하세요. - 배치가 종료 상태에 도달하면 Smart Batch 조회를 사용하여 행 수준의
results와errors를 확인하세요.