跳到正文

个人记录

Luogu Saver API

IsHPDuwu约 113 分钟
原文

这是 2026年6月7日 存档的第 1 版,不是当前版本。查看当前版本

文章信息与版本

文章信息

发布
2026年6月7日
收录
2026年6月7日
更新
2026年11月22日
篇幅
约 113 分钟

版本

  1. v2当前
  2. v1

luogu-saver-next Backend API

由 packages/backend/src/routers 中的实际 Koa 路由手动整理。所有 JSON 接口默认返回 { code, message, data }。

Base URLs:

Authentication

  • HTTP Authentication, scheme: bearer

信息

GET 按文章 ID 查询文章

GET /article/query/{id}

请求参数

名称位置类型必选说明
idpathstring是none
User-Agentheaderstring否none

返回示例

200 Response

JSON
{
  "code": 200,
  "message": "Success",
  "data": {
    "id": "string",
    "title": "string",
    "content": "string",
    "renderedContent": "string",
    "authorId": 0,
    "category": 0,
    "upvote": 0,
    "favorCount": 0,
    "solutionForPid": "string",
    "priority": 0,
    "deleted": true,
    "tags": [
      "string"
    ],
    "createdAt": "2019-08-24T14:15:22Z",
    "updatedAt": "2019-08-24T14:15:22Z",
    "deleteReason": "string",
    "contentHash": "string",
    "viewCount": 0,
    "summary": "string",
    "author": {
      "id": 0,
      "name": "string",
      "color": "string",
      "ccfLevel": 0,
      "xcpcLevel": 0,
      "slogan": "string",
      "renderedIntroduction": "string",
      "prizes": [
        {}
      ],
      "profileFetchedAt": "2019-08-24T14:15:22Z",
      "createdAt": "2019-08-24T14:15:22Z",
      "updatedAt": "2019-08-24T14:15:22Z"
    }
  }
}

返回结果

状态码状态码含义说明数据模型
200OK文章详情ArticleResponse

GET 获取相关文章推荐

GET /article/relevant/{id}

请求参数

名称位置类型必选说明
idpathstring是none
User-Agentheaderstring否none

返回示例

200 Response

JSON
{
  "code": 200,
  "message": "Success",
  "data": [
    {
      "id": "string",
      "title": "string",
      "summary": "string",
      "author": {
        "id": 0,
        "name": "string",
        "color": "string",
        "ccfLevel": 0,
        "xcpcLevel": 0,
        "slogan": "string",
        "renderedIntroduction": "string",
        "prizes": [
          null
        ],
        "profileFetchedAt": "2019-08-24T14:15:22Z",
        "createdAt": "2019-08-24T14:15:22Z",
        "updatedAt": "2019-08-24T14:15:22Z"
      },
      "updatedAt": "2019-08-24T14:15:22Z",
      "category": 0,
      "tags": [
        "string"
      ],
      "reason": "vector"
    }
  ]
}

返回结果

状态码状态码含义说明数据模型
200OK相关文章列表RecommendedArticleListResponse

GET 获取文章历史记录

GET /article/history/{id}

请求参数

名称位置类型必选说明
idpathstring是none
User-Agentheaderstring否none

返回示例

200 Response

JSON
{
  "code": 200,
  "message": "Success",
  "data": null
}

返回结果

状态码状态码含义说明数据模型
200OK文章历史记录ApiResponse

GET 获取最近更新文章列表

GET /article/recent

请求参数

名称位置类型必选说明
countqueryinteger否none
updated_afterquerystring(date-time)否none
truncated_countqueryinteger否none
User-Agentheaderstring否none

返回示例

200 Response

JSON
{
  "code": 200,
  "message": "Success",
  "data": [
    {
      "id": "string",
      "title": "string",
      "content": "string",
      "renderedContent": "string",
      "authorId": 0,
      "category": 0,
      "upvote": 0,
      "favorCount": 0,
      "solutionForPid": "string",
      "priority": 0,
      "deleted": true,
      "tags": [
        "string"
      ],
      "createdAt": "2019-08-24T14:15:22Z",
      "updatedAt": "2019-08-24T14:15:22Z",
      "deleteReason": "string",
      "contentHash": "string",
      "viewCount": 0,
      "summary": "string",
      "author": {
        "id": 0,
        "name": "string",
        "color": "string",
        "ccfLevel": 0,
        "xcpcLevel": 0,
        "slogan": "string",
        "renderedIntroduction": "string",
        "prizes": [
          null
        ],
        "profileFetchedAt": "2019-08-24T14:15:22Z",
        "createdAt": "2019-08-24T14:15:22Z",
        "updatedAt": "2019-08-24T14:15:22Z"
      }
    }
  ]
}

返回结果

状态码状态码含义说明数据模型
200OK文章列表ArticleListResponse

GET 获取文章总数

GET /article/count

请求参数

名称位置类型必选说明
User-Agentheaderstring否none

返回示例

200 Response

JSON
{
  "code": 200,
  "message": "Success",
  "data": {
    "count": 0
  }
}

返回结果

状态码状态码含义说明数据模型
200OK文章总数CountResponse

GET 获取广场推荐文章

GET /plaza/get

请求参数

名称位置类型必选说明
countqueryinteger否none
excludequerystring否none
x-device-idheaderstring否none
x-consent-trackingheaderstring否none
User-Agentheaderstring否none
枚举值
属性值
x-consent-trackingtrue
x-consent-trackingfalse

返回示例

200 Response

JSON
{
  "code": 200,
  "message": "Success",
  "data": [
    {
      "id": "string",
      "title": "string",
      "summary": "string",
      "author": {
        "id": 0,
        "name": "string",
        "color": "string",
        "ccfLevel": 0,
        "xcpcLevel": 0,
        "slogan": "string",
        "renderedIntroduction": "string",
        "prizes": [
          null
        ],
        "profileFetchedAt": "2019-08-24T14:15:22Z",
        "createdAt": "2019-08-24T14:15:22Z",
        "updatedAt": "2019-08-24T14:15:22Z"
      },
      "updatedAt": "2019-08-24T14:15:22Z",
      "category": 0,
      "tags": [
        "string"
      ],
      "reason": "vector"
    }
  ]
}

返回结果

状态码状态码含义说明数据模型
200OK推荐文章列表RecommendedArticleListResponse

GET 搜索文章

GET /search/articles

请求参数

名称位置类型必选说明
qquerystring否none
pagequeryinteger否none
limitqueryinteger否none
categoryqueryinteger否none
authorIdqueryinteger否none
User-Agentheaderstring否none

返回示例

200 Response

JSON
{
  "code": 200,
  "message": "Success",
  "data": {
    "hits": [
      {
        "id": "string",
        "title": "string",
        "summary": "string",
        "authorId": 0,
        "authorName": "string",
        "category": 0,
        "tags": [
          null
        ],
        "updatedAt": 0,
        "viewCount": 0,
        "priority": 0,
        "formatted": {}
      }
    ],
    "page": 0,
    "limit": 0,
    "total": 0,
    "processingTimeMs": 0
  }
}

返回结果

状态码状态码含义说明数据模型
200OK搜索结果ArticleSearchResponse

GET 获取剪贴板总数

GET /paste/count

请求参数

名称位置类型必选说明
User-Agentheaderstring否none

返回示例

200 Response

JSON
{
  "code": 200,
  "message": "Success",
  "data": {
    "count": 0
  }
}

返回结果

状态码状态码含义说明数据模型
200OK剪贴板总数CountResponse

GET 按剪贴板 ID 查询剪贴板

GET /paste/query/{id}

请求参数

名称位置类型必选说明
idpathstring是none
User-Agentheaderstring否none

返回示例

200 Response

JSON
{
  "code": 200,
  "message": "Success",
  "data": {
    "id": "string",
    "content": "string",
    "renderedContent": "string",
    "authorId": 0,
    "deleted": true,
    "createdAt": "2019-08-24T14:15:22Z",
    "updatedAt": "2019-08-24T14:15:22Z",
    "deleteReason": "string",
    "contentHash": "string",
    "author": {
      "id": 0,
      "name": "string",
      "color": "string",
      "ccfLevel": 0,
      "xcpcLevel": 0,
      "slogan": "string",
      "renderedIntroduction": "string",
      "prizes": [
        {}
      ],
      "profileFetchedAt": "2019-08-24T14:15:22Z",
      "createdAt": "2019-08-24T14:15:22Z",
      "updatedAt": "2019-08-24T14:15:22Z"
    }
  }
}

返回结果

状态码状态码含义说明数据模型
200OK剪贴板详情PasteResponse

GET 查询指定对象的审核结果

GET /censorship/query/{type}/{id}

请求参数

名称位置类型必选说明
typepathstring是none
idpathstring是none
User-Agentheaderstring否none
枚举值
属性值
typearticle
typepaste

返回示例

200 Response

JSON
{
  "code": 200,
  "message": "Success",
  "data": {
    "createdAt": "2019-08-24T14:15:22Z",
    "rating": 0,
    "category": "string",
    "userDisplayMessage": "string"
  }
}

返回结果

状态码状态码含义说明数据模型
200OK审核结果CensorshipResponse

GET 按洛谷用户 ID 查询用户资料

GET /user/{id}

请求参数

名称位置类型必选说明
idpathinteger是none
User-Agentheaderstring否none

返回示例

200 Response

JSON
{
  "code": 200,
  "message": "Success",
  "data": {
    "id": 0,
    "name": "string",
    "color": "string",
    "ccfLevel": 0,
    "xcpcLevel": 0,
    "slogan": "string",
    "renderedIntroduction": "string",
    "prizes": [
      {}
    ],
    "profileFetchedAt": "2019-08-24T14:15:22Z",
    "profileStale": true,
    "createdAt": "2019-08-24T14:15:22Z",
    "updatedAt": "2019-08-24T14:15:22Z"
  }
}

返回结果

状态码状态码含义说明数据模型
200OK用户资料UserProfileResponse

GET 获取队列统计信息

GET /stats/queues

请求参数

名称位置类型必选说明
User-Agentheaderstring否none

返回示例

200 Response

JSON
{
  "code": 200,
  "message": "Success",
  "data": {
    "generatedAt": "2019-08-24T14:15:22Z",
    "queuePoolSize": 0,
    "queues": [
      {
        "name": "string",
        "taskType": "[",
        "label": "string",
        "concurrency": 0,
        "isPaused": true,
        "counts": {}
      }
    ]
  }
}

返回结果

状态码状态码含义说明数据模型
200OK队列统计QueueStatsResponse

任务(弃用)

POST 创建并派发任务(需要 CREATE_TASK 权限)

POST /task/create

Body 请求参数

JSON
{
  "type": "save",
  "payload": {
    "target": "string",
    "targetId": "string",
    "query": "string",
    "metadata": {}
  }
}

请求参数

名称位置类型必选说明
User-Agentheaderstring否none
bodybodyTaskCreateRequest是none

返回示例

200 Response

JSON
{
  "code": 200,
  "message": "Success",
  "data": {
    "taskId": "string"
  }
}

返回结果

状态码状态码含义说明数据模型
200OK任务创建结果TaskCreateResponse

GET 按任务 ID 查询任务

GET /task/query/{id}

请求参数

名称位置类型必选说明
idpathstring是none
User-Agentheaderstring否none

返回示例

200 Response

JSON
{
  "code": 200,
  "message": "Success",
  "data": {
    "id": "string",
    "info": "string",
    "status": 0,
    "createdAt": "2019-08-24T14:15:22Z",
    "type": "save",
    "payload": {
      "target": "string",
      "targetId": "string",
      "query": "string",
      "metadata": {}
    }
  }
}

返回结果

状态码状态码含义说明数据模型
200OK任务详情TaskResponse

工作流

POST 创建工作流(需要 CREATE_WORKFLOW 权限)

POST /workflow/create

Body 请求参数

JSON
{}

请求参数

名称位置类型必选说明
User-Agentheaderstring否none
bodybodyWorkflowCreateRequest是none

返回示例

200 Response

JSON
{
  "code": 0,
  "message": "string",
  "data": {
    "workflowId": "string",
    "rootJobId": "string",
    "taskIds": {
      "property1": "string",
      "property2": "string"
    },
    "reportTaskIds": {
      "property1": "string",
      "property2": "string"
    }
  }
}

返回结果

状态码状态码含义说明数据模型
200OK工作流创建结果WorkflowResponse

GET 按工作流 ID 查询工作流

GET /workflow/query/{id}

请求参数

名称位置类型必选说明
idpathstring(uuid)是none
User-Agentheaderstring否none

返回示例

200 Response

JSON
{
  "code": 0,
  "message": "string",
  "data": {
    "workflowId": "string",
    "rootJobId": "string",
    "taskIds": {
      "property1": "string",
      "property2": "string"
    },
    "reportTaskIds": {
      "property1": "string",
      "property2": "string"
    }
  }
}

返回结果

状态码状态码含义说明数据模型
200OK工作流详情WorkflowResponse

工作流/工作流模版

POST 按模板创建工作流

POST /workflow/create/template/{name}

按路径参数 name 选择工作流模板。公开模板不需要 Authorization;受限模板需要 Bearer Token 且满足对应权限。

Body 请求参数

JSON
{
    "targetId": "bb0oqx5p"
}
JSON
{
    "targetId": "k4z9l3jg"
}
JSON
{
    "query": "如何学习动态规划?",
    "limit": 10,
    "maxArticles": 10,
    "maxChars": 20000,
    "articleIds": [
        "bb0oqx5p"
    ]
}
JSON
{
    "batchSize": 20,
    "concurrency": 5
}
JSON
{
    "batchSize": 100
}

请求参数

名称位置类型必选说明
namepathstring是模板名称。可用值:article-save-pipeline、paste-save-pipeline、article-censor-pipeline、rag-search-pipeline、article-summary-rebuild-pipeline、article-embedding-rebuild-pipeline、search-reindex-pipeline。
User-Agentheaderstring否none
bodybodyany是none
枚举值
属性值
namearticle-save-pipeline
namepaste-save-pipeline
namearticle-censor-pipeline
namerag-search-pipeline
namearticle-summary-rebuild-pipeline
namearticle-embedding-rebuild-pipeline
namesearch-reindex-pipeline

返回示例

200 Response

JSON
{
  "code": 0,
  "message": "string",
  "data": {
    "workflowId": "string",
    "rootJobId": "string",
    "taskIds": {
      "property1": "string",
      "property2": "string"
    },
    "reportTaskIds": {
      "property1": "string",
      "property2": "string"
    }
  }
}

返回结果

状态码状态码含义说明数据模型
200OK工作流创建结果WorkflowResponse

POST 保存文章

POST /workflow/create/template/article-save-pipeline

Body 请求参数

JSON
{
    "targetId": "bb0oqx5p"
}

请求参数

名称位置类型必选说明
User-Agentheaderstring否none
bodybodyWorkflowTargetTemplateRequest是none

返回示例

200 Response

JSON
{
    "code": 200,
    "message": "Success",
    "data": {
        "workflowId": "f0554316-7b95-44e2-b3fb-9765d1873b38",
        "rootJobId": "QB6Pz0utSzCqlvfD",
        "taskIds": {
            "save": "wnfHXuQOdvf8MEUP",
            "summary": "ElyFsLxRim3hG6uR",
            "censor": "tfKQecTMAxa7Qbla",
            "embedding": "vR23BhxeYl1u0SEN",
            "update-embedding": "xk1oQD7VVpir9hW0",
            "update-summary": "Zk6jqx58RuKIvwxN",
            "update-censor": "C2ajfD1ePOalQV4u",
            "update-search-index": "QB6Pz0utSzCqlvfD"
        },
        "reportTaskIds": {
            "save": "wnfHXuQOdvf8MEUP",
            "update-search-index": "QB6Pz0utSzCqlvfD"
        }
    }
}

返回结果

状态码状态码含义说明数据模型
200OK工作流创建结果WorkflowResponse

POST 保存剪贴板

POST /workflow/create/template/paste-save-pipeline

Body 请求参数

JSON
{
    "targetId": "k4z9l3jg"
}

请求参数

名称位置类型必选说明
User-Agentheaderstring否none
bodybodyWorkflowTargetTemplateRequest是none

返回示例

200 Response

JSON
{
  "code": 0,
  "message": "string",
  "data": {
    "workflowId": "string",
    "rootJobId": "string",
    "taskIds": {
      "property1": "string",
      "property2": "string"
    },
    "reportTaskIds": {
      "property1": "string",
      "property2": "string"
    }
  }
}

返回结果

状态码状态码含义说明数据模型
200OK工作流创建结果WorkflowResponse

POST 重新审核文章(需要 CREATE_WORKFLOW 权限)

POST /workflow/create/template/article-censor-pipeline

读取已保存文章内容,重新执行内容审核并写入审核结果。需要 CREATE_WORKFLOW 权限。

Body 请求参数

JSON
{
    "targetId": "bb0oqx5p"
}

请求参数

名称位置类型必选说明
User-Agentheaderstring否none
bodybodyWorkflowTargetTemplateRequest是none

返回示例

200 Response

JSON
{
  "code": 0,
  "message": "string",
  "data": {
    "workflowId": "string",
    "rootJobId": "string",
    "taskIds": {
      "property1": "string",
      "property2": "string"
    },
    "reportTaskIds": {
      "property1": "string",
      "property2": "string"
    }
  }
}

返回结果

状态码状态码含义说明数据模型
200OK工作流创建结果WorkflowResponse

POST RAG 搜索问答(需要 CREATE_WORKFLOW 权限)

POST /workflow/create/template/rag-search-pipeline

根据 query 规划检索词,执行关键词检索和向量检索,构建上下文后生成回答。需要 CREATE_WORKFLOW 权限。

Body 请求参数

JSON
{
    "query": "如何学习动态规划?",
    "limit": 10,
    "maxArticles": 10,
    "maxChars": 20000,
    "articleIds": [
        "bb0oqx5p"
    ]
}

请求参数

名称位置类型必选说明
User-Agentheaderstring否none
bodybodyRagSearchWorkflowTemplateRequest是none

返回示例

200 Response

JSON
{
  "code": 0,
  "message": "string",
  "data": {
    "workflowId": "string",
    "rootJobId": "string",
    "taskIds": {
      "property1": "string",
      "property2": "string"
    },
    "reportTaskIds": {
      "property1": "string",
      "property2": "string"
    }
  }
}

返回结果

状态码状态码含义说明数据模型
200OK工作流创建结果WorkflowResponse

POST 批量重建文章摘要(需要 MANAGE_SEARCH 权限)

POST /workflow/create/template/article-summary-rebuild-pipeline

批量重建文章摘要。batchSize 默认 20,范围 1 到 100;concurrency 默认 5,范围 1 到 20。需要 MANAGE_SEARCH 权限。

Body 请求参数

JSON
{
    "batchSize": 20,
    "concurrency": 5
}

请求参数

名称位置类型必选说明
User-Agentheaderstring否none
bodybodyRebuildWorkflowTemplateRequest是none

返回示例

200 Response

JSON
{
  "code": 0,
  "message": "string",
  "data": {
    "workflowId": "string",
    "rootJobId": "string",
    "taskIds": {
      "property1": "string",
      "property2": "string"
    },
    "reportTaskIds": {
      "property1": "string",
      "property2": "string"
    }
  }
}

返回结果

状态码状态码含义说明数据模型
200OK工作流创建结果WorkflowResponse

POST 批量重建文章 Embedding(需要 MANAGE_SEARCH 权限)

POST /workflow/create/template/article-embedding-rebuild-pipeline

批量重建文章 embedding。batchSize 默认 20,范围 1 到 100;concurrency 默认 5,范围 1 到 20。需要 MANAGE_SEARCH 权限。

Body 请求参数

JSON
{
    "batchSize": 20,
    "concurrency": 5
}

请求参数

名称位置类型必选说明
User-Agentheaderstring否none
bodybodyRebuildWorkflowTemplateRequest是none

返回示例

200 Response

JSON
{
  "code": 0,
  "message": "string",
  "data": {
    "workflowId": "string",
    "rootJobId": "string",
    "taskIds": {
      "property1": "string",
      "property2": "string"
    },
    "reportTaskIds": {
      "property1": "string",
      "property2": "string"
    }
  }
}

返回结果

状态码状态码含义说明数据模型
200OK工作流创建结果WorkflowResponse

POST 批量重建搜索索引(需要 MANAGE_SEARCH 权限)

POST /workflow/create/template/search-reindex-pipeline

批量重建文章搜索索引。batchSize 默认 100,范围 1 到 500。需要 MANAGE_SEARCH 权限。

Body 请求参数

JSON
{
    "batchSize": 100
}

请求参数

名称位置类型必选说明
User-Agentheaderstring否none
bodybodySearchReindexWorkflowTemplateRequest是none

返回示例

200 Response

JSON
{
  "code": 0,
  "message": "string",
  "data": {
    "workflowId": "string",
    "rootJobId": "string",
    "taskIds": {
      "property1": "string",
      "property2": "string"
    },
    "reportTaskIds": {
      "property1": "string",
      "property2": "string"
    }
  }
}

返回结果

状态码状态码含义说明数据模型
200OK工作流创建结果WorkflowResponse

用户与鉴权

GET 获取当前登录用户

GET /auth/me

请求参数

名称位置类型必选说明
User-Agentheaderstring否none

返回示例

200 Response

JSON
{
  "code": 200,
  "message": "Success",
  "data": {
    "uid": 0,
    "role": 0,
    "registeredUser": {
      "id": 0,
      "luoguUid": 0,
      "name": "string",
      "avatarUrl": "string",
      "createdAt": "2019-08-24T14:15:22Z",
      "updatedAt": "2019-08-24T14:15:22Z",
      "role": 0
    }
  }
}

返回结果

状态码状态码含义说明数据模型
200OK当前用户信息AuthMeResponse

POST 创建 Token(已迁移到 CP OAuth 登录)

POST /token/create

Body 请求参数

JSON
{}

请求参数

名称位置类型必选说明
User-Agentheaderstring否none
bodybodyTokenCreateRequest否none

返回示例

200 Response

JSON
{
  "code": 200,
  "message": "Success",
  "data": null
}

返回结果

状态码状态码含义说明数据模型
200OK410 迁移提示ApiResponse

POST 准备洛谷验证信息

POST /token/verify

Body 请求参数

JSON
{
  "uid": 0
}

请求参数

名称位置类型必选说明
User-Agentheaderstring否none
bodybodyTokenVerifyRequest是none

返回示例

200 Response

JSON
{
  "code": 200,
  "message": "Success",
  "data": null
}

返回结果

状态码状态码含义说明数据模型
200OK验证准备结果ApiResponse

GET 发起 CP OAuth 登录

GET /auth/cp/login

请求参数

名称位置类型必选说明
redirectquerystring否none
User-Agentheaderstring否none

返回示例

200 Response

JSON
{
  "code": 200,
  "message": "Success",
  "data": null
}

返回结果

状态码状态码含义说明数据模型
200OK创建授权 URL 失败时的统一响应ApiResponse
302Found重定向到 CP OAuth 授权页None

GET 处理 CP OAuth 回调

GET /auth/cp/callback

请求参数

名称位置类型必选说明
codequerystring否none
statequerystring否none
errorquerystring否none
error_descriptionquerystring否none
User-Agentheaderstring否none

返回结果

状态码状态码含义说明数据模型
302Found重定向到前端回调页None

GET 检查当前 Token 对应用户(需要 LOGIN 权限)

GET /token/inspect

请求参数

名称位置类型必选说明
User-Agentheaderstring否none

返回示例

200 Response

JSON
{
  "code": 200,
  "message": "Success",
  "data": {
    "uid": 0,
    "role": 0,
    "createdAt": "2019-08-24T14:15:22Z"
  }
}

返回结果

状态码状态码含义说明数据模型
200OK当前用户角色信息TokenInspectResponse

POST 派发用户资料刷新任务

POST /user/{id}/refresh

请求参数

名称位置类型必选说明
idpathinteger是none
User-Agentheaderstring否none

返回示例

200 Response

JSON
{
  "code": 200,
  "message": "Success",
  "data": {
    "taskId": "string"
  }
}

返回结果

状态码状态码含义说明数据模型
200OK刷新任务 IDUserRefreshResponse

utils

POST 渲染 Markdown 为 HTML

POST /markdown/render

Body 请求参数

JSON
{
  "content": "string"
}

请求参数

名称位置类型必选说明
User-Agentheaderstring否none
bodybodyMarkdownRenderRequest是none

返回示例

200 Response

JSON
{
  "code": 200,
  "message": "Success",
  "data": {
    "html": "string"
  }
}

返回结果

状态码状态码含义说明数据模型
200OK渲染结果MarkdownRenderResponse

admin

POST 更新用户权限角色(管理员)

POST /token/permission

Body 请求参数

JSON
{
  "uid": 0,
  "role": 0
}

请求参数

名称位置类型必选说明
User-Agentheaderstring否none
bodybodyTokenPermissionRequest是none

返回示例

200 Response

JSON
{
  "code": 200,
  "message": "Success",
  "data": {
    "uid": 0,
    "role": 0
  }
}

返回结果

状态码状态码含义说明数据模型
200OK角色更新结果RoleUpdateResponse

GET 列出注册用户(需要 MANAGE_USERS 权限)

GET /admin/users

请求参数

名称位置类型必选说明
User-Agentheaderstring否none

返回示例

200 Response

JSON
{
  "code": 200,
  "message": "Success",
  "data": [
    {
      "id": 0,
      "luoguUid": 0,
      "name": "string",
      "avatarUrl": "string",
      "createdAt": "2019-08-24T14:15:22Z",
      "updatedAt": "2019-08-24T14:15:22Z",
      "role": 0
    }
  ]
}

返回结果

状态码状态码含义说明数据模型
200OK注册用户列表AdminUsersResponse

PATCH 更新注册用户角色(需要 MANAGE_USERS 权限)

PATCH /admin/users/{uid}/role

Body 请求参数

JSON
{
  "role": 0
}

请求参数

名称位置类型必选说明
uidpathinteger是none
User-Agentheaderstring否none
bodybodyRoleUpdateRequest是none

返回示例

200 Response

JSON
{
  "code": 200,
  "message": "Success",
  "data": {
    "uid": 0,
    "role": 0
  }
}

返回结果

状态码状态码含义说明数据模型
200OK角色更新结果RoleUpdateResponse

POST 创建搜索重建索引工作流(需要 MANAGE_SEARCH 权限)

POST /admin/search/reindex

Body 请求参数

JSON
{
  "batchSize": 100
}

请求参数

名称位置类型必选说明
User-Agentheaderstring否none
bodybodyReindexRequest否none

返回示例

200 Response

JSON
{
  "code": 0,
  "message": "string",
  "data": {
    "workflowId": "string",
    "rootJobId": "string",
    "taskIds": {
      "property1": "string",
      "property2": "string"
    },
    "reportTaskIds": {
      "property1": "string",
      "property2": "string"
    }
  }
}

返回结果

状态码状态码含义说明数据模型
200OK工作流创建结果WorkflowResponse

POST 创建文章摘要重建工作流(需要 MANAGE_SEARCH 权限)

POST /admin/articles/summary/rebuild

Body 请求参数

JSON
{
  "batchSize": 20,
  "concurrency": 5
}

请求参数

名称位置类型必选说明
User-Agentheaderstring否none
bodybodySummaryRebuildRequest否none

返回示例

200 Response

JSON
{
  "code": 0,
  "message": "string",
  "data": {
    "workflowId": "string",
    "rootJobId": "string",
    "taskIds": {
      "property1": "string",
      "property2": "string"
    },
    "reportTaskIds": {
      "property1": "string",
      "property2": "string"
    }
  }
}

返回结果

状态码状态码含义说明数据模型
200OK工作流创建结果WorkflowResponse

数据模型

ApiResponse

JSON
{
  "code": 200,
  "message": "Success",
  "data": null
}

属性

名称类型必选约束中文名说明
codeintegertruenonenone
messagestringtruenonenone
datanulltruenonenone

WorkflowTemplateRequest

JSON
{
  "targetId": "stringst"
}

属性

oneOf

名称类型必选约束中文名说明
anonymousWorkflowTargetTemplateRequestfalsenonenone

xor

名称类型必选约束中文名说明
anonymousRagSearchWorkflowTemplateRequestfalsenonenone

xor

名称类型必选约束中文名说明
anonymousRebuildWorkflowTemplateRequestfalsenonenone

xor

名称类型必选约束中文名说明
anonymousSearchReindexWorkflowTemplateRequestfalsenonenone

CountData

JSON
{
  "count": 0
}

属性

名称类型必选约束中文名说明
countintegertruenonenone

WorkflowTargetTemplateRequest

JSON
{
  "targetId": "stringst"
}

属性

名称类型必选约束中文名说明
targetIdstringtruenone目标 idnone

CountResponse

JSON
{
  "code": 200,
  "message": "Success",
  "data": {
    "count": 0
  }
}

属性

allOf

名称类型必选约束中文名说明
anonymousApiResponsefalsenonenone

and

名称类型必选约束中文名说明
anonymousobjectfalsenonenone
» dataCountDatafalsenonenone

RagSearchWorkflowTemplateRequest

JSON
{
  "query": "string",
  "limit": 10,
  "maxArticles": 10,
  "maxChars": 20000,
  "articleIds": []
}

属性

名称类型必选约束中文名说明
querystringtruenone查询内容none
limitintegerfalsenone每次检索返回数量none
maxArticlesintegerfalsenone上下文最大文章数none
maxCharsintegerfalsenone上下文最大字符数none
articleIds[string]falsenone固定纳入上下文的文章 id 列表none

ArticleAuthor

JSON
{
  "id": 0,
  "name": "string",
  "color": "string",
  "ccfLevel": 0,
  "xcpcLevel": 0,
  "slogan": "string",
  "renderedIntroduction": "string",
  "prizes": [
    {}
  ],
  "profileFetchedAt": "2019-08-24T14:15:22Z",
  "createdAt": "2019-08-24T14:15:22Z",
  "updatedAt": "2019-08-24T14:15:22Z"
}

属性

名称类型必选约束中文名说明
idintegerfalsenonenone
namestringfalsenonenone
colorstringfalsenonenone
ccfLevelintegerfalsenonenone
xcpcLevelintegerfalsenonenone
sloganstring¦nullfalsenonenone
renderedIntroductionstring¦nullfalsenonenone
prizes[object]¦nullfalsenonenone
profileFetchedAtstring(date-time)¦nullfalsenonenone
createdAtstring(date-time)falsenonenone
updatedAtstring(date-time)falsenonenone

RebuildWorkflowTemplateRequest

JSON
{
  "batchSize": 20,
  "concurrency": 5
}

属性

名称类型必选约束中文名说明
batchSizeintegerfalsenone批大小none
concurrencyintegerfalsenone并发数none

Article

JSON
{
  "id": "string",
  "title": "string",
  "content": "string",
  "renderedContent": "string",
  "authorId": 0,
  "category": 0,
  "upvote": 0,
  "favorCount": 0,
  "solutionForPid": "string",
  "priority": 0,
  "deleted": true,
  "tags": [
    "string"
  ],
  "createdAt": "2019-08-24T14:15:22Z",
  "updatedAt": "2019-08-24T14:15:22Z",
  "deleteReason": "string",
  "contentHash": "string",
  "viewCount": 0,
  "summary": "string",
  "author": {
    "id": 0,
    "name": "string",
    "color": "string",
    "ccfLevel": 0,
    "xcpcLevel": 0,
    "slogan": "string",
    "renderedIntroduction": "string",
    "prizes": [
      {}
    ],
    "profileFetchedAt": "2019-08-24T14:15:22Z",
    "createdAt": "2019-08-24T14:15:22Z",
    "updatedAt": "2019-08-24T14:15:22Z"
  }
}

属性

名称类型必选约束中文名说明
idstringfalsenonenone
titlestringfalsenonenone
contentstringfalsenonenone
renderedContentstring¦nullfalsenonenone
authorIdintegerfalsenonenone
categoryintegerfalsenonenone
upvoteintegerfalsenonenone
favorCountintegerfalsenonenone
solutionForPidstring¦nullfalsenonenone
priorityintegerfalsenonenone
deletedbooleanfalsenonenone
tags[string]falsenonenone
createdAtstring(date-time)falsenonenone
updatedAtstring(date-time)falsenonenone
deleteReasonstring¦nullfalsenonenone
contentHashstring¦nullfalsenonenone
viewCountintegerfalsenonenone
summarystring¦nullfalsenonenone
authorArticleAuthorfalsenonenone

SearchReindexWorkflowTemplateRequest

JSON
{
  "batchSize": 100
}

属性

名称类型必选约束中文名说明
batchSizeintegerfalsenone批大小none

ArticleResponse

JSON
{
  "code": 200,
  "message": "Success",
  "data": {
    "id": "string",
    "title": "string",
    "content": "string",
    "renderedContent": "string",
    "authorId": 0,
    "category": 0,
    "upvote": 0,
    "favorCount": 0,
    "solutionForPid": "string",
    "priority": 0,
    "deleted": true,
    "tags": [
      "string"
    ],
    "createdAt": "2019-08-24T14:15:22Z",
    "updatedAt": "2019-08-24T14:15:22Z",
    "deleteReason": "string",
    "contentHash": "string",
    "viewCount": 0,
    "summary": "string",
    "author": {
      "id": 0,
      "name": "string",
      "color": "string",
      "ccfLevel": 0,
      "xcpcLevel": 0,
      "slogan": "string",
      "renderedIntroduction": "string",
      "prizes": [
        {}
      ],
      "profileFetchedAt": "2019-08-24T14:15:22Z",
      "createdAt": "2019-08-24T14:15:22Z",
      "updatedAt": "2019-08-24T14:15:22Z"
    }
  }
}

属性

allOf

名称类型必选约束中文名说明
anonymousApiResponsefalsenonenone

and

名称类型必选约束中文名说明
anonymousobjectfalsenonenone
» dataArticlefalsenonenone

WorkflowResponse

JSON
{
  "code": 0,
  "message": "string",
  "data": {
    "workflowId": "string",
    "rootJobId": "string",
    "taskIds": {
      "property1": "string",
      "property2": "string"
    },
    "reportTaskIds": {
      "property1": "string",
      "property2": "string"
    }
  }
}

属性

名称类型必选约束中文名说明
codeintegertruenonenone
messagestringtruenonenone
dataobjecttruenonenone
» workflowIdstringtruenonenone
» rootJobIdstringtruenonenone
» taskIdsobjecttruenonenone
»» additionalPropertiesstringfalsenonenone
» reportTaskIdsobjecttruenonenone
»» additionalPropertiesstringfalsenonenone

ArticleListResponse

JSON
{
  "code": 200,
  "message": "Success",
  "data": [
    {
      "id": "string",
      "title": "string",
      "content": "string",
      "renderedContent": "string",
      "authorId": 0,
      "category": 0,
      "upvote": 0,
      "favorCount": 0,
      "solutionForPid": "string",
      "priority": 0,
      "deleted": true,
      "tags": [
        "string"
      ],
      "createdAt": "2019-08-24T14:15:22Z",
      "updatedAt": "2019-08-24T14:15:22Z",
      "deleteReason": "string",
      "contentHash": "string",
      "viewCount": 0,
      "summary": "string",
      "author": {
        "id": 0,
        "name": "string",
        "color": "string",
        "ccfLevel": 0,
        "xcpcLevel": 0,
        "slogan": "string",
        "renderedIntroduction": "string",
        "prizes": [
          null
        ],
        "profileFetchedAt": "2019-08-24T14:15:22Z",
        "createdAt": "2019-08-24T14:15:22Z",
        "updatedAt": "2019-08-24T14:15:22Z"
      }
    }
  ]
}

属性

allOf

名称类型必选约束中文名说明
anonymousApiResponsefalsenonenone

and

名称类型必选约束中文名说明
anonymousobjectfalsenonenone
» data[Article]falsenonenone

RecommendedArticle

JSON
{
  "id": "string",
  "title": "string",
  "summary": "string",
  "author": {
    "id": 0,
    "name": "string",
    "color": "string",
    "ccfLevel": 0,
    "xcpcLevel": 0,
    "slogan": "string",
    "renderedIntroduction": "string",
    "prizes": [
      {}
    ],
    "profileFetchedAt": "2019-08-24T14:15:22Z",
    "createdAt": "2019-08-24T14:15:22Z",
    "updatedAt": "2019-08-24T14:15:22Z"
  },
  "updatedAt": "2019-08-24T14:15:22Z",
  "category": 0,
  "tags": [
    "string"
  ],
  "reason": "vector"
}

属性

名称类型必选约束中文名说明
idstringfalsenonenone
titlestringfalsenonenone
summarystringfalsenonenone
authorArticleAuthorfalsenonenone
updatedAtstring(date-time)falsenonenone
categoryintegerfalsenonenone
tags[string]falsenonenone
reasonstringfalsenonenone
枚举值
属性值
reasonvector
reasonrandom
reasonhot
reasonother
reasontitle

RecommendedArticleListResponse

JSON
{
  "code": 200,
  "message": "Success",
  "data": [
    {
      "id": "string",
      "title": "string",
      "summary": "string",
      "author": {
        "id": 0,
        "name": "string",
        "color": "string",
        "ccfLevel": 0,
        "xcpcLevel": 0,
        "slogan": "string",
        "renderedIntroduction": "string",
        "prizes": [
          null
        ],
        "profileFetchedAt": "2019-08-24T14:15:22Z",
        "createdAt": "2019-08-24T14:15:22Z",
        "updatedAt": "2019-08-24T14:15:22Z"
      },
      "updatedAt": "2019-08-24T14:15:22Z",
      "category": 0,
      "tags": [
        "string"
      ],
      "reason": "vector"
    }
  ]
}

属性

allOf

名称类型必选约束中文名说明
anonymousApiResponsefalsenonenone

and

名称类型必选约束中文名说明
anonymousobjectfalsenonenone
» data[RecommendedArticle]falsenonenone

Paste

JSON
{
  "id": "string",
  "content": "string",
  "renderedContent": "string",
  "authorId": 0,
  "deleted": true,
  "createdAt": "2019-08-24T14:15:22Z",
  "updatedAt": "2019-08-24T14:15:22Z",
  "deleteReason": "string",
  "contentHash": "string",
  "author": {
    "id": 0,
    "name": "string",
    "color": "string",
    "ccfLevel": 0,
    "xcpcLevel": 0,
    "slogan": "string",
    "renderedIntroduction": "string",
    "prizes": [
      {}
    ],
    "profileFetchedAt": "2019-08-24T14:15:22Z",
    "createdAt": "2019-08-24T14:15:22Z",
    "updatedAt": "2019-08-24T14:15:22Z"
  }
}

属性

名称类型必选约束中文名说明
idstringfalsenonenone
contentstringfalsenonenone
renderedContentstring¦nullfalsenonenone
authorIdintegerfalsenonenone
deletedbooleanfalsenonenone
createdAtstring(date-time)falsenonenone
updatedAtstring(date-time)falsenonenone
deleteReasonstringfalsenonenone
contentHashstring¦nullfalsenonenone
authorArticleAuthorfalsenonenone

PasteResponse

JSON
{
  "code": 200,
  "message": "Success",
  "data": {
    "id": "string",
    "content": "string",
    "renderedContent": "string",
    "authorId": 0,
    "deleted": true,
    "createdAt": "2019-08-24T14:15:22Z",
    "updatedAt": "2019-08-24T14:15:22Z",
    "deleteReason": "string",
    "contentHash": "string",
    "author": {
      "id": 0,
      "name": "string",
      "color": "string",
      "ccfLevel": 0,
      "xcpcLevel": 0,
      "slogan": "string",
      "renderedIntroduction": "string",
      "prizes": [
        {}
      ],
      "profileFetchedAt": "2019-08-24T14:15:22Z",
      "createdAt": "2019-08-24T14:15:22Z",
      "updatedAt": "2019-08-24T14:15:22Z"
    }
  }
}

属性

allOf

名称类型必选约束中文名说明
anonymousApiResponsefalsenonenone

and

名称类型必选约束中文名说明
anonymousobjectfalsenonenone
» dataPastefalsenonenone

TaskPayload

JSON
{
  "target": "string",
  "targetId": "string",
  "query": "string",
  "metadata": {}
}

属性

名称类型必选约束中文名说明
targetstringfalsenonenone
targetIdstringfalsenonenone
querystringfalsenonenone
metadataobjectfalsenonenone

TaskCreateRequest

JSON
{
  "type": "save",
  "payload": {
    "target": "string",
    "targetId": "string",
    "query": "string",
    "metadata": {}
  }
}

属性

名称类型必选约束中文名说明
typestringtruenonenone
payloadTaskPayloadtruenonenone
枚举值
属性值
typesave
typellm
typeupdate
typesearch
typeread
typerag

TaskCreateData

JSON
{
  "taskId": "string"
}

属性

名称类型必选约束中文名说明
taskIdstringtruenonenone

TaskCreateResponse

JSON
{
  "code": 200,
  "message": "Success",
  "data": {
    "taskId": "string"
  }
}

属性

allOf

名称类型必选约束中文名说明
anonymousApiResponsefalsenonenone

and

名称类型必选约束中文名说明
anonymousobjectfalsenonenone
» dataTaskCreateDatafalsenonenone

Task

JSON
{
  "id": "string",
  "info": "string",
  "status": 0,
  "createdAt": "2019-08-24T14:15:22Z",
  "type": "save",
  "payload": {
    "target": "string",
    "targetId": "string",
    "query": "string",
    "metadata": {}
  }
}

属性

名称类型必选约束中文名说明
idstringfalsenonenone
infostring¦nullfalsenonenone
statusintegerfalsenonenone
createdAtstring(date-time)falsenonenone
typestringfalsenonenone
payloadTaskPayloadfalsenonenone
枚举值
属性值
status0
status1
status2
status3
typesave
typellm
typeupdate
typesearch
typeread
typerag

TaskResponse

JSON
{
  "code": 200,
  "message": "Success",
  "data": {
    "id": "string",
    "info": "string",
    "status": 0,
    "createdAt": "2019-08-24T14:15:22Z",
    "type": "save",
    "payload": {
      "target": "string",
      "targetId": "string",
      "query": "string",
      "metadata": {}
    }
  }
}

属性

allOf

名称类型必选约束中文名说明
anonymousApiResponsefalsenonenone

and

名称类型必选约束中文名说明
anonymousobjectfalsenonenone
» dataTaskfalsenonenone

WorkflowCreateRequest

JSON
{}

属性

None

Workflow

JSON
{
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "rootJobId": "string",
  "queueName": "string",
  "status": "string",
  "result": null,
  "definition": {},
  "createdAt": "2019-08-24T14:15:22Z",
  "updatedAt": "2019-08-24T14:15:22Z"
}

属性

名称类型必选约束中文名说明
idstring(uuid)falsenonenone
rootJobIdstring¦nullfalsenonenone
queueNamestring¦nullfalsenonenone
statusstringfalsenonenone
resultnullfalsenonenone
definitionobjectfalsenonenone
createdAtstring(date-time)falsenonenone
updatedAtstring(date-time)falsenonenone

Censorship

JSON
{
  "createdAt": "2019-08-24T14:15:22Z",
  "rating": 0,
  "category": "string",
  "userDisplayMessage": "string"
}

属性

名称类型必选约束中文名说明
createdAtstring(date-time)falsenonenone
ratingintegerfalsenonenone
categorystringfalsenonenone
userDisplayMessagestringfalsenonenone

CensorshipResponse

JSON
{
  "code": 200,
  "message": "Success",
  "data": {
    "createdAt": "2019-08-24T14:15:22Z",
    "rating": 0,
    "category": "string",
    "userDisplayMessage": "string"
  }
}

属性

allOf

名称类型必选约束中文名说明
anonymousApiResponsefalsenonenone

and

名称类型必选约束中文名说明
anonymousobjectfalsenonenone
» dataCensorshipfalsenonenone

TokenVerifyRequest

JSON
{
  "uid": 0
}

属性

名称类型必选约束中文名说明
uidintegertruenonenone

TokenCreateRequest

JSON
{}

属性

None

TokenPermissionRequest

JSON
{
  "uid": 0,
  "role": 0
}

属性

名称类型必选约束中文名说明
uidintegertruenonenone
roleintegertruenonenone

TokenInspectData

JSON
{
  "uid": 0,
  "role": 0,
  "createdAt": "2019-08-24T14:15:22Z"
}

属性

名称类型必选约束中文名说明
uidintegerfalsenonenone
roleintegerfalsenonenone
createdAtstring(date-time)falsenonenone

TokenInspectResponse

JSON
{
  "code": 200,
  "message": "Success",
  "data": {
    "uid": 0,
    "role": 0,
    "createdAt": "2019-08-24T14:15:22Z"
  }
}

属性

allOf

名称类型必选约束中文名说明
anonymousApiResponsefalsenonenone

and

名称类型必选约束中文名说明
anonymousobjectfalsenonenone
» dataTokenInspectDatafalsenonenone

RegisteredUser

JSON
{
  "id": 0,
  "luoguUid": 0,
  "name": "string",
  "avatarUrl": "string",
  "createdAt": "2019-08-24T14:15:22Z",
  "updatedAt": "2019-08-24T14:15:22Z",
  "role": 0
}

属性

名称类型必选约束中文名说明
idintegerfalsenonenone
luoguUidintegerfalsenonenone
namestringfalsenonenone
avatarUrlstring¦nullfalsenonenone
createdAtstring(date-time)falsenonenone
updatedAtstring(date-time)falsenonenone
roleintegerfalsenonenone

AuthMeData

JSON
{
  "uid": 0,
  "role": 0,
  "registeredUser": {
    "id": 0,
    "luoguUid": 0,
    "name": "string",
    "avatarUrl": "string",
    "createdAt": "2019-08-24T14:15:22Z",
    "updatedAt": "2019-08-24T14:15:22Z",
    "role": 0
  }
}

属性

名称类型必选约束中文名说明
uidintegerfalsenonenone
roleintegerfalsenonenone
registeredUserRegisteredUserfalsenonenone

AuthMeResponse

JSON
{
  "code": 200,
  "message": "Success",
  "data": {
    "uid": 0,
    "role": 0,
    "registeredUser": {
      "id": 0,
      "luoguUid": 0,
      "name": "string",
      "avatarUrl": "string",
      "createdAt": "2019-08-24T14:15:22Z",
      "updatedAt": "2019-08-24T14:15:22Z",
      "role": 0
    }
  }
}

属性

allOf

名称类型必选约束中文名说明
anonymousApiResponsefalsenonenone

and

名称类型必选约束中文名说明
anonymousobjectfalsenonenone
» dataAuthMeDatafalsenonenone

UserProfile

JSON
{
  "id": 0,
  "name": "string",
  "color": "string",
  "ccfLevel": 0,
  "xcpcLevel": 0,
  "slogan": "string",
  "renderedIntroduction": "string",
  "prizes": [
    {}
  ],
  "profileFetchedAt": "2019-08-24T14:15:22Z",
  "profileStale": true,
  "createdAt": "2019-08-24T14:15:22Z",
  "updatedAt": "2019-08-24T14:15:22Z"
}

属性

名称类型必选约束中文名说明
idintegerfalsenonenone
namestringfalsenonenone
colorstringfalsenonenone
ccfLevelintegerfalsenonenone
xcpcLevelintegerfalsenonenone
sloganstring¦nullfalsenonenone
renderedIntroductionstring¦nullfalsenonenone
prizes[object]¦nullfalsenonenone
profileFetchedAtstring(date-time)¦nullfalsenonenone
profileStalebooleanfalsenonenone
createdAtstring(date-time)falsenonenone
updatedAtstring(date-time)falsenonenone

UserProfileResponse

JSON
{
  "code": 200,
  "message": "Success",
  "data": {
    "id": 0,
    "name": "string",
    "color": "string",
    "ccfLevel": 0,
    "xcpcLevel": 0,
    "slogan": "string",
    "renderedIntroduction": "string",
    "prizes": [
      {}
    ],
    "profileFetchedAt": "2019-08-24T14:15:22Z",
    "profileStale": true,
    "createdAt": "2019-08-24T14:15:22Z",
    "updatedAt": "2019-08-24T14:15:22Z"
  }
}

属性

allOf

名称类型必选约束中文名说明
anonymousApiResponsefalsenonenone

and

名称类型必选约束中文名说明
anonymousobjectfalsenonenone
» dataUserProfilefalsenonenone

UserRefreshData

JSON
{
  "taskId": "string"
}

属性

名称类型必选约束中文名说明
taskIdstringtruenonenone

UserRefreshResponse

JSON
{
  "code": 200,
  "message": "Success",
  "data": {
    "taskId": "string"
  }
}

属性

allOf

名称类型必选约束中文名说明
anonymousApiResponsefalsenonenone

and

名称类型必选约束中文名说明
anonymousobjectfalsenonenone
» dataUserRefreshDatafalsenonenone

ArticleSearchHit

JSON
{
  "id": "string",
  "title": "string",
  "summary": "string",
  "authorId": 0,
  "authorName": "string",
  "category": 0,
  "tags": [
    "string"
  ],
  "updatedAt": 0,
  "viewCount": 0,
  "priority": 0,
  "formatted": {}
}

属性

名称类型必选约束中文名说明
idstringfalsenonenone
titlestringfalsenonenone
summarystringfalsenonenone
authorIdintegerfalsenonenone
authorNamestringfalsenonenone
categoryintegerfalsenonenone
tags[string]falsenonenone
updatedAtintegerfalsenonenone
viewCountintegerfalsenonenone
priorityintegerfalsenonenone
formattedobject¦nullfalsenonenone

ArticleSearchData

JSON
{
  "hits": [
    {
      "id": "string",
      "title": "string",
      "summary": "string",
      "authorId": 0,
      "authorName": "string",
      "category": 0,
      "tags": [
        "string"
      ],
      "updatedAt": 0,
      "viewCount": 0,
      "priority": 0,
      "formatted": {}
    }
  ],
  "page": 0,
  "limit": 0,
  "total": 0,
  "processingTimeMs": 0
}

属性

名称类型必选约束中文名说明
hits[ArticleSearchHit]falsenonenone
pageintegerfalsenonenone
limitintegerfalsenonenone
totalintegerfalsenonenone
processingTimeMsintegerfalsenonenone

ArticleSearchResponse

JSON
{
  "code": 200,
  "message": "Success",
  "data": {
    "hits": [
      {
        "id": "string",
        "title": "string",
        "summary": "string",
        "authorId": 0,
        "authorName": "string",
        "category": 0,
        "tags": [
          null
        ],
        "updatedAt": 0,
        "viewCount": 0,
        "priority": 0,
        "formatted": {}
      }
    ],
    "page": 0,
    "limit": 0,
    "total": 0,
    "processingTimeMs": 0
  }
}

属性

allOf

名称类型必选约束中文名说明
anonymousApiResponsefalsenonenone

and

名称类型必选约束中文名说明
anonymousobjectfalsenonenone
» dataArticleSearchDatafalsenonenone

MarkdownRenderRequest

JSON
{
  "content": "string"
}

属性

名称类型必选约束中文名说明
contentstringfalsenonenone

MarkdownRenderData

JSON
{
  "html": "string"
}

属性

名称类型必选约束中文名说明
htmlstringtruenonenone

MarkdownRenderResponse

JSON
{
  "code": 200,
  "message": "Success",
  "data": {
    "html": "string"
  }
}

属性

allOf

名称类型必选约束中文名说明
anonymousApiResponsefalsenonenone

and

名称类型必选约束中文名说明
anonymousobjectfalsenonenone
» dataMarkdownRenderDatafalsenonenone

QueueStatsCounts

JSON
{
  "waiting": 0,
  "active": 0,
  "delayed": 0,
  "completed": 0,
  "failed": 0,
  "paused": 0,
  "prioritized": 0,
  "waitingChildren": 0
}

属性

名称类型必选约束中文名说明
waitingintegerfalsenonenone
activeintegerfalsenonenone
delayedintegerfalsenonenone
completedintegerfalsenonenone
failedintegerfalsenonenone
pausedintegerfalsenonenone
prioritizedintegerfalsenonenone
waitingChildrenintegerfalsenonenone

QueueStatsItem

JSON
{
  "name": "string",
  "taskType": "save",
  "label": "string",
  "concurrency": 0,
  "isPaused": true,
  "counts": {
    "waiting": 0,
    "active": 0,
    "delayed": 0,
    "completed": 0,
    "failed": 0,
    "paused": 0,
    "prioritized": 0,
    "waitingChildren": 0
  }
}

属性

名称类型必选约束中文名说明
namestringfalsenonenone
taskTypestringfalsenonenone
labelstringfalsenonenone
concurrencyintegerfalsenonenone
isPausedbooleanfalsenonenone
countsQueueStatsCountsfalsenonenone
枚举值
属性值
taskTypesave
taskTypellm
taskTypeupdate
taskTypesearch
taskTyperead
taskTyperag

QueueStatsData

JSON
{
  "generatedAt": "2019-08-24T14:15:22Z",
  "queuePoolSize": 0,
  "queues": [
    {
      "name": "string",
      "taskType": "save",
      "label": "string",
      "concurrency": 0,
      "isPaused": true,
      "counts": {
        "waiting": 0,
        "active": 0,
        "delayed": 0,
        "completed": 0,
        "failed": 0,
        "paused": 0,
        "prioritized": 0,
        "waitingChildren": 0
      }
    }
  ]
}

属性

名称类型必选约束中文名说明
generatedAtstring(date-time)falsenonenone
queuePoolSizeintegerfalsenonenone
queues[QueueStatsItem]falsenonenone

QueueStatsResponse

JSON
{
  "code": 200,
  "message": "Success",
  "data": {
    "generatedAt": "2019-08-24T14:15:22Z",
    "queuePoolSize": 0,
    "queues": [
      {
        "name": "string",
        "taskType": "[",
        "label": "string",
        "concurrency": 0,
        "isPaused": true,
        "counts": {}
      }
    ]
  }
}

属性

allOf

名称类型必选约束中文名说明
anonymousApiResponsefalsenonenone

and

名称类型必选约束中文名说明
anonymousobjectfalsenonenone
» dataQueueStatsDatafalsenonenone

AdminUsersResponse

JSON
{
  "code": 200,
  "message": "Success",
  "data": [
    {
      "id": 0,
      "luoguUid": 0,
      "name": "string",
      "avatarUrl": "string",
      "createdAt": "2019-08-24T14:15:22Z",
      "updatedAt": "2019-08-24T14:15:22Z",
      "role": 0
    }
  ]
}

属性

allOf

名称类型必选约束中文名说明
anonymousApiResponsefalsenonenone

and

名称类型必选约束中文名说明
anonymousobjectfalsenonenone
» data[RegisteredUser]falsenonenone

RoleUpdateRequest

JSON
{
  "role": 0
}

属性

名称类型必选约束中文名说明
roleintegertruenonenone

RoleUpdateData

JSON
{
  "uid": 0,
  "role": 0
}

属性

名称类型必选约束中文名说明
uidintegertruenonenone
roleintegertruenonenone

RoleUpdateResponse

JSON
{
  "code": 200,
  "message": "Success",
  "data": {
    "uid": 0,
    "role": 0
  }
}

属性

allOf

名称类型必选约束中文名说明
anonymousApiResponsefalsenonenone

and

名称类型必选约束中文名说明
anonymousobjectfalsenonenone
» dataRoleUpdateDatafalsenonenone

ReindexRequest

JSON
{
  "batchSize": 100
}

属性

名称类型必选约束中文名说明
batchSizeintegerfalsenonenone

SummaryRebuildRequest

JSON
{
  "batchSize": 20,
  "concurrency": 5
}

属性

名称类型必选约束中文名说明
batchSizeintegerfalsenonenone
concurrencyintegerfalsenonenone