修改文章
开发中
PUT
http://localhost:8098/admin/post
请求参数
Authorization
在 Header 添加参数
Authorization
,其值为在 Bearer 之后拼接 Token示例:
Authorization: Bearer ********************
Body 参数application/json
postId
integer
文章 ID
title
string
文章标题
<= 256 字符
autoGenerateExcerpt
boolean | null
是否自动生成摘要
默认值:
false
excerpt
string | null
文章摘要
<= 1024 字符
slug
string
文章别名
<= 128 字符
allowComment
boolean
是否允许评论
status
enum<string>
状态
枚举值:
PUBLISHEDDRAFT
visible
enum<string>
可见性
枚举值:
VISIBLEHIDDEN
categoryId
integer | null
分类 ID
tagIds
array[integer] | null
标签 ID 数组
cover
string | null
封面
<= 512 字符
pinned
boolean | null
是否置顶
默认值:
false
encrypted
boolean | null
文章是否加密
password
string | null
文章密码
<= 64 字符
示例
{
"postId": 0,
"title": "string",
"autoGenerateExcerpt": "false",
"excerpt": "string",
"slug": "string",
"allowComment": true,
"status": "PUBLISHED",
"visible": "VISIBLE",
"categoryId": 0,
"tagIds": [
0
],
"cover": "string",
"pinned": "false",
"encrypted": true,
"password": "string"
}
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request PUT 'http://localhost:8098/admin/post' \
--header 'Content-Type: application/json' \
--data-raw ''
返回响应
🟢200成功
application/json
Body
code
integer
必需
errMsg
null
必需
data
boolean
必需
示例
{
"code": 200,
"errMsg": null,
"data": true
}
修改于 2024-04-24 09:32:10