CertH API 레퍼런스 — 엔드포인트, 파라미터, 예시
CertH API 전체 레퍼런스: 스캔, 기록, 순위, 모니터링, 알림 엔드포인트와 인증, 제한, 오류 코드, curl 예시.
POST
/api/scan
도메인, 트렌드, 알림 모니터링: 없음
모든 도메인 즉시 스캔: 등급, 점수, 요인, 인증서 정보 반환. 스로틀링으로 저장.
curl -X POST https://certh.csr.plus/api/scan -H "Content-Type: application/json" -d '{"domain":"stripe.com"}'
GET
/api/public/domains/:domain/history
도메인, 트렌드, 알림 모니터링: 선택적 API 키
순위 도메인 점수 기록: 무료 45일, API 키로 추가 해제(Pro 90 / Agency 365).
curl "https://certh.csr.plus/api/public/domains/notion.so/history?days=90" -H "x-api-key: ch_xxx"
GET
/api/leaderboard
도메인, 트렌드, 알림 모니터링: 없음
글로벌 TLS 헬스 순위. page/pageSize/sort/grade/q 파라미터 지원.
curl "https://certh.csr.plus/api/leaderboard?page=1&pageSize=50&sort=score&grade=A%2B"
GET
/api/domain/:domain
도메인, 트렌드, 알림 모니터링: 없음
도메인의 최신 스캔 상태(latest_snapshot 단일 행).
curl https://certh.csr.plus/api/domain/stripe.com
GET
/api/plans
도메인, 트렌드, 알림 모니터링: 없음
플랜 목록(free/Pro/Agency 기능 경계).
curl https://certh.csr.plus/api/plans
GET
/api/me
도메인, 트렌드, 알림 모니터링: Session Cookie (OAuth) 或 ?api_key=
현재 사용자, 플랜, API 키.
curl -b cookie.txt https://certh.csr.plus/api/me
GET/POST/DELETE
/api/domains
도메인, 트렌드, 알림 모니터링: JWT
모니터링 도메인 관리(추가/목록/삭제, 추가 시 즉시 스캔 저장).
curl -X POST https://certh.csr.plus/api/domains -H "Authorization: Bearer <jwt>" -H "Content-Type: application/json" -d '{"domain":"example.com"}'
GET
/api/domains/:domain/history|events
도메인, 트렌드, 알림 모니터링: JWT
내 도메인의 비공개 기록 스냅샷과 변경 이벤트(알림, 로테이션 등).
curl "https://certh.csr.plus/api/domains/example.com/history?days=90" -H "Authorization: Bearer <jwt>"
POST
/api/ingest
도메인, 트렌드, 알림 모니터링: API Key
자체 서버 스캔 결과를 보고(상위 플랜) 동일한 모니터링 파이프라인에 통합.
curl -X POST https://certh.csr.plus/api/ingest -H "x-api-key: ch_xxx" -H "Content-Type: application/json" -d '{"domain":"example.com","result":{...}}'
GET
/api/discover
도메인, 트렌드, 알림 모니터링: JWT
CT 로그 발견(새 하위 도메인/인증서).
curl https://certh.csr.plus/api/discover -H "Authorization: Bearer <jwt>"
GET/POST/DELETE
/api/alert-rules
도메인, 트렌드, 알림 모니터링: JWT
알림 규칙 관리(등급 하락, 만료, 로테이션 등 알림).
curl -X POST https://certh.csr.plus/api/alert-rules -H "Authorization: Bearer <jwt>" -H "Content-Type: application/json" -d '{"domain":"example.com","type":"GRADE_CHANGE","target":"you@x.com"}'
속도 제한 및 데이터 정책
- 공개 쿼리는 저장됩니다: 새 도메인은 IP당 하루 20개, 동일 도메인은 1시간에 1개.
- 보존: 순위(system) 데이터 365일 이상 보존, 무료 API는 45일로 제한.
- 배지: 엣지 캐시 1시간(max-age=3600). URL에 쿼리를 추가하면 강제 새로고침.
- 오류 코드: 400 잘못된 파라미터 / 401 인증되지 않음 / 403 금지 또는 한도 / 404 데이터 없음 / 422 스캔 실패 / 429 속도 초과.
자주 묻는 질문
무료 사용자는 얼마나 많은 기록을 얻나요?
무료 사용자는 가입 없이 45일 기록을 얻습니다. Pro는 90일, Agency는 365일을 API 키로 잠금 해제.
API 키는 어디서 얻나요?
대시보드 로그인 시 ch_ 접두사 키가 자동 생성되며, x-api-key 헤더 또는 ?api_key 파라미터로 전송.
쿼리가 데이터베이스에 저장되나요?
공개 쿼리는 스로틀링으로 저장됩니다: 첫 스캔이 레코드를 생성하고, 반복 스캔은 기록을 추가(도메인당 시간당 1회).