구성 배치 통계 조회
인증된 클라이언트 계정에서 특정 BatchConfiguration에 속한 모든 SmartBatch 레코드의 집계 실행 통계를 조회합니다. 응답은 배치 수, 행 완료 합계 및 "draft", "pending", "processing", "completed", "failed", "cancelled" 전반에 걸친 상태별 분류를 반환합니다.
구성 통계를 읽어도 검사가 실행되지 않으며 크레딧이 소비되지 않습니다.
엔드포인트
GET https://api.verifik.co/v2/smart-batches/stats/{configId}
클라이언트별 Authorization: Bearer <VERIFIK_JWT>를 사용하여 Smart-Agent 프록시(https://ai.verifik.co/v2/smart-batches/stats/{configId})를 통해서도 호출할 수 있습니다. 공유 x402 실행은 403 Forbidden으로 차단됩니다.
헤더
| 이름 | 값 | 설명 |
|---|---|---|
Content-Type | application/json | 요청 페이로드 형식. |
Authorization | Bearer <VERIFIK_JWT> | 클라이언트 범위 JWT (authUser.clientId). |
매개변수
| 이름 | 타입 | 필수 | 설명 |
|---|---|---|---|
configId | string | 예 | 배치 통계를 집계할 BatchConfiguration ObjectId. |
요청
- Node.js
- PHP
- Python
- Go
- cURL
import axios from "axios";
const run = async () => {
const configId = "6801a2b3c4d5e6f7a8b9c0d4";
const { data } = await axios.get(`https://api.verifik.co/v2/smart-batches/stats/${configId}`, {
headers: {
"Content-Type": "application/json",
Authorization: `Bearer ${process.env.VERIFIK_JWT}`,
},
});
console.log(data);
};
run();
<?php
$configId = "6801a2b3c4d5e6f7a8b9c0d4";
$ch = curl_init("https://api.verifik.co/v2/smart-batches/stats/" . $configId);
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
config_id = "6801a2b3c4d5e6f7a8b9c0d4"
url = f"https://api.verifik.co/v2/smart-batches/stats/{config_id}"
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() {
configID := "6801a2b3c4d5e6f7a8b9c0d4"
req, _ := http.NewRequest("GET", "https://api.verifik.co/v2/smart-batches/stats/"+configID, 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/stats/6801a2b3c4d5e6f7a8b9c0d4" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $VERIFIK_JWT"
응답
- 200 OK
- 401
- 403
- 409
- 422
{
"data": {
"totalBatches": 4,
"totalRows": 120,
"completedRows": 95,
"failedRows": 5,
"partialRows": 4,
"pendingRows": 16,
"statusBreakdown": {
"draft": 0,
"pending": 1,
"processing": 1,
"completed": 2,
"failed": 0,
"cancelled": 0
}
}
}
{
"message": "Unauthorized",
"code": "Unauthorized"
}
{
"message": "Shared x402 execution is forbidden on this endpoint",
"code": "Forbidden"
}
{
"message": "\"configId\" is required",
"code": "MissingParameter"
}
{
"message": "UnprocessableEntity",
"code": "UnprocessableEntity"
}
참고
- 통계는 인증된 클라이언트(JWT의
clientId) 범위로 제한됩니다. pendingRows는totalRows - completedRows - failedRows - partialRows로 계산됩니다.- 이 구성에 속한 개별 배치를 검사하려면 Smart Batch 목록에
batchConfiguration을 전달하세요.