更新-文章详情
PUT
/mp/v1_0/articles/{id}更新-文章详情
请求参数
Path 参数
id
string
文章id
示例值:
1553118539336908800
Query 参数
draft
string
可选
文章状态: true为草稿, false为发布(默认)
示例值:
false
Header 参数
Authorization
string
必需
Bearer token值字符串; 例如: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE2OTA0NTEwOTksInVzZXJfaWQiOjEsInJlZnJlc2giOmZhbHNlLCJ2ZXJpZmllZCI6dHJ1ZX0.-aXDyXCTJDWWybYBC2cGcbCGmymVt5w79h-_UlSX_yI
示例值:
{{HM_ACCESS_TOKEN}}
Body 参数application/json
id
string
文章id
title
string
文章标题
cover
object
文章封面对象
type
integer
文章封面类型
-1: 自动, 0:无图, 1:1张, 3:3张
images
array[string]
文章封面图片数组
channel_id
integer
文章频道id
content
string
文章内容
示例
{
"id": "1553118539336908800",
"title": "fsdfs文章标题啊",
"cover": {
"type": 1,
"images": [
"http://toutiao-img.itheima.net/FrIKSxY5YWFfkvZF_X7RM4q_lMWi"
]
},
"channel_id": 7,
"content": "<p>文章内容啊</p>"
}
示例代码
返回响应
成功(201)
HTTP 状态码: 201
内容格式: JSONapplication/json
数据结构
id
string
文章id
title
string
文章标题
校验: 5-30个字符
cover
object
文章封面对象
type
integer
文章封面类型
images
array[string]
文章图片地址
channel_id
integer
文章频道id
content
string
文章内容
示例
成功示例
{
"id": "1553118539336908800",
"title": "fsdfs文章标题啊",
"cover": {
"type": 1,
"images": [
"http://toutiao-img.itheima.net/FrIKSxY5YWFfkvZF_X7RM4q_lMWi"
]
},
"channel_id": 7,
"content": "<p>文章内容啊</p>"
}
最后修改时间: 3 年前