/api/v1。请求栏列出常用查询参数、JSON 字段及数据类型。成功栏列出状态码和部分顶层字段;可选字段随请求和账号权限变化。破折号表示此表未列参数。完整分组见路由索引。
搜索与发现
| 方法与路径 | 入口权限 | 请求参数 | 成功响应 |
|---|---|---|---|
GET /announcements/home | 公开 | — | 200 announcements |
GET /games | 公开 | 查询 cursor | 200 today, games, more_games, topics, next_cursor, hot |
GET /invite-previews/{code} | 公开 | — | 200 code, state, kind, requires_review, expires_at, max_uses, use_count, inviter |
GET /live/topics | 公开 | 查询 since, scope | 200 count, created, ids, since, more |
GET /live/topics/{id}/replies | 公开 | 查询 since | 200 count, first, highest |
POST /locale | 公开 | JSON locale (string) | 200 locale, interface |
GET /me/nodes | 登录 | — | 200 joined, favorites, frequent, muted |
GET /moderation/reasons | 登录 | 查询 lang | 200 reasons |
GET /permissions | 公开 | — | 200 tiers, roles |
GET /places/suggest | 公开 | 查询 lang, limit, q | 200 lang, places |
GET /report-reasons | 公开 | 查询 lang | 200 reasons |
GET /search | 公开 | 查询 q, type, page, offset, limit, sort, node | 200 q, type, page, has_more, posts, topics, users, nodes, tags, next_page, next_offset |
GET /search/suggest | 公开 | 查询 q, limit, node | 200 q, node, queries, topics, users, nodes, tags |
GET /search/trending | 公开 | — | 200 recommended, trending, tags |
信息流
| 方法与路径 | 入口权限 | 请求参数 | 成功响应 |
|---|---|---|---|
POST /feed/events | 登录 | JSON variant (string), events (object[]) | 204 |
GET /feed/personal | 公开 | 查询 seed, offset, limit | 200 topics, next_offset |
GET /me/feed/affinity | 登录 | — | 200 nodes |
自定义信息流
| 方法与路径 | 入口权限 | 请求参数 | 成功响应 |
|---|---|---|---|
GET /custom-feeds | 登录 | 查询 node | 200 feeds, max_feeds |
POST /custom-feeds | 登录 | JSON name (string), description (string), public (boolean) | 201 feed |
GET /custom-feeds/{id} | 公开 | — | 200 feed |
PUT /custom-feeds/{id} | 登录 | JSON name (string), description (string), public (boolean) | 200 feed |
DELETE /custom-feeds/{id} | 登录 | — | 204 |
POST /custom-feeds/{id}/copy | 登录 | — | 201 feed |
PUT /custom-feeds/{id}/nodes/{slug} | 登录 | — | 200 feed |
DELETE /custom-feeds/{id}/nodes/{slug} | 登录 | — | 200 feed |
GET /custom-feeds/{id}/topics | 公开 | 查询 cursor, offset, limit, sort | 200 topics, next_cursor, next_offset |
站点信息
| 方法与路径 | 入口权限 | 请求参数 | 成功响应 |
|---|---|---|---|
POST /faq/{key}/feedback | 公开 | JSON helpful (boolean) | 204 |
GET /sidebar-links | 公开 | — | 200 links |
多语言内容
| 方法与路径 | 入口权限 | 请求参数 | 成功响应 |
|---|---|---|---|
GET /l10n/{kind}/{ref}/{field} | 登录 | — | 200 kind, ref, field, label, format, max_len, source, source_locale, source_name, no_ai, ai_ready, locales |
GET /l10n/{kind}/{ref}/{field}/{locale} | 登录 | — | 200 source, translation |
PUT /l10n/{kind}/{ref}/{field}/{locale} | 登录 | JSON value (string) | 200 translation |
DELETE /l10n/{kind}/{ref}/{field}/{locale} | 登录 | — | 204 |
POST /l10n/{kind}/{ref}/{field}/{locale}/ai | 登录 | — | 200 translation |
翻译
| 方法与路径 | 入口权限 | 请求参数 | 成功响应 |
|---|---|---|---|
POST /posts/{id}/translation | 登录 | JSON locale (string) | 200 source_locale, source_name, locale, same, title, html |
图片和附件
| 方法与路径 | 入口权限 | 请求参数 | 成功响应 |
|---|---|---|---|
PUT /me/avatar | 登录 | JSON upload_id (integer) | 204 |
PUT /me/cover | 登录 | JSON upload_id (integer) | 204 |
DELETE /me/cover | 登录 | — | 204 |
POST /uploads | 登录 | multipart file, kind | 201 upload |
视频
| 方法与路径 | 入口权限 | 请求参数 | 成功响应 |
|---|---|---|---|
POST /videos | 登录 | multipart file | 201 video |
GET /videos/{sha1} | 公开 | — | 200 video |
POST /videos/{sha1}/retry | 登录 | — | 204 |
链接预览
| 方法与路径 | 入口权限 | 请求参数 | 成功响应 |
|---|---|---|---|
GET /link-previews | 公开 | 重复查询参数 url(1–20 个) | 200 previews |
外部链接
| 方法与路径 | 入口权限 | 请求参数 | 成功响应 |
|---|---|---|---|
POST /link-clicks | 公开 | JSON post_id (integer), url (string), reason (string) | 200 clicks, counted |
POST /link-reports | 登录 | JSON post_id (integer), url (string), reason (string) | 200 reported, repeated |
GET /me/trusted-hosts | 登录 | — | 200 hosts, max |
POST /me/trusted-hosts | 登录 | JSON hosts (string[]) | 200 added |
DELETE /me/trusted-hosts/{host} | 登录 | — | 204 |
GET /topics/{id}/link-stats | 公开 | 重复查询参数 post | 200 clicks, flagged, trusted |
公告
| 方法与路径 | 入口权限 | 请求参数 | 成功响应 |
|---|---|---|---|
PUT /announcements/{id}/dismissal | 登录 | — | 204 |
