# 获取内容 API

获取内容,使用 GET 发起请求,请求地址为 /api/v1/contents/{siteId}/{channelId}/{id}

GET /api/v1/contents/{siteId}/{channelId}/{id}

# 请求 URI

参数名 位置 类型 必填 说明
siteId path 整数 站点Id
channelId path 整数 栏目Id
id path 整数 内容Id
apiKey query 字符串 API 密钥,请参考身份认证

# 返回

名称 类型 说明
200 OK Content 内容
401 Unauthorized Error 认证错误
404 NotFound Error 资源不存在错误
400 BadRequest Error 参数错误

# 示例

# 请求示例

GET /api/v1/contents/1/1/2
Content-Type: application/json
X-SS-API-KEY: 7cd22002-27a7-4c5d-ba4d-a1c108a20eaf

# 返回示例

{
    "imageUrlCount": 0,
    "videoUrlCount": 0,
    "fileUrlCount": 0,
    "content": "内容正文",
    "channelId": 1,
    "siteId": 1,
    "adminId": 1,
    "lastEditAdminId": 0,
    "userId": 0,
    "taxis": 1,
    "groupNames": [],
    "tagNames": [],
    "sourceId": 0,
    "referenceId": 0,
    "templateId": 0,
    "checked": true,
    "checkedLevel": 1,
    "hits": 0,
    "downloads": 0,
    "title": "标题",
    "subTitle": "",
    "imageUrl": "",
    "videoUrl": "",
    "fileUrl": "",
    "body": "",
    "summary": "",
    "author": "",
    "source": "",
    "top": false,
    "recommend": false,
    "hot": false,
    "color": false,
    "linkType": "None",
    "linkUrl": null,
    "addDate": "2024-02-29 09:29:21",
    "id": 3,
    "guid": "0967b1a3-2170-40e7-8971-8cefc69891bd",
    "createdDate": "2024-02-29 09:29:22",
    "lastModifiedDate": "2024-04-02 09:13:22"
}
上次更新: 2024/4/2 上午9:18:25