| /api/v1/events/ | GET | 可选 | 事件列表,支持分页和疾病、国家、地点、日期、风险等级等筛选。 | items、total、page、page_size |
| /api/v1/events/{event_id}/ | GET | 可选 | 按数字 ID 或 event_uid 获取单条事件和来源证据链。 | event、sources、versions |
| /api/v1/filter-options/ | GET | 可选 | 返回疾病、国家、风险等级、状态和来源候选项。 | filters |
| /api/v1/countries/{country_code}/risk/ | GET | 可选 | 国家风险摘要与相关事件。 | country、risk_events |
| /api/v1/diseases/{disease_slug}/events/ | GET | 可选 | 疾病维度事件列表。 | disease、events |
| /api/v1/auth/register/ | POST | 无需 Key | 自助创建本地用户、trial 组织和 owner 成员关系;组织 slug 自动去重,创建动作写入 `organization_create` 审计日志。 | user、organization、membership |
| /api/v1/auth/password-reset/request/ | POST | 无需 Key | 按邮箱请求密码重置邮件;有效邮箱会收到 uid/token,响应保持 generic accepted,避免暴露账号是否存在。 | status |
| /api/v1/auth/password-reset/confirm/ | POST | uid/token | 使用密码重置邮件中的 uid/token 设置新密码;token 无效或过期时拒绝。 | status、user |
| /api/v1/customer-portal/context/ | GET | Django session | 查看自己的 active 组织、可切换组织和本人已有 API Key 前缀/权限。 | user、organizations、active_organization、api_keys |
| /api/v1/customer-portal/usage/ | GET | Django session | 查看当前组织当月 API 用量、导出额度和资源摘要。 | organization、api_usage、exports、resources |
| /api/v1/customer-portal/billing/summary/ | GET | Django session | 查看当前组织套餐、账单邮箱、手工合同状态、provider_adapters 支付/发票配置状态、月度用量、额度和最近账单请求工单;写操作仍需组织 API Key。 | organization、billing、quotas、month_to_date |
| /api/v1/customer-portal/members/ | GET | Django session | 查看当前组织成员和邀请只读清单,支持 status、page 和 page_size。 | items、total、page、page_size |
| /api/v1/customer-portal/data-exports/ | GET | Django session | 查看当前组织导出任务只读清单,支持 status、page 和 page_size。 | items、total、page、page_size |
| /api/v1/customer-portal/audit-logs/ | GET | Django session | 查看当前组织审计日志只读清单,支持 q、action、target_type、target_uid、actor、created_from、created_to、page 和 page_size。 | items、total、page、page_size、retention |
| /api/v1/customer-portal/notifications/ | GET | Django session | 查看当前组织通知收件箱清单,支持 q、status、alert_type、channel、read_state、archive_state、visibility_state、error_state、retry_state、page 和 page_size。 | items、total、page、page_size、summary |
| /api/v1/customer-portal/notifications/{delivery_uid}/read/ | POST | Django session | 把当前组织单条通知标记已读;回执只写入既有 AlertDelivery.payload.organization_inbox。 | notification、already_read |
| /api/v1/customer-portal/notifications/{delivery_uid}/archive/ | POST | Django session | 归档或恢复当前组织单条通知;回执只写入既有 AlertDelivery.payload.organization_inbox。 | notification、archived、changed |
| /api/v1/customer-portal/notifications/{delivery_uid}/hide/ | POST | Django session | 隐藏或恢复显示当前组织单条通知;隐藏只影响组织收件箱默认列表。 | notification、hidden、changed |
| /api/v1/customer-portal/notifications/{delivery_uid}/retry/ | POST | Django session | 立即重试当前组织 pending 或 failed 单条通知;复用既有 AlertDelivery 重试与邮件发送路径。 | sent、notification |
| /api/v1/customer-portal/notifications/bulk/ | POST | Django session | 对当前组织通知批量处理;action 支持 `mark_read`、`archive`、`restore`、`hide`、`unhide` 和 `retry`,最多 100 条。 | changed_count、sent_count、failed_count、skipped_count、notifications、summary |
| /api/v1/customer-portal/notifications/saved-views/ | GET / POST | Django session | 列出或保存当前组织通知筛选视图;保存 q、status、alert_type、channel、read_state、archive_state、visibility_state、error_state、retry_state、默认视图和共享标记。 | items / saved_view |
| /api/v1/customer-portal/notifications/saved-views/{view_uid}/ | GET / PATCH / DELETE | Django session | 查看、更新或软删除当前组织通知保存视图;PATCH 可调整筛选、启用状态、默认视图和共享标记。 | saved_view / deleted |
| /api/v1/customer-portal/api-keys/ | GET / POST | Django session | GET 查看当前组织全部 API Key 前缀、owner、状态、scope 和额度元数据;POST 为当前组织签发客户后台 API Key,raw_api_key 仅在创建响应中一次性返回,后续清单与 context 只显示前缀。 | items / api_key、raw_api_key |
| /api/v1/customer-portal/api-keys/{key_uid}/scopes/ | PATCH | Django session | 更新当前组织下 active 客户后台 API Key 的 scope;只能从客户后台允许的 scope 白名单中选择,写入 `organization_api_key_scope_update` 审计。 | api_key、changed、allowed_scopes |
| /api/v1/customer-portal/api-keys/{key_uid}/rotate/ | POST | Django session | 轮换当前组织下的 active 客户后台 API Key;新 raw key 只在轮换响应中一次性返回,旧 raw key 立即失效,写入 `organization_api_key_rotate` 审计。 | api_key、raw_api_key |
| /api/v1/customer-portal/api-keys/{key_uid}/disable/ | POST | Django session | 停用当前组织下的客户后台 API Key;停用后 API 鉴权拒绝该 Key,写入 `organization_api_key_disable` 审计。 | api_key、changed |
| /api/v1/organization/usage/ | GET | 必需 | 查看当月 API 用量、导出额度和资源摘要。 | organization、api_usage、exports、resources |
| /api/v1/organization/billing/summary/ | GET | 必需 | 查看套餐、账单邮箱、手工合同状态、provider_adapters 支付/发票配置状态、月度用量、额度和最近账单请求工单。 | organization、billing、quotas、month_to_date |
| /api/v1/organization/billing/notification-preferences/ | GET / PATCH | 必需 | 返回组织账单请求客户通知和负责人提醒偏好;PATCH 可保存 `customer_notifications_enabled`、`assignee_notifications_enabled` 和抑制原因,并以 `organization_billing_notification_preferences_update` 写入专用组织审计日志;状态变更、负责人提醒和 SLA 违约扫描都会读取这些偏好。 | notification_preferences |
| /api/v1/organization/notifications/ | GET | 必需 | 查看同组织 AlertDelivery 通知收件箱,支持 q、status、alert_type、channel、read_state、archive_state、visibility_state、error_state、retry_state、page 和 page_size;默认只显示 visible,visibility_state=hidden/all 可查看隐藏项,error_state=with_error/without_error 可按最近错误字段排查投递,retry_state=retryable/waiting_retry/exhausted/not_failed 可按既有重试字段排查失败队列;q 可匹配主题、正文预览、收件人、错误、规则名、audit/billing/event UID 和 payload 关键字段;summary 返回状态分布、unread_count、read_count、archived_count、active_count、hidden_count、visible_count、with_error_count、without_error_count、by_retry_state、retryable_count、waiting_retry_count、exhausted_retry_count 和 not_failed_retry_count。 | items、summary、filters |
| /api/v1/organization/notifications/summary/ | GET | 必需 | 按同一组 q、status、alert_type、channel、read_state、archive_state、visibility_state、error_state 和 retry_state 只读获取通知汇总;响应不返回 items,便于客户后台独立刷新计数。 | summary、total、filters |
| /api/v1/organization/notifications/bulk/ | POST | 必需 | 对同组织通知做当前页或指定 UID 批量处理;action 支持 `mark_read`、`archive`、`restore`、`hide`、`unhide` 和 `retry`,最多 100 条;重试只会立即发送 pending/failed 投递,sent/skipped 计入 skipped_count,其余动作只写入 `AlertDelivery.payload.organization_inbox`。 | changed_count、sent_count、failed_count、skipped_count、notifications、summary |
| /api/v1/organization/notifications/saved-views/ | GET / POST | 必需 | 列出/保存通知收件箱筛选视图;保存 q、status、alert_type、channel、read_state、archive_state、visibility_state、error_state、retry_state、默认视图和共享标记;默认视图在列表中优先返回,客户后台首次加载且当前筛选为空时会自动套用。 | items / saved_view |
| /api/v1/organization/notifications/saved-views/{view_uid}/ | GET / PATCH / DELETE | 必需 | 查看、更新或删除同组织通知保存视图;可调整筛选、启用状态、默认视图和共享标记。 | saved_view / deleted |
| /api/v1/organization/notifications/{delivery_uid}/ | GET | 必需 | 查看同组织单条通知详情,返回完整 body、payload、重试字段和 provider message id。 | notification |
| /api/v1/organization/notifications/{delivery_uid}/read/ | POST | 必需 | 把同组织单条通知标记已读;已读回执仅写入 `AlertDelivery.payload.organization_inbox`。 | notification、already_read |
| /api/v1/organization/notifications/{delivery_uid}/archive/ | POST | 必需 | 归档或恢复同组织单条通知;归档回执仅写入 `AlertDelivery.payload.organization_inbox`。 | notification、archived、changed |
| /api/v1/organization/notifications/{delivery_uid}/hide/ | POST | 必需 | 隐藏或恢复显示同组织单条通知;隐藏只影响组织收件箱默认列表。 | notification、hidden、changed |
| /api/v1/organization/notifications/{delivery_uid}/retry/ | POST | 必需 | 立即重试同组织 pending 或 failed 通知;复用现有邮件发送器,非 email 渠道仍会按 provider 未实现状态失败。 | sent、notification |
| /api/v1/organization/billing/requests/ | GET / POST | 必需 | GET 返回同组织账单请求队列,支持 status、assigned_to=me/unassigned、overdue、task_status、task_priority、task_owner=me/unassigned、task_overdue、page 和 page_size,并返回 open/overdue/unassigned/assigned-to-me SLA 摘要;POST 提交账单请求工单,记录状态、SLA 截止时间和专用组织审计日志;默认仍是手工合同,配置 `EPIC_BILLING_PAYMENT_PROVIDER=hosted_checkout` 和 `EPIC_BILLING_PAYMENT_CHECKOUT_URL_TEMPLATE` 后,套餐调整请求返回 `provider_handoff.payment.handoff_url`,配置 `EPIC_BILLING_INVOICE_PROVIDER=hosted_invoice` 和 `EPIC_BILLING_INVOICE_REQUEST_URL_TEMPLATE` 后,发票请求返回 `provider_handoff.invoice.handoff_url`。 | items / billing_request |
| /api/v1/organization/billing/requests/{request_uid}/ | PATCH | 必需 | 更新同组织账单请求状态、状态备注或负责人;assigned_to 支持 me/unassigned,变更以 `organization_billing_request_update` / `operation=billing_request_update` 写入专用组织审计日志;状态或状态备注变更会按通知偏好入队 `billing_request_customer_notification` 客户邮件投递,接手负责人会按通知偏好入队 `billing_request_assignee_notification` 内部邮件提醒。 | billing_request |
| /api/v1/organization/billing/requests/{request_uid}/success-task/ | GET / PATCH | 必需 | GET 查看单条账单请求的客服任务状态;PATCH 可更新 status、priority、owner=me/unassigned、due_at 和 next_action,结果保存到工单 metadata 并以 `operation=customer_success_task_update` 写入专用组织审计日志。 | billing_request、customer_success_task |
| /api/v1/organization/billing/requests/{request_uid}/timeline/ | GET | 必需 | 查看单条账单请求活动时间线,聚合创建、状态/负责人变更、客户补件、内部备注、附件引用、客服任务和 SLA 违约审计日志;缺少创建审计的历史工单会返回一条只读创建记录兜底。 | billing_request、items、total |
| /api/v1/organization/billing/requests/{request_uid}/supplements/ | POST | 必需 | 给 open 账单请求追加客户补件;补件保存到工单 metadata,并以 `organization_billing_request_update` / `operation=customer_supplement` 写入专用组织审计日志。 | billing_request |
| /api/v1/organization/billing/requests/{request_uid}/notes/ | POST | 必需 | 给同组织账单请求追加内部备注;备注保存到工单 metadata,可用于 open 或 closed 工单,并以 `organization_billing_request_update` / `operation=internal_note` 写入专用组织审计日志。 | billing_request |
| /api/v1/organization/billing/requests/{request_uid}/attachments/ | POST | 必需 | 给 open 账单请求追加附件引用;仅保存 file_name、file_url、label、description、content_type、size_bytes 等引用 metadata,不上传文件、不拉取 URL、不做文件杀毒,并以 `operation=attachment_reference` 写入专用组织审计日志。 | billing_request |
| /api/v1/organization/billing/requests/{request_uid}/attachments/upload/ | POST multipart | 必需 | 给 open 账单请求上传私有附件;默认写入 `.private/billing_request_attachments`,也可通过 `EPIC_BILLING_ATTACHMENT_STORAGE_BACKEND=s3_compatible` 接入 S3/MinIO 类对象存储;manifest 保存 local 或 `s3_compatible` object_key、SHA256、content_type、size_bytes 和扫描结果,默认 `local_static` 返回 `security_scan.status=passed_basic_validation`,可通过 `EPIC_BILLING_ATTACHMENT_SCAN_PROVIDER=clamav_tcp` 启用 ClamAV TCP 扫描;成功以 `operation=attachment_upload` 写入专用组织审计日志。 | billing_request |
| /api/v1/organization/billing/requests/{request_uid}/attachments/{attachment_uid}/signed-url/ | GET | 必需 | 为已上传附件生成短期签名下载 URL;local 存储会先校验本地文件存在和 SHA256,`s3_compatible` 存储返回 AWS SigV4 query 预签名 URL。 | attachment、signed_download |
| /api/v1/organization/billing/requests/{request_uid}/attachments/{attachment_uid}/signed-download/ | GET | 签名令牌 | local 附件签名 URL 下载入口;令牌过期、object_key 不一致、文件缺失或 SHA256 不匹配时拒绝访问;`s3_compatible` 附件使用 signed-url 响应中的对象存储预签名 URL 下载。 | 附件文件 |
| /api/v1/organization/audit-logs/ | GET | 必需 | 查看自助组织创建、成员变更、成员删除、owner 转移、API Key 创建/轮换/权限变更/停用、审计保留和账单请求审计日志,支持 q、action、target_type、target_uid、actor、created_from、created_to、page 和 page_size;自助注册 action 为 `organization_create`,target_type 为 `organization`;API Key action 包含 `organization_api_key_create`、`organization_api_key_rotate`、`organization_api_key_scope_update` 和 `organization_api_key_disable`,target_type 为 `api_key`;账单请求 action 包含 `organization_billing_request_create`、`organization_billing_request_update`、`organization_billing_request_sla_breach` 和 `organization_billing_notification_preferences_update`;客户后台提供独立筛选和分页,并返回只读保留策略摘要。 | items、total、page、page_size、retention |
| /api/v1/organization/audit-logs/export/ | GET | 必需 | 按 q、action、target_type、target_uid、actor、created_from、created_to 导出同组织审计 CSV,默认最多 1000 行,可用 limit 调整到 5000 行。 | CSV 文件 |
| /api/v1/organization/audit-logs/legal-hold/ | POST | 必需 | 设置或解除组织审计 legal hold;操作写入专用组织审计表。 | retention、legal_hold |
| /api/v1/organization/audit-saved-views/ | GET / POST | 必需 | 列出/保存审计日志筛选视图;保存 q、action、target_type、target_uid、actor、日期范围、默认视图和共享标记。 | items / saved_view |
| /api/v1/organization/audit-saved-views/{view_uid}/ | GET / PATCH / DELETE | 必需 | 查看、更新或删除同组织审计保存视图;可调整筛选、启用状态、默认视图和共享标记。 | saved_view / deleted |
| /api/v1/organization/audit-alert-rules/ | GET / POST | 必需 | 列出/创建组织审计告警规则;当前仅支持即时邮件。 | items / alert_rule |
| /api/v1/organization/audit-alert-rules/{rule_uid}/ | GET / PATCH / DELETE | 必需 | 查看、更新、停用或软删除组织审计告警规则。 | alert_rule / deleted |
| /api/v1/organization/audit-alert-rules/{rule_uid}/test-send/ | POST | 必需 | 发送一次组织审计告警测试邮件。 | sent / delivery |
| /api/v1/organization/audit-alert-rules/{rule_uid}/deliveries/ | GET | 必需 | 查看单条组织审计告警规则的投递历史,支持 status、page 和 page_size。 | items / alert_rule |
| /api/v1/organization/audit-alert-rules/{rule_uid}/deliveries/{delivery_uid}/ | GET | 必需 | 查看单条组织审计告警投递详情,包含正文、载荷、计划/重试时间和 provider message id。 | delivery / alert_rule |
| /api/v1/organization/audit-alert-rules/{rule_uid}/deliveries/retry/ | POST | 必需 | 批量重试 failed/pending 的组织审计告警投递,支持 statuses 和 limit。 | retry / items |
| /api/v1/organization/audit-alert-rules/{rule_uid}/deliveries/{delivery_uid}/retry/ | POST | 必需 | 立即重试 pending 或 failed 的组织审计告警投递。 | sent / delivery |
| /api/v1/organization/audit-alert-rules/{rule_uid}/metrics/ | GET | 必需 | 查看单条组织审计告警规则的投递状态计数、成功率、最近失败、失败原因聚合、待重试概览和 SLA 摘要。 | metrics / alert_rule |
| /api/v1/organization/audit-alert-rules/{rule_uid}/preview/ | GET | 必需 | 预览单条组织审计告警规则最近可能命中的审计日志,支持 limit 和 scan_limit。 | items / matched_count |
| /api/v1/organization/members/ | GET | 必需 | 查看成员和邀请列表,支持 status、page 和 page_size。 | items、total、page、page_size |
| /api/v1/organization/members/{membership_uid}/ | PATCH / DELETE | 必需 | 更新非 owner 成员角色、停用成员/取消邀请,或物理删除 invited/disabled 非 owner 成员记录。 | membership / deleted |
| /api/v1/organization/members/{membership_uid}/transfer-owner/ | POST | 必需 | 当前 active owner 将组织所有权转移给另一个 active 注册成员,原 owner 降为 admin。 | membership |
| /api/v1/organization/invitations/ | POST | 必需 | 邀请成员加入组织。 | membership |
| /api/v1/organization/invitations/{membership_uid}/accept/ | POST | 邀请令牌 | 受邀邮箱使用邮件令牌接受邀请;新用户需提交 email、username 和 password 完成本地注册。 | membership、user |
| /api/v1/data-exports/ | GET | 必需 | 列出当前 API Key 可访问的组织或个人导出任务,支持 status、page 和 page_size。 | items、total、page、page_size |
| /api/v1/data-exports/ | POST | 必需 | 创建 pending 导出任务,不在请求内执行大查询,要求 `exports:write`,并检查组织月导出额度。 | job_uid、status、download_url |
| /api/v1/data-exports/{job_uid}/ | GET | 必需 | 查询导出任务状态,要求 API Key 与任务同组织;无组织任务按 owner 校验。 | status、row_count、expires_at |
| /api/v1/data-exports/{job_uid}/cancel/ | POST | 必需 | 取消尚未运行的 pending 导出任务,要求 `exports:write` 且通过组织或 owner 隔离校验。 | job_uid、status |
| /api/v1/data-exports/{job_uid}/download/ | GET | 必需 | 下载已完成且未过期的数据导出文件,要求 API Key 与任务同组织;无组织任务按 owner 校验。 | CSV/JSON 文件 |
| /api/v1/data-exports/{job_uid}/signed-url/ | GET | 必需 | 为已完成且未过期的导出生成短期本地签名下载 URL,要求 `exports:read` 且通过组织或 owner 隔离校验。 | signed_download.download_url、expires_at、storage |
| /api/v1/data-exports/{job_uid}/signed-download/ | GET | 签名令牌 | 签名 URL 下载入口;令牌过期、文件过期或校验不一致时拒绝访问。 | CSV/JSON 文件 |
| /api/data/ | GET | 可选 | 静态 JSON 兼容层,保留旧客户端访问。 | 原始兼容数据 |
| /api/data/overview/ | GET | 可选 | 摘要指标和筛选维度。 | overview |
| /api/data/map/ | GET | 可选 | 地图聚合数据。 | markers |
| /api/data/table/ | GET | 可选 | 分页表格数据。 | items、total |
| /api/data/epietl/ | GET | 可选 | 公开 EpiETL 快照。 | meta、risk_summary、events |