更新文档文章/目录/外链文章

创建于 2024-08-16 / 最近更新于 2024-08-19 / 123
字体: [默认] [大] [更大]

基本信息

接口地址: 您的域名/?m=ArticleApi&a=index

请求方式: PUT

Get参数请求

参数 示例值 类型 默认值 是否必填 描述
m ArticleApi string - 必填 控制器
a index string - 必填 方法

Header参数请求

参数 示例值 类型 默认值 是否必填 描述
Authorization base64(key:secret) string 必填

Body参数请求

请求方式: JSON


更新目录/外链文章的示例格式

示例格式:

{
  "id": "21",
  "aid": "227",
  "article_title": "API目录",
  "article_parent": "0",
  "article_node": "1",
  "using_api_tool": "0",
  "editor": "0",
  "article_listsort": "1",
  "article_mark": ""
}
参数 示例值 类型 默认值 是否必填 描述
id 21 string - 必填 文档ID (必须是字符串)
aid 227 string - 必填 文章/目录/外链文章ID (必须是字符串)
article_title API目录 string - 必填 文章/目录/外链文章的标题
article_parent 0 string - 必填 文章/目录/外链文章的父类节点
article_node 1 string - 必填 创建的类型 0: 文章 1:目录 2:外链文章
using_api_tool 0 string - 必填 是否开启API工具。0:暂停 1:启用 (建议选0)
editor 0 string - 必填 编辑器类型 0:富文本编辑器 1:MD编辑器
article_listsort 1 string - 非必填 文章/目录/外链文章排序值
article_mark - string - 非必填 文章的标记ID,留空则随机生成ID

更新文章的示例格式


富文本API格式

示例格式:

{
    "id": "21",
    "aid": "218",
    "article_title": "API文章",
    "article_parent": "0",
    "article_node": "0",
    "using_api_tool": "0",
    "editor": "0",
    "content": "<p>API文章示例内容</p>",
    "article_listsort": "0"
    "article_mark": ""
}
参数 示例值 类型 默认值 是否必填 描述
id 21 string - 必填 文档ID (必须是字符串)
aid 218 string - 必填 文章/目录/外链文章ID (必须是字符串)
article_title API目录 string - 必填 文章/目录/外链文章的标题
article_parent 0 string - 必填 文章/目录/外链文章的父类节点
article_node 0 string - 必填 创建的类型 0: 文章 1:目录 2:外链文章
using_api_tool 0 string - 必填 是否开启API工具。0:暂停 1:启用 (建议选0)
editor 0 string - 必填 编辑器类型 0:富文本编辑器 1:MD编辑器
content API文章示例内容 string - 必填 富文本的内容
article_listsort 0 string - 非必填 文章/目录/外链文章排序值
article_mark - string - 非必填 文章的标记ID,留空则随机生成ID

MD编辑器API格式

{
    "id": "21",
    "aid": "217",
    "article_title": "API文章",
    "article_parent": "0",
    "article_node": "0",
    "using_api_tool": "0",
    "editor": "1",
    "md": "我是MD编辑器",
    "html" : "<p>我是MD编辑器</p>",
    "article_listsort": "0",
    "article_mark": ""
}
参数 示例值 类型 默认值 是否必填 描述
id 21 string - 必填 文档ID (必须是字符串)
aid 217 string - 必填 文章/目录/外链文章ID (必须是字符串)
article_title API目录 string - 必填 文章/目录/外链文章的标题
article_parent 0 string - 必填 文章/目录/外链文章的父类节点
article_node 0 string - 必填 创建的类型 0: 文章 1:目录 2:外链文章
using_api_tool 0 string - 必填 是否开启API工具。0:暂停 1:启用 (建议选0)
editor 1 string - 必填 编辑器类型 0:富文本编辑器 1:MD编辑器
md 我是MD编辑器 string - 必填 MD编辑器的内容
html 我是MD编辑器 string - 必填 MD格式转HTML的内容,预留给切换用
article_listsort 0 string - 非必填 文章/目录/外链文章排序值
article_mark - string - 非必填 文章的标记ID,留空则随机生成ID

成功

成功时返回的结构

{
    "status": 200,
    "msg": "文档更新完成",
    "data": {
        "aid": "227",
        "url": "/?g=Doc&m=Article&a=index&id=21&aid=665082688499089408"
    },
    "url": "",
    "waitSecond": "3",
    "token": "82d1e057e76de436043d3129251d983d_8443128146570"
}

返回参数说明

参数 类型 描述
aid string 更新的文章/目录/外链文章ID
0 人点赞过