Luogu Saver API

· · 个人记录

keywords: 保存站 API

luogu-saver-next Backend API

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

Base URLs:

Authentication

信息

GET 按文章 ID 查询文章

GET /article/query/{id}

请求参数

名称 位置 类型 必选 说明
id path string 是 none
User-Agent header string 否 none

返回示例

200 Response

{
  "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"
    }
  }
}

返回结果

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

GET 获取相关文章推荐

GET /article/relevant/{id}

请求参数

名称 位置 类型 必选 说明
id path string 是 none
User-Agent header string 否 none

返回示例

200 Response

{
  "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"
    }
  ]
}

返回结果

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

GET 获取文章历史记录

GET /article/history/{id}

请求参数

名称 位置 类型 必选 说明
id path string 是 none
User-Agent header string 否 none

返回示例

200 Response

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

返回结果

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

GET 获取最近更新文章列表

GET /article/recent

请求参数

名称 位置 类型 必选 说明
count query integer 否 none
updated_after query string(date-time) 否 none
truncated_count query integer 否 none
User-Agent header string 否 none

返回示例

200 Response

{
  "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"
      }
    }
  ]
}

返回结果

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

GET 获取文章总数

GET /article/count

请求参数

名称 位置 类型 必选 说明
User-Agent header string 否 none

返回示例

200 Response

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

返回结果

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

GET 获取广场推荐文章

GET /plaza/get

请求参数

名称 位置 类型 必选 说明
count query integer 否 none
exclude query string 否 none
x-device-id header string 否 none
x-consent-tracking header string 否 none
User-Agent header string 否 none

枚举值

属性 值
x-consent-tracking true
x-consent-tracking false

返回示例

200 Response

{
  "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"
    }
  ]
}

返回结果

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

GET 搜索文章

GET /search/articles

请求参数

名称 位置 类型 必选 说明
q query string 否 none
page query integer 否 none
limit query integer 否 none
category query integer 否 none
authorId query integer 否 none
User-Agent header string 否 none

返回示例

200 Response

{
  "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
  }
}

返回结果

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

GET 获取剪贴板总数

GET /paste/count

请求参数

名称 位置 类型 必选 说明
User-Agent header string 否 none

返回示例

200 Response

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

返回结果

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

GET 按剪贴板 ID 查询剪贴板

GET /paste/query/{id}

请求参数

名称 位置 类型 必选 说明
id path string 是 none
User-Agent header string 否 none

返回示例

200 Response

{
  "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"
    }
  }
}

返回结果

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

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

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

请求参数

名称 位置 类型 必选 说明
type path string 是 none
id path string 是 none
User-Agent header string 否 none

枚举值

属性 值
type article
type paste

返回示例

200 Response

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

返回结果

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

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

GET /user/{id}

请求参数

名称 位置 类型 必选 说明
id path integer 是 none
User-Agent header string 否 none

返回示例

200 Response

{
  "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"
  }
}

返回结果

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

GET 获取队列统计信息

GET /stats/queues

请求参数

名称 位置 类型 必选 说明
User-Agent header string 否 none

返回示例

200 Response

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

返回结果

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

任务(弃用)

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

POST /task/create

Body 请求参数

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

请求参数

名称 位置 类型 必选 说明
User-Agent header string 否 none
body body TaskCreateRequest 是 none

返回示例

200 Response

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

返回结果

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

GET 按任务 ID 查询任务

GET /task/query/{id}

请求参数

名称 位置 类型 必选 说明
id path string 是 none
User-Agent header string 否 none

返回示例

200 Response

{
  "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": {}
    }
  }
}

返回结果

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

工作流

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

POST /workflow/create

Body 请求参数

{}

请求参数

名称 位置 类型 必选 说明
User-Agent header string 否 none
body body WorkflowCreateRequest 是 none

返回示例

200 Response

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

返回结果

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

GET 按工作流 ID 查询工作流

GET /workflow/query/{id}

请求参数

名称 位置 类型 必选 说明
id path string(uuid) 是 none
User-Agent header string 否 none

返回示例

200 Response

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

返回结果

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

工作流/工作流模版

POST 按模板创建工作流

POST /workflow/create/template/{name}

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

Body 请求参数

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

请求参数

名称 位置 类型 必选 说明
name path string 是 模板名称。可用值:article-save-pipeline、paste-save-pipeline、article-censor-pipeline、rag-search-pipeline、article-summary-rebuild-pipeline、article-embedding-rebuild-pipeline、search-reindex-pipeline。
User-Agent header string 否 none
body body any 是 none

枚举值

属性 值
name article-save-pipeline
name paste-save-pipeline
name article-censor-pipeline
name rag-search-pipeline
name article-summary-rebuild-pipeline
name article-embedding-rebuild-pipeline
name search-reindex-pipeline

返回示例

200 Response

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

返回结果

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

POST 保存文章

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

Body 请求参数

{
    "targetId": "bb0oqx5p"
}

请求参数

名称 位置 类型 必选 说明
User-Agent header string 否 none
body body WorkflowTargetTemplateRequest 是 none

返回示例

200 Response

{
    "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"
        }
    }
}

返回结果

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

POST 保存剪贴板

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

Body 请求参数

{
    "targetId": "k4z9l3jg"
}

请求参数

名称 位置 类型 必选 说明
User-Agent header string 否 none
body body WorkflowTargetTemplateRequest 是 none

返回示例

200 Response

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

返回结果

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

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

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

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

Body 请求参数

{
    "targetId": "bb0oqx5p"
}

请求参数

名称 位置 类型 必选 说明
User-Agent header string 否 none
body body WorkflowTargetTemplateRequest 是 none

返回示例

200 Response

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

返回结果

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

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

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

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

Body 请求参数

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

请求参数

名称 位置 类型 必选 说明
User-Agent header string 否 none
body body RagSearchWorkflowTemplateRequest 是 none

返回示例

200 Response

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

返回结果

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

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

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

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

Body 请求参数

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

请求参数

名称 位置 类型 必选 说明
User-Agent header string 否 none
body body RebuildWorkflowTemplateRequest 是 none

返回示例

200 Response

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

返回结果

状态码 状态码含义 说明 数据模型
200 OK 工作流创建结果 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 请求参数

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

请求参数

名称 位置 类型 必选 说明
User-Agent header string 否 none
body body RebuildWorkflowTemplateRequest 是 none

返回示例

200 Response

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

返回结果

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

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

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

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

Body 请求参数

{
    "batchSize": 100
}

请求参数

名称 位置 类型 必选 说明
User-Agent header string 否 none
body body SearchReindexWorkflowTemplateRequest 是 none

返回示例

200 Response

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

返回结果

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

用户与鉴权

GET 获取当前登录用户

GET /auth/me

请求参数

名称 位置 类型 必选 说明
User-Agent header string 否 none

返回示例

200 Response

{
  "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
    }
  }
}

返回结果

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

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

POST /token/create

Body 请求参数

{}

请求参数

名称 位置 类型 必选 说明
User-Agent header string 否 none
body body TokenCreateRequest 否 none

返回示例

200 Response

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

返回结果

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

POST 准备洛谷验证信息

POST /token/verify

Body 请求参数

{
  "uid": 0
}

请求参数

名称 位置 类型 必选 说明
User-Agent header string 否 none
body body TokenVerifyRequest 是 none

返回示例

200 Response

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

返回结果

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

GET 发起 CP OAuth 登录

GET /auth/cp/login

请求参数

名称 位置 类型 必选 说明
redirect query string 否 none
User-Agent header string 否 none

返回示例

200 Response

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

返回结果

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

GET 处理 CP OAuth 回调

GET /auth/cp/callback

请求参数

名称 位置 类型 必选 说明
code query string 否 none
state query string 否 none
error query string 否 none
error_description query string 否 none
User-Agent header string 否 none

返回结果

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

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

GET /token/inspect

请求参数

名称 位置 类型 必选 说明
User-Agent header string 否 none

返回示例

200 Response

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

返回结果

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

POST 派发用户资料刷新任务

POST /user/{id}/refresh

请求参数

名称 位置 类型 必选 说明
id path integer 是 none
User-Agent header string 否 none

返回示例

200 Response

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

返回结果

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

utils

POST 渲染 Markdown 为 HTML

POST /markdown/render

Body 请求参数

{
  "content": "string"
}

请求参数

名称 位置 类型 必选 说明
User-Agent header string 否 none
body body MarkdownRenderRequest 是 none

返回示例

200 Response

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

返回结果

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

admin

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

POST /token/permission

Body 请求参数

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

请求参数

名称 位置 类型 必选 说明
User-Agent header string 否 none
body body TokenPermissionRequest 是 none

返回示例

200 Response

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

返回结果

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

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

GET /admin/users

请求参数

名称 位置 类型 必选 说明
User-Agent header string 否 none

返回示例

200 Response

{
  "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
    }
  ]
}

返回结果

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

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

PATCH /admin/users/{uid}/role

Body 请求参数

{
  "role": 0
}

请求参数

名称 位置 类型 必选 说明
uid path integer 是 none
User-Agent header string 否 none
body body RoleUpdateRequest 是 none

返回示例

200 Response

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

返回结果

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

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

POST /admin/search/reindex

Body 请求参数

{
  "batchSize": 100
}

请求参数

名称 位置 类型 必选 说明
User-Agent header string 否 none
body body ReindexRequest 否 none

返回示例

200 Response

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

返回结果

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

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

POST /admin/articles/summary/rebuild

Body 请求参数

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

请求参数

名称 位置 类型 必选 说明
User-Agent header string 否 none
body body SummaryRebuildRequest 否 none

返回示例

200 Response

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

返回结果

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

数据模型

ApiResponse

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

属性

名称 类型 必选 约束 中文名 说明
code integer true none none
message string true none none
data null true none none

WorkflowTemplateRequest

{
  "targetId": "stringst"
}

属性

oneOf

名称 类型 必选 约束 中文名 说明
anonymous WorkflowTargetTemplateRequest false none none

xor

名称 类型 必选 约束 中文名 说明
anonymous RagSearchWorkflowTemplateRequest false none none

xor

名称 类型 必选 约束 中文名 说明
anonymous RebuildWorkflowTemplateRequest false none none

xor

名称 类型 必选 约束 中文名 说明
anonymous SearchReindexWorkflowTemplateRequest false none none

CountData

{
  "count": 0
}

属性

名称 类型 必选 约束 中文名 说明
count integer true none none

WorkflowTargetTemplateRequest

{
  "targetId": "stringst"
}

属性

名称 类型 必选 约束 中文名 说明
targetId string true none 目标 id none

CountResponse

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

属性

allOf

名称 类型 必选 约束 中文名 说明
anonymous ApiResponse false none none

and

名称 类型 必选 约束 中文名 说明
anonymous object false none none
» data CountData false none none

RagSearchWorkflowTemplateRequest

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

属性

名称 类型 必选 约束 中文名 说明
query string true none 查询内容 none
limit integer false none 每次检索返回数量 none
maxArticles integer false none 上下文最大文章数 none
maxChars integer false none 上下文最大字符数 none
articleIds [string] false none 固定纳入上下文的文章 id 列表 none

ArticleAuthor

{
  "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"
}

属性

名称 类型 必选 约束 中文名 说明
id integer false none none
name string false none none
color string false none none
ccfLevel integer false none none
xcpcLevel integer false none none
slogan string¦null false none none
renderedIntroduction string¦null false none none
prizes [object]¦null false none none
profileFetchedAt string(date-time)¦null false none none
createdAt string(date-time) false none none
updatedAt string(date-time) false none none

RebuildWorkflowTemplateRequest

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

属性

名称 类型 必选 约束 中文名 说明
batchSize integer false none 批大小 none
concurrency integer false none 并发数 none

Article

{
  "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"
  }
}

属性

名称 类型 必选 约束 中文名 说明
id string false none none
title string false none none
content string false none none
renderedContent string¦null false none none
authorId integer false none none
category integer false none none
upvote integer false none none
favorCount integer false none none
solutionForPid string¦null false none none
priority integer false none none
deleted boolean false none none
tags [string] false none none
createdAt string(date-time) false none none
updatedAt string(date-time) false none none
deleteReason string¦null false none none
contentHash string¦null false none none
viewCount integer false none none
summary string¦null false none none
author ArticleAuthor false none none

SearchReindexWorkflowTemplateRequest

{
  "batchSize": 100
}

属性

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

ArticleResponse

{
  "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

名称 类型 必选 约束 中文名 说明
anonymous ApiResponse false none none

and

名称 类型 必选 约束 中文名 说明
anonymous object false none none
» data Article false none none

WorkflowResponse

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

属性

名称 类型 必选 约束 中文名 说明
code integer true none none
message string true none none
data object true none none
» workflowId string true none none
» rootJobId string true none none
» taskIds object true none none
»» additionalProperties string false none none
» reportTaskIds object true none none
»» additionalProperties string false none none

ArticleListResponse

{
  "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

名称 类型 必选 约束 中文名 说明
anonymous ApiResponse false none none

and

名称 类型 必选 约束 中文名 说明
anonymous object false none none
» data [Article] false none none

RecommendedArticle

{
  "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"
}

属性

名称 类型 必选 约束 中文名 说明
id string false none none
title string false none none
summary string false none none
author ArticleAuthor false none none
updatedAt string(date-time) false none none
category integer false none none
tags [string] false none none
reason string false none none

枚举值

属性 值
reason vector
reason random
reason hot
reason other
reason title

RecommendedArticleListResponse

{
  "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

名称 类型 必选 约束 中文名 说明
anonymous ApiResponse false none none

and

名称 类型 必选 约束 中文名 说明
anonymous object false none none
» data [RecommendedArticle] false none none

Paste

{
  "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"
  }
}

属性

名称 类型 必选 约束 中文名 说明
id string false none none
content string false none none
renderedContent string¦null false none none
authorId integer false none none
deleted boolean false none none
createdAt string(date-time) false none none
updatedAt string(date-time) false none none
deleteReason string false none none
contentHash string¦null false none none
author ArticleAuthor false none none

PasteResponse

{
  "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

名称 类型 必选 约束 中文名 说明
anonymous ApiResponse false none none

and

名称 类型 必选 约束 中文名 说明
anonymous object false none none
» data Paste false none none

TaskPayload

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

属性

名称 类型 必选 约束 中文名 说明
target string false none none
targetId string false none none
query string false none none
metadata object false none none

TaskCreateRequest

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

属性

名称 类型 必选 约束 中文名 说明
type string true none none
payload TaskPayload true none none

枚举值

属性 值
type save
type llm
type update
type search
type read
type rag

TaskCreateData

{
  "taskId": "string"
}

属性

名称 类型 必选 约束 中文名 说明
taskId string true none none

TaskCreateResponse

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

属性

allOf

名称 类型 必选 约束 中文名 说明
anonymous ApiResponse false none none

and

名称 类型 必选 约束 中文名 说明
anonymous object false none none
» data TaskCreateData false none none

Task

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

属性

名称 类型 必选 约束 中文名 说明
id string false none none
info string¦null false none none
status integer false none none
createdAt string(date-time) false none none
type string false none none
payload TaskPayload false none none

枚举值

属性 值
status 0
status 1
status 2
status 3
type save
type llm
type update
type search
type read
type rag

TaskResponse

{
  "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

名称 类型 必选 约束 中文名 说明
anonymous ApiResponse false none none

and

名称 类型 必选 约束 中文名 说明
anonymous object false none none
» data Task false none none

WorkflowCreateRequest

{}

属性

None

Workflow

{
  "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"
}

属性

名称 类型 必选 约束 中文名 说明
id string(uuid) false none none
rootJobId string¦null false none none
queueName string¦null false none none
status string false none none
result null false none none
definition object false none none
createdAt string(date-time) false none none
updatedAt string(date-time) false none none

Censorship

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

属性

名称 类型 必选 约束 中文名 说明
createdAt string(date-time) false none none
rating integer false none none
category string false none none
userDisplayMessage string false none none

CensorshipResponse

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

属性

allOf

名称 类型 必选 约束 中文名 说明
anonymous ApiResponse false none none

and

名称 类型 必选 约束 中文名 说明
anonymous object false none none
» data Censorship false none none

TokenVerifyRequest

{
  "uid": 0
}

属性

名称 类型 必选 约束 中文名 说明
uid integer true none none

TokenCreateRequest

{}

属性

None

TokenPermissionRequest

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

属性

名称 类型 必选 约束 中文名 说明
uid integer true none none
role integer true none none

TokenInspectData

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

属性

名称 类型 必选 约束 中文名 说明
uid integer false none none
role integer false none none
createdAt string(date-time) false none none

TokenInspectResponse

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

属性

allOf

名称 类型 必选 约束 中文名 说明
anonymous ApiResponse false none none

and

名称 类型 必选 约束 中文名 说明
anonymous object false none none
» data TokenInspectData false none none

RegisteredUser

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

属性

名称 类型 必选 约束 中文名 说明
id integer false none none
luoguUid integer false none none
name string false none none
avatarUrl string¦null false none none
createdAt string(date-time) false none none
updatedAt string(date-time) false none none
role integer false none none

AuthMeData

{
  "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
  }
}

属性

名称 类型 必选 约束 中文名 说明
uid integer false none none
role integer false none none
registeredUser RegisteredUser false none none

AuthMeResponse

{
  "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

名称 类型 必选 约束 中文名 说明
anonymous ApiResponse false none none

and

名称 类型 必选 约束 中文名 说明
anonymous object false none none
» data AuthMeData false none none

UserProfile

{
  "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"
}

属性

名称 类型 必选 约束 中文名 说明
id integer false none none
name string false none none
color string false none none
ccfLevel integer false none none
xcpcLevel integer false none none
slogan string¦null false none none
renderedIntroduction string¦null false none none
prizes [object]¦null false none none
profileFetchedAt string(date-time)¦null false none none
profileStale boolean false none none
createdAt string(date-time) false none none
updatedAt string(date-time) false none none

UserProfileResponse

{
  "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

名称 类型 必选 约束 中文名 说明
anonymous ApiResponse false none none

and

名称 类型 必选 约束 中文名 说明
anonymous object false none none
» data UserProfile false none none

UserRefreshData

{
  "taskId": "string"
}

属性

名称 类型 必选 约束 中文名 说明
taskId string true none none

UserRefreshResponse

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

属性

allOf

名称 类型 必选 约束 中文名 说明
anonymous ApiResponse false none none

and

名称 类型 必选 约束 中文名 说明
anonymous object false none none
» data UserRefreshData false none none

ArticleSearchHit

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

属性

名称 类型 必选 约束 中文名 说明
id string false none none
title string false none none
summary string false none none
authorId integer false none none
authorName string false none none
category integer false none none
tags [string] false none none
updatedAt integer false none none
viewCount integer false none none
priority integer false none none
formatted object¦null false none none

ArticleSearchData

{
  "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] false none none
page integer false none none
limit integer false none none
total integer false none none
processingTimeMs integer false none none

ArticleSearchResponse

{
  "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

名称 类型 必选 约束 中文名 说明
anonymous ApiResponse false none none

and

名称 类型 必选 约束 中文名 说明
anonymous object false none none
» data ArticleSearchData false none none

MarkdownRenderRequest

{
  "content": "string"
}

属性

名称 类型 必选 约束 中文名 说明
content string false none none

MarkdownRenderData

{
  "html": "string"
}

属性

名称 类型 必选 约束 中文名 说明
html string true none none

MarkdownRenderResponse

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

属性

allOf

名称 类型 必选 约束 中文名 说明
anonymous ApiResponse false none none

and

名称 类型 必选 约束 中文名 说明
anonymous object false none none
» data MarkdownRenderData false none none

QueueStatsCounts

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

属性

名称 类型 必选 约束 中文名 说明
waiting integer false none none
active integer false none none
delayed integer false none none
completed integer false none none
failed integer false none none
paused integer false none none
prioritized integer false none none
waitingChildren integer false none none

QueueStatsItem

{
  "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
  }
}

属性

名称 类型 必选 约束 中文名 说明
name string false none none
taskType string false none none
label string false none none
concurrency integer false none none
isPaused boolean false none none
counts QueueStatsCounts false none none

枚举值

属性 值
taskType save
taskType llm
taskType update
taskType search
taskType read
taskType rag

QueueStatsData

{
  "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
      }
    }
  ]
}

属性

名称 类型 必选 约束 中文名 说明
generatedAt string(date-time) false none none
queuePoolSize integer false none none
queues [QueueStatsItem] false none none

QueueStatsResponse

{
  "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

名称 类型 必选 约束 中文名 说明
anonymous ApiResponse false none none

and

名称 类型 必选 约束 中文名 说明
anonymous object false none none
» data QueueStatsData false none none

AdminUsersResponse

{
  "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

名称 类型 必选 约束 中文名 说明
anonymous ApiResponse false none none

and

名称 类型 必选 约束 中文名 说明
anonymous object false none none
» data [RegisteredUser] false none none

RoleUpdateRequest

{
  "role": 0
}

属性

名称 类型 必选 约束 中文名 说明
role integer true none none

RoleUpdateData

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

属性

名称 类型 必选 约束 中文名 说明
uid integer true none none
role integer true none none

RoleUpdateResponse

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

属性

allOf

名称 类型 必选 约束 中文名 说明
anonymous ApiResponse false none none

and

名称 类型 必选 约束 中文名 说明
anonymous object false none none
» data RoleUpdateData false none none

ReindexRequest

{
  "batchSize": 100
}

属性

名称 类型 必选 约束 中文名 说明
batchSize integer false none none

SummaryRebuildRequest

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

属性

名称 类型 必选 约束 中文名 说明
batchSize integer false none none
concurrency integer false none none