博客

博客属性

属性名
说明
类型
必填

id

[number]

title

标题

[string]

summary

摘要

[string]

content

内容/正文

[string]

cover_id

封面id

[number]

author

作者

[string]

seo_title

seo标题

[string]

seo_description

seo描述

[string]

seo_slug

seo slug

[string]

status

状态:1-隐藏,2-可见

[number]

visible_at

可见时间

[string]

created_at

创建时间

[string]

updated_at

更新时间

[string]

public_url

预览url

[string]

path

路径

[string]

cover

关联封面

[object]

collections

分类集合

[array]

{
    "data": [{
        "id": "",
        "title": "标题",
        "summary": "摘要",
        "content": "内容/正文",
        "cover_id": "封面id",
        "author": "作者",
        "seo_title": "seo标题",
        "seo_description": "seo描述",
        "seo_slug": "seo slug",
        "status": "状态:1-隐藏,2-可见",
        "visible_at": "可见时间",
        "created_at": "创建时间",
        "updated_at": "更新时间",
        "public_url": "预览url",
        "path": "路径",
        "cover": {
            "ID": "",
            "url": "",
            "thumbnail": "",
            "medium": "",
            "big": "",
            "srcset": ""
        },
        "collections": [{
            "id": "",
            "title": "标题",
            "description": "描述",
            "seo_title": "seo标题",
            "seo_description": "seo描述",
            "seo_slug": "seo slug",
            "created_at": "",
            "updated_at": "",
            "blogs_count": "博客数量",
            "pivot": {
                "blog_id": "",
                "collection_id": ""
            }
        }]
    }]
    "meta": {
        "current_page": "当前页码",
        "from": "当前页起始条数号",
        "last_page": "尾页页码",
        "path": "分页基本url",
        "per_page": "每页显示条数",
        "to": "当前页结束条数号",
        "total": "数据总数"
    },
    "links": {
        "first": "首页url",
        "last": "尾页url",
        "prev": "上一页url",
        "next": "下一页url"
    }
}

删除博客

DELETE /openapi/2024-10/blogs/{id}

权限要求:write_content

Query Parameters

Name
Type
Description

id

String

博客id

博客列表

GET /openapi/2024-10/blogs

权限要求:read_content

Query Parameters

Name
Type
Description

page

[string]

页码:有填写分页,不填写获取所有

sort

[string]

排序

include

[string]

包含关联,例如:collections

filter[exclude_ids]

[string]

排除ids,例如:18,22

filter[key]

[string]

关键字

filter[status]

[string]

状态

添加博客

POST /openapi/2024-10/blogs

权限要求:write_content

Request Body

Name
Type
Description

seo_slug

String

seo slug

seo_description

String

seo描述

seo_title

String

seo标题

author

String

作者

cover_id

Number

封面id

content

String

内容/正文

summary

String

摘要

title

String

标题

collection_ids

Array

专辑集合id

visible_at

Datetime

可见时间

博客详情

GET /openapi/2024-10/blogs/{id}

权限要求:read_content

Query Parameters

Name
Type
Description

id

String

博客id

更新博客

PUT /openapi/2024-10/blogs/{id}

权限要求:write_content

Query Parameters

Name
Type
Description

id

String

博客id

Request Body

Name
Type
Description

summary

String

摘要

title

String

标题

content

String

内容/正文

cover_id

Number

封面id

author

String

作者

seo_title

String

seo标题

seo_description

String

seo描述

seo_slug

String

seo slug

visible_at

Datetime

可见时间

collection_ids

Array

专辑集合id

博客批量操作

POST /openapi/2024-10/blogs/batch

权限要求:write_content

Request Body

Name
Type
Description

ids

Array

博客ids

select_all

Boolean

是否选择全部

operate*

Object

操作

filter[status]

String

状态

filter[key]

String

关键字

Last updated