1. 文章
Blog-System
  • 认证
    • 用户注册
      POST
    • 用户登录
      POST
  • 文章
    • 获取文章列表
      GET
    • 创建文章
      POST
    • 获取文章详情
      GET
    • 更新文章
      PUT
    • 删除文章
      DELETE
    • 点赞/取消点赞文章
      POST
  • 评论
    • 获取评论列表
      GET
    • 创建评论
      POST
    • 回复评论
      POST
    • 点赞/取消点赞评论
      POST
  • 分类
    • 获取分类列表
      GET
    • 创建分类
      POST
  • 标签
    • 获取标签列表
      GET
    • 创建标签
      POST
  • 文件上传
    • 上传图片
      POST
  • 个人资料
    • 获取个人信息
      GET
    • 更新个人信息
      PUT
  • 管理员
    • 获取系统统计
      GET
    • 获取操作日志
      GET
  • 监控
    • 提交错误报告
  • 数据模型
    • Schemas
      • ApiResponse
      • ErrorResponse
      • User
      • Article
      • Category
      • Tag
      • Comment
      • PaginationResponse
      • RegisterRequest
      • LoginRequest
      • AuthResponse
      • CreateArticleRequest
      • CreateCategoryRequest
      • CreateTagRequest
      • UploadResponse
  1. 文章

更新文章

PUT
/articles/{id}
更新文章信息

请求参数

Authorization
JWT Bearer
在 Header 添加参数
Authorization
示例:
Authorization: ********************
or
Path 参数

Body 参数application/json必填

示例
{
    "title": "string",
    "content": "string",
    "summary": "string",
    "category_id": 0,
    "tag_ids": [
        0
    ],
    "status": "draft"
}

请求示例代码

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request PUT '/articles/' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
    "title": "string",
    "content": "string",
    "summary": "string",
    "category_id": 0,
    "tag_ids": [
        0
    ],
    "status": "draft"
}'

返回响应

🟢200成功
application/json
更新成功
Bodyapplication/json

示例
{
    "success": true,
    "message": "string",
    "data": {},
    "timestamp": "2019-08-24T14:15:22.123Z"
}
🟠403权限不足
🟠404未找到
修改于 2025-09-22 23:36:20
上一页
获取文章详情
下一页
删除文章
Built with