{"timestamp":"2026-12-03T14:49:20.325480130","requestId":"03898368-75cf-492b-bf65-fcf8d868747a","status":200,"success":true,"message":"SGT Gateway API Discovery","data":{"endpoints":[{"authType":"Bearer JWT Token","authentication":"Required","description":"보안 자격 증명 조회 (세션키, 서버 공개키, 키 ID)","method":"POST","path":"/api/v1/security-credentials","requestExample":"{ \"clientPublicKey\": \"MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA...\" }","responseExample":"{ \"sessionKey\": \"AES256-SESSION-KEY\", \"serverPublicKey\": \"MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA...\", \"keyId\": \"v1.8f14e45f-ea2b-4c1d-9f3a-2b7c6d5e4a10.<sealed>\" }"},{"authType":"Bearer JWT Token","authentication":"Required","description":"사용자 JWT 토큰 생성","method":"POST","path":"/api/v1/user-credentials","requestExample":"{ \"userId\": \"testuser\" }","responseExample":"{ \"jwt\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\" }"},{"authType":"Bearer JWT Token (MANAGEMENT scope)","authentication":"Required","description":"JWT 토큰 만료 등록 (새 로그인 시 이전 토큰 무효화) — MANAGEMENT 스코프 필요 (#747). reason: NEW_LOGIN|LOGOUT|ADMIN_REVOKE (#1789)","method":"POST","path":"/api/v1/revoke-token","requestExample":"{ \"token\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\", \"reason\": \"NEW_LOGIN\" }","responseExample":"{ \"success\": true, \"message\": \"Token revoked successfully\" }"},{"authType":"Bearer JWT Token","authentication":"Required","description":"사용자별 토큰 사용량 조회 (Path Variable)","method":"GET","path":"/api/v1/users/{userName}/tokens","requestExample":"GET /api/v1/users/testuser/tokens","responseExample":"{ \"monthlyLimit\": 100000, \"usedToken\": 1500 }"},{"authType":"Bearer JWT Token","authentication":"Required","description":"사용자별 토큰 사용량 조회 (Query Parameter)","method":"GET","path":"/api/v1/users/tokens","requestExample":"GET /api/v1/users/tokens?userId=testuser","responseExample":"{ \"monthlyLimit\": 100000, \"usedToken\": 1500 }"},{"authType":"Bearer JWT Token (MONITORING scope)","authentication":"Required","description":"탐지 이벤트 목록 (최신순 페이징 · after 폴링) — MONITORING 스코프 필요 (#1226)","method":"GET","path":"/api/v1/monitoring/detections/events","requestExample":"GET /api/v1/monitoring/detections/events?from=2026-10-01T00:00:00Z&limit=200","responseExample":"{ \"data\": { \"events\": [...], \"next\": \"…\", \"latest\": \"…\", \"truncated\": false } }"},{"authType":"Bearer JWT Token (MONITORING scope)","authentication":"Required","description":"탐지 드릴다운 트리 (문서 → 위치 → 이벤트) — MONITORING 스코프 필요 (#1226)","method":"GET","path":"/api/v1/monitoring/detections","requestExample":"GET /api/v1/monitoring/detections?depth=3","responseExample":"{ \"data\": { \"documents\": [...], \"truncated\": false } }"},{"authType":"Bearer JWT Token (MONITORING scope)","authentication":"Required","description":"파일 탐지 비율 작업 생성 — 상태 GET …/jobs/{jobId}, CSV …/jobs/{jobId}/{summary,files}.csv. MONITORING 스코프 필요 (#1226)","method":"POST","path":"/api/v1/monitoring/detect-ratio/jobs","requestExample":"{ \"from\": \"2026-01-01T00:00:00Z\", \"to\": \"2026-10-01T00:00:00Z\" }","responseExample":"{ \"data\": { \"jobId\": \"…\", \"status\": \"RUNNING\" } }"},{"authType":"Bearer JWT Token (MONITORING scope)","authentication":"Required","description":"지표 카탈로그 평가 (Prometheus) — MONITORING 스코프 필요 (#1226)","method":"GET","path":"/api/v1/monitoring/metrics","requestExample":"GET /api/v1/monitoring/metrics?window=1h","responseExample":"{ \"data\": { \"items\": [ { \"key\": \"fail_open\", \"value\": \"0\", \"severity\": \"OK\" } ] } }"},{"authType":"Bearer JWT Token","authentication":"Required","description":"월별 토큰 사용량 캐시 초기화 및 Config 서버 동기화","method":"GET","path":"/api/v1/tokens/cache-reset","requestExample":"GET /api/v1/tokens/cache-reset","responseExample":"(empty response)"},{"authType":"Bearer JWT Token","authentication":"Required","description":"시간 윈도우 기반 토큰 제한 캐시 초기화","method":"GET","path":"/api/v1/token-window/cache-reset","requestExample":"GET /api/v1/token-window/cache-reset","responseExample":"(empty response)"},{"authType":"Bearer JWT Token","authentication":"Required","description":"필터 체인 정보 조회 (요청/응답 필터 순서, 활성화 상태)","method":"GET","path":"/api/v1/filters","requestExample":"GET /api/v1/filters","responseExample":"{ \"requestFilters\": [{ \"order\": 1, \"name\": \"FileHandleFilter\", \"enabled\": true }, ...], \"responseFilters\": [{ \"order\": 1, \"name\": \"TokenCalculatorFilter\", \"enabled\": true }, ...], \"summary\": { \"totalRequestFilters\": 9, \"enabledRequestFilters\": 9, \"totalResponseFilters\": 9, \"enabledResponseFilters\": 9 } }"},{"authType":"Bearer JWT Token","authentication":"Required","description":"개인정보 검출 및 마스킹 (이름, 전화번호, 이메일, 주민번호 등)","method":"POST","path":"/api/v1/detect/pii","requestExample":"{ \"message\": \"안녕하세요, 제 이름은 홍길동이고 전화번호는 010-1234-5678입니다.\" }","responseExample":"{ \"originalText\": \"제 전화번호는 010-1234-5678입니다.\", \"maskedText\": \"제 전화번호는 010-1234-****입니다.\", \"detectedPii\": [{ \"entityType\": \"KR_PHONE\", \"originalText\": \"010-1234-5678\", \"maskedText\": \"010-1234-****\", \"maskOperation\": \"mask\", \"confidence\": 1.0, \"start\": 8, \"end\": 21, \"originalStart\": 8, \"originalEnd\": 21 }] }"},{"authType":"Bearer JWT Token","authentication":"Required","description":"유해 콘텐츠 검출 (기본 모델: hate · harassment · sexual · violence_crime)","method":"POST","path":"/api/v1/detect/toxic","requestExample":"{ \"message\": \"검사할 메시지 내용\" }","responseExample":"{ \"predictions\": [{ \"predict\": \"harassment\", \"confidence\": 0.91 }] } (임계값을 넘은 범주만 담기며 빈 배열이면 탐지 없음, isSafe 필드는 없음)"},{"authType":"Bearer JWT Token","authentication":"Required","description":"AI 탈옥 시도 검출 (프롬프트 인젝션 방지)","method":"POST","path":"/api/v1/detect/jailbreak","requestExample":"{ \"message\": \"검사할 프롬프트 내용\" }","responseExample":"{ \"isSafe\": false, \"riskScore\": 0.91, \"riskType\": \"A1\", \"detectionTimeMs\": 42.7 } (안전이면 riskType 없음)"},{"authType":"Bearer JWT Token","authentication":"Required","description":"금지어 검출 (사전 정의된 금지 키워드 탐지)","method":"POST","path":"/api/v1/detect/banword","requestExample":"{ \"message\": \"검사할 메시지 내용\" }","responseExample":"{ \"isSafe\": false, \"riskScore\": 1.0, \"detectedWords\": [\"금지어A\"] } (탐지가 없으면 isSafe true, detectedWords 생략 가능)"},{"authType":"Bearer JWT Token","authentication":"Required","description":"통합 콘텐츠 보안 검사 (PII·Toxic·Jailbreak·Banword 병렬 탐지)","method":"POST","path":"/api/v1/detect/batch","requestExample":"{ \"message\": \"검사할 메시지 내용\", \"checks\": [\"pii\", \"toxic\", \"jailbreak\", \"banword\"] }","responseExample":"{ \"pii\": { \"originalText\": \"...\", \"maskedText\": \"...\", \"detectedPii\": [] }, \"toxic\": { \"predictions\": [] }, \"jailbreak\": { \"isSafe\": true, \"riskScore\": 0.0 }, \"banword\": { \"isSafe\": true, \"riskScore\": 0.0 }, \"summary\": { \"isSafe\": true, \"violations\": [] } } (checks 로 일부만 수행하면 나머지는 null)"}],"notes":{"publicPaths":"/, /resources/** 경로는 인증 없이 접근 가능합니다","rateLimit":"사용자 티어(BASIC/PREMIUM/ENTERPRISE)에 따라 요청 및 토큰 제한이 적용됩니다","filters":"개인정보보호, 유해콘텐츠 검열, 파일 스캔 등의 필터가 자동 적용됩니다","security":"모든 데이터는 암호화되어 전송되며 다중 보안 필터를 통과합니다","protectedPaths":"/api/v1/ 로 시작하는 모든 경로는 JWT 인증이 필요합니다","authentication":"JWT 토큰은 Authorization 헤더에 'Bearer {token}' 형식으로 전송해야 합니다"},"resources":[{"authentication":"None","contentType":"application/javascript","description":"SGT 클라이언트 SDK 라이브러리 - 암호화 통신 및 API 호출 지원","path":"/resources/client.sdk.min.js","type":"JavaScript SDK","usage":"<script src=\"/resources/client.sdk.min.js\"></script>"}],"serviceName":"SGT Gateway","timestamp":"2026-12-03T14:49:20.325469450","version":"1.0.0"},"error":null}