{"openapi":"3.1.0","info":{"title":"Certificate Exam Info API","description":"\n证书考试资讯聚合 API v1.0.0。数据来自教育部清单、官方考试网站与图文存档，\n所有排期记录经审核后才对公众发布。\n\n## 鉴权\n\n除 `/health` 与 `/api/v1/health` 外，所有接口需要 API Key：\n\n- 请求头 `X-API-Key: <key>`（推荐）\n- 或 `Authorization: Bearer <key>`\n- 或查询参数 `?api_key=<key>`（不推荐，可能进入日志）\n\nscope：`read` 可访问全部 GET；`admin` 额外可访问审核写接口。\n当前配置：`REQUIRE_API_KEY=true`。\n\n## 统一响应\n\n所有接口返回 `code / data / meta / message`。`code=0` 成功；非 0 时 `data=null`。\n\n## 推荐入口：整合目录\n\n调用端优先使用 `GET /api/v1/exams/catalog`，一次请求即可拿到分类统计、\n全部在考考试（含报名/考试时间描述、报考条件、报名方式、考试科目、官方链接校验结果）、\n内联已审核排期、已停考清单与数据来源，无需多次调用。\n\n## 限流\n\n每 60 秒最多 120 次请求，响应头包含\n`X-RateLimit-Limit / Remaining / Reset`，超限返回 HTTP 429 与 `code=42901`。\n\n## 缓存\n\nGET 响应带 ETag，支持 `If-None-Match` 条件请求；未变更时返回 HTTP 304。\n","contact":{"name":"考证资讯 API 平台"},"license":{"name":"Internal Use"},"version":"1.0.0"},"paths":{"/api/v1/certificates":{"get":{"tags":["certificates"],"summary":"List Certificates","operationId":"list_certificates_api_v1_certificates_get","parameters":[{"name":"category","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"}},{"name":"category_l1","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category L1"}},{"name":"lifecycle","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lifecycle"}},{"name":"exam_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Exam Type"}},{"name":"grade","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Grade"}},{"name":"batch","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Batch"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Q"}},{"name":"include_archived","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Archived"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Size"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CertificateListEnvelope"}}}},"401":{"description":"缺失或无效 API Key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"scope 不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"资源不存在","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"参数校验失败","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"触发限流","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"ApiKeyAuth":[]}]}},"/api/v1/certificates/{certificate_id}":{"get":{"tags":["certificates"],"summary":"Get Certificate","operationId":"get_certificate_api_v1_certificates__certificate_id__get","parameters":[{"name":"certificate_id","in":"path","required":true,"schema":{"type":"integer","title":"Certificate Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CertificateEnvelope"}}}},"401":{"description":"缺失或无效 API Key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"scope 不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"资源不存在","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"参数校验失败","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"触发限流","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"ApiKeyAuth":[]}]}},"/api/v1/certificates/{certificate_id}/profile":{"get":{"tags":["certificates"],"summary":"Get Profile","operationId":"get_profile_api_v1_certificates__certificate_id__profile_get","parameters":[{"name":"certificate_id","in":"path","required":true,"schema":{"type":"integer","title":"Certificate Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"401":{"description":"缺失或无效 API Key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"scope 不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"资源不存在","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"参数校验失败","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"触发限流","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"ApiKeyAuth":[]}]}},"/api/v1/exams/catalog":{"get":{"tags":["catalog"],"summary":"Exam Catalog","operationId":"exam_catalog_api_v1_exams_catalog_get","parameters":[{"name":"category_l1","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"一级分类精确匹配","title":"Category L1"},"description":"一级分类精确匹配"},{"name":"lifecycle","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"存续状态：在考/社会化认定/已停考/已取消","title":"Lifecycle"},"description":"存续状态：在考/社会化认定/已停考/已取消"},{"name":"exam_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"考试性质：证书类/学历类/学位类/招录类等","title":"Exam Type"},"description":"考试性质：证书类/学历类/学位类/招录类等"},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"关键词，匹配名称、别名、简介、报考条件","title":"Q"},"description":"关键词，匹配名称、别名、简介、报考条件"},{"name":"month","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":12,"minimum":1},{"type":"null"}],"description":"开考月份筛选","title":"Month"},"description":"开考月份筛选"},{"name":"grade","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"数据等级 A/B/C","title":"Grade"},"description":"数据等级 A/B/C"},{"name":"include_archived","in":"query","required":false,"schema":{"type":"boolean","description":"是否在 items 中同时返回已停考/已取消条目","default":false,"title":"Include Archived"},"description":"是否在 items 中同时返回已停考/已取消条目"},{"name":"with_schedules","in":"query","required":false,"schema":{"type":"boolean","description":"是否内联返回已审核排期","default":true,"title":"With Schedules"},"description":"是否内联返回已审核排期"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"401":{"description":"缺失或无效 API Key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"scope 不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"资源不存在","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"参数校验失败","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"触发限流","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"ApiKeyAuth":[]}]}},"/api/v1/certificates/{certificate_id}/schedules":{"get":{"tags":["schedules"],"summary":"Certificate Schedules","operationId":"certificate_schedules_api_v1_certificates__certificate_id__schedules_get","parameters":[{"name":"certificate_id","in":"path","required":true,"schema":{"type":"integer","title":"Certificate Id"}},{"name":"year","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Year"}},{"name":"include_pending","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Pending"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduleListEnvelope"}}}},"401":{"description":"缺失或无效 API Key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"scope 不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"资源不存在","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"参数校验失败","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"触发限流","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"ApiKeyAuth":[]}]}},"/api/v1/certificates/{certificate_id}/announcements":{"get":{"tags":["schedules"],"summary":"Certificate Announcements","operationId":"certificate_announcements_api_v1_certificates__certificate_id__announcements_get","parameters":[{"name":"certificate_id","in":"path","required":true,"schema":{"type":"integer","title":"Certificate Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"401":{"description":"缺失或无效 API Key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"scope 不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"资源不存在","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"参数校验失败","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"触发限流","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"ApiKeyAuth":[]}]}},"/api/v1/schedules/upcoming":{"get":{"tags":["schedules"],"summary":"Upcoming","operationId":"upcoming_api_v1_schedules_upcoming_get","parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":365,"minimum":1,"default":90,"title":"Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduleListEnvelope"}}}},"401":{"description":"缺失或无效 API Key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"scope 不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"资源不存在","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"参数校验失败","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"触发限流","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"ApiKeyAuth":[]}]}},"/api/v1/article-entries":{"get":{"tags":["article-entries"],"summary":"List Entries","operationId":"list_entries_api_v1_article_entries_get","parameters":[{"name":"source_key","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Key"}},{"name":"review_status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Review Status"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Q"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Size"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArticleListEnvelope"}}}},"401":{"description":"缺失或无效 API Key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"scope 不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"资源不存在","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"参数校验失败","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"触发限流","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"ApiKeyAuth":[]}]}},"/api/v1/article-entries/{entry_id}":{"get":{"tags":["article-entries"],"summary":"Get Entry","operationId":"get_entry_api_v1_article_entries__entry_id__get","parameters":[{"name":"entry_id","in":"path","required":true,"schema":{"type":"integer","title":"Entry Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"401":{"description":"缺失或无效 API Key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"scope 不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"资源不存在","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"参数校验失败","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"触发限流","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"ApiKeyAuth":[]}]}},"/api/v1/search":{"get":{"tags":["search"],"summary":"Search","operationId":"search_api_v1_search_get","parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":100,"description":"证书名称、别名或分类关键词","title":"Q"},"description":"证书名称、别名或分类关键词"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Size"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"401":{"description":"缺失或无效 API Key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"scope 不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"资源不存在","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"参数校验失败","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"触发限流","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"ApiKeyAuth":[]}]}},"/api/v1/review/schedules":{"get":{"tags":["review"],"summary":"Pending Schedules","operationId":"pending_schedules_api_v1_review_schedules_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduleListEnvelope"}}}},"401":{"description":"缺失或无效 API Key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"scope 不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"资源不存在","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"参数校验失败","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"触发限流","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"ApiKeyAuth":[]}]}},"/api/v1/review/schedules/{schedule_id}/approve":{"post":{"tags":["review"],"summary":"Approve Schedule","operationId":"approve_schedule_api_v1_review_schedules__schedule_id__approve_post","parameters":[{"name":"schedule_id","in":"path","required":true,"schema":{"type":"integer","title":"Schedule Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduleEnvelope"}}}},"401":{"description":"缺失或无效 API Key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"scope 不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"资源不存在","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"参数校验失败","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"触发限流","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"ApiKeyAuth":[]}]}},"/api/v1/review/schedules/{schedule_id}/reject":{"post":{"tags":["review"],"summary":"Reject Schedule","operationId":"reject_schedule_api_v1_review_schedules__schedule_id__reject_post","parameters":[{"name":"schedule_id","in":"path","required":true,"schema":{"type":"integer","title":"Schedule Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduleEnvelope"}}}},"401":{"description":"缺失或无效 API Key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"scope 不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"资源不存在","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"参数校验失败","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"触发限流","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"ApiKeyAuth":[]}]}},"/api/v1/monitor/overview":{"get":{"tags":["monitor"],"summary":"Overview","description":"监控总览：最新快照、当前告警、阈值配置。","operationId":"overview_api_v1_monitor_overview_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"401":{"description":"缺失或无效 API Key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"scope 不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"资源不存在","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"参数校验失败","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"触发限流","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"ApiKeyAuth":[]}]}},"/api/v1/monitor/collect":{"post":{"tags":["monitor"],"summary":"Collect Now","description":"手动触发一次监控采集与告警判定。","operationId":"collect_now_api_v1_monitor_collect_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"401":{"description":"缺失或无效 API Key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"scope 不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"资源不存在","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"参数校验失败","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"触发限流","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"ApiKeyAuth":[]}]}},"/api/v1/monitor/snapshots":{"get":{"tags":["monitor"],"summary":"Snapshots","operationId":"snapshots_api_v1_monitor_snapshots_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":24,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"401":{"description":"缺失或无效 API Key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"scope 不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"资源不存在","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"参数校验失败","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"触发限流","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"ApiKeyAuth":[]}]}},"/api/v1/monitor/alerts":{"get":{"tags":["monitor"],"summary":"Alerts","operationId":"alerts_api_v1_monitor_alerts_get","parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"401":{"description":"缺失或无效 API Key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"scope 不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"资源不存在","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"参数校验失败","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"触发限流","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"ApiKeyAuth":[]}]}},"/api/v1/monitor/scrape-logs":{"get":{"tags":["monitor"],"summary":"Scrape Logs","operationId":"scrape_logs_api_v1_monitor_scrape_logs_get","parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"401":{"description":"缺失或无效 API Key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"scope 不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"资源不存在","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"参数校验失败","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"触发限流","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"ApiKeyAuth":[]}]}},"/api/v1/monitor/freshness":{"get":{"tags":["monitor"],"summary":"Freshness","description":"数据新鲜度：各类数据源最后更新时间与过期数量。","operationId":"freshness_api_v1_monitor_freshness_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"401":{"description":"缺失或无效 API Key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"scope 不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"资源不存在","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"参数校验失败","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"触发限流","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"ApiKeyAuth":[]}]}},"/api/v1/health":{"get":{"tags":["health"],"summary":"Api Health","operationId":"api_health_api_v1_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}}}}},"/api/v1/meta/categories":{"get":{"tags":["meta"],"summary":"Categories","operationId":"categories_api_v1_meta_categories_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}}},"security":[{"ApiKeyAuth":[]}]}},"/api/v1/meta/stats":{"get":{"tags":["meta"],"summary":"Stats","operationId":"stats_api_v1_meta_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}}},"security":[{"ApiKeyAuth":[]}]}}},"components":{"schemas":{"ArticleEntryOut":{"properties":{"id":{"type":"integer","title":"Id"},"source_key":{"type":"string","title":"Source Key"},"row_no":{"type":"integer","title":"Row No"},"image_path":{"type":"string","title":"Image Path","default":""},"name":{"type":"string","title":"Name"},"registration_time":{"type":"string","title":"Registration Time","default":""},"exam_time":{"type":"string","title":"Exam Time","default":""},"requirements":{"type":"string","title":"Requirements","default":""},"registration_method":{"type":"string","title":"Registration Method","default":""},"confidence":{"type":"number","title":"Confidence","default":0.0},"review_status":{"type":"string","title":"Review Status","default":""},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["id","source_key","row_no","name"],"title":"ArticleEntryOut","description":"图文 OCR 条目。详情接口额外包含 raw_text。"},"ArticleListEnvelope":{"properties":{"code":{"type":"integer","title":"Code","default":0},"data":{"$ref":"#/components/schemas/PagedData_ArticleEntryOut_"},"meta":{"$ref":"#/components/schemas/SourceMeta"},"message":{"type":"string","title":"Message","default":""}},"type":"object","required":["data"],"title":"ArticleListEnvelope","example":{"code":0,"data":[],"message":"","meta":{"review_status":"","source":"","source_url":""}}},"CertificateEnvelope":{"properties":{"code":{"type":"integer","title":"Code","default":0},"data":{"$ref":"#/components/schemas/CertificateOut"},"meta":{"$ref":"#/components/schemas/SourceMeta"},"message":{"type":"string","title":"Message","default":""}},"type":"object","required":["data"],"title":"CertificateEnvelope","example":{"code":0,"data":[],"message":"","meta":{"review_status":"","source":"","source_url":""}}},"CertificateListEnvelope":{"properties":{"code":{"type":"integer","title":"Code","default":0},"data":{"$ref":"#/components/schemas/PagedData_CertificateOut_"},"meta":{"$ref":"#/components/schemas/SourceMeta"},"message":{"type":"string","title":"Message","default":""}},"type":"object","required":["data"],"title":"CertificateListEnvelope","example":{"code":0,"data":[],"message":"","meta":{"review_status":"","source":"","source_url":""}}},"CertificateOut":{"properties":{"id":{"type":"integer","title":"Id"},"source_no":{"type":"string","title":"Source No"},"name":{"type":"string","title":"Name"},"aliases":{"items":{},"type":"array","title":"Aliases","default":[]},"category":{"type":"string","title":"Category"},"category_l1":{"type":"string","title":"Category L1","default":""},"exam_type":{"type":"string","title":"Exam Type","default":""},"lifecycle_status":{"type":"string","title":"Lifecycle Status","default":""},"data_grade":{"type":"string","title":"Data Grade"},"national_scope":{"type":"string","title":"National Scope"},"batch":{"type":"string","title":"Batch"},"official_site_url":{"type":"string","title":"Official Site Url"},"registration_site_url":{"type":"string","title":"Registration Site Url"},"registration_window":{"type":"string","title":"Registration Window","default":""},"exam_window":{"type":"string","title":"Exam Window","default":""},"exam_months":{"items":{},"type":"array","title":"Exam Months","default":[]},"eligibility":{"type":"string","title":"Eligibility","default":""},"registration_channel":{"type":"string","title":"Registration Channel","default":""},"intro":{"type":"string","title":"Intro","default":""},"exam_subjects":{"type":"string","title":"Exam Subjects","default":""},"risk_note":{"type":"string","title":"Risk Note"},"notes":{"type":"string","title":"Notes"},"data_source":{"type":"string","title":"Data Source","default":""},"official_link_status":{"type":"string","title":"Official Link Status","default":""},"official_link_checked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Official Link Checked At"},"official_link_note":{"type":"string","title":"Official Link Note","default":""},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","source_no","name","category","data_grade","national_scope","batch","official_site_url","registration_site_url","risk_note","notes","created_at","updated_at"],"title":"CertificateOut"},"Envelope":{"properties":{"code":{"type":"integer","title":"Code","default":0},"data":{"title":"Data"},"meta":{"$ref":"#/components/schemas/SourceMeta"},"message":{"type":"string","title":"Message","default":""}},"type":"object","title":"Envelope","description":"所有 API 的统一响应封装。\n\ncode=0 表示成功；非 0 表示业务或系统错误，此时 data 为 null，message 给出说明。","example":{"code":0,"data":[],"message":"","meta":{"review_status":"","source":"","source_url":""}}},"ErrorEnvelope":{"properties":{"code":{"type":"integer","title":"Code"},"data":{"type":"null","title":"Data"},"meta":{"$ref":"#/components/schemas/SourceMeta"},"message":{"type":"string","title":"Message"}},"type":"object","required":["code","message"],"title":"ErrorEnvelope","description":"错误响应，HTTP 状态码与 code 同时给出，便于前端统一处理。","example":{"code":40101,"message":"Invalid or missing API key","meta":{"review_status":"error","source":"api"}}},"PagedData_ArticleEntryOut_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ArticleEntryOut"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","title":"Page"},"size":{"type":"integer","title":"Size"}},"type":"object","required":["items","total","page","size"],"title":"PagedData[ArticleEntryOut]"},"PagedData_CertificateOut_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/CertificateOut"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","title":"Page"},"size":{"type":"integer","title":"Size"}},"type":"object","required":["items","total","page","size"],"title":"PagedData[CertificateOut]"},"ScheduleEnvelope":{"properties":{"code":{"type":"integer","title":"Code","default":0},"data":{"$ref":"#/components/schemas/ScheduleOut"},"meta":{"$ref":"#/components/schemas/SourceMeta"},"message":{"type":"string","title":"Message","default":""}},"type":"object","required":["data"],"title":"ScheduleEnvelope","example":{"code":0,"data":[],"message":"","meta":{"review_status":"","source":"","source_url":""}}},"ScheduleListEnvelope":{"properties":{"code":{"type":"integer","title":"Code","default":0},"data":{"items":{"$ref":"#/components/schemas/ScheduleOut"},"type":"array","title":"Data"},"meta":{"$ref":"#/components/schemas/SourceMeta"},"message":{"type":"string","title":"Message","default":""}},"type":"object","required":["data"],"title":"ScheduleListEnvelope","example":{"code":0,"data":[],"message":"","meta":{"review_status":"","source":"","source_url":""}}},"ScheduleOut":{"properties":{"id":{"type":"integer","title":"Id"},"certificate_id":{"type":"integer","title":"Certificate Id"},"year":{"type":"integer","title":"Year"},"region":{"type":"string","title":"Region","default":""},"registration_start":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Registration Start"},"registration_end":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Registration End"},"exam_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Exam Date"},"phases":{"additionalProperties":true,"type":"object","title":"Phases"},"announcement_url":{"type":"string","title":"Announcement Url","default":""},"confidence":{"type":"number","title":"Confidence","default":0.0},"review_status":{"type":"string","title":"Review Status","default":""},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["id","certificate_id","year"],"title":"ScheduleOut","description":"排期记录。报名/考试时间为 ISO 日期字符串或 null。"},"SourceMeta":{"properties":{"source":{"type":"string","title":"Source","default":""},"source_url":{"type":"string","title":"Source Url","default":""},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"confidence":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Confidence"},"review_status":{"type":"string","title":"Review Status","default":""}},"type":"object","title":"SourceMeta","example":{"confidence":0.95,"review_status":"approved","source":"官网适配器","source_url":"http://www.cpta.com.cn/examNotice/2175.html","updated_at":"2026-11-26T08:00:00+08:00"}}},"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-API-Key","description":"read scope 用于全部 GET；admin scope 额外用于审核写接口。"}}},"tags":[{"name":"certificates","description":"证书基础档案与聚合档案"},{"name":"catalog","description":"整合型考试目录（一次调用返回全部考试与统计）"},{"name":"schedules","description":"考试排期、公告与近期考试"},{"name":"article-entries","description":"图文来源 OCR 条目"},{"name":"search","description":"关键词检索证书"},{"name":"review","description":"人工审核队列（需 admin scope）"},{"name":"monitor","description":"监控看板与告警（需 admin scope）"},{"name":"meta","description":"分类与统计元数据"},{"name":"health","description":"健康检查"}]}