| Request method | Request address |
| PUT | https://api.helplook.net/api/content/:id |
| Content-Type | application/json |
:id The category/article ID to be updated
Parameter description:
body type: application/json
| Parameter name | type | Required | illustrate |
| name | string | yes | Article/Column Name |
| content | string | yes | Article content/section description |
| matedata | string | no | |
| status | int | yes | Release status: 1-Published, 2-Draft, 3-Pending (Does not affect online content) |
| editor_type | int | yes | Editor type: 2-Markdown, 3-Rich text editor |
| parent_id | int | no | If the parent ID is not passed, it will not be modified. |
The metadata types are as follows:
| Parameter name | type | Required | illustrate |
| slug | string | no | Article path |
| cover | string | no | Cover URL or Base64 |
| seo_title | string | no | SEO Title |
| seo_keyword | string | no | SEO keywords |
| seo_desc | string | no | SEO Description |
| author | string | no | Article author |
| cover_alt | string | no | Blog cover description |
| desc | string | no | Blog Summary |
| tags | string[] | no | Array of tag names |
body: application/json
Example: Update article
{
"name": "测试文章2",
"parent_id": "8164683",
"content": "hello world",
"status": "1",
"editor_type": "3"
"metadata": {
// "slug": "ceshi",
// "cover": "https://x.jpg",
// "seo_title": "seo标题",
// "seo_keyword": "seo关键词",
// "seo_desc": "seo描述",
// "tags": ["产品", "指南"],
// "author": "张三",
// "cover_alt": "产品功能封面",
// "article_detail": "介绍产品的主要功能"
}
}CURL example:
curl --location --request PUT 'https://api.helplook.net/api/content/8161504' \
--header 'x-api-key: API KEY' \
--header 'Content-Type: application/json' \
--header 'Accept: */*' \
--header 'Connection: keep-alive' \
--data-raw '{
"name": "新文章名",
"content": "<h1>hello world2</h1>",
"status": "1",
"editor_type": "3"
}'response:
| Parameter name | |
| id | Article ID |
| string_id | Article string id |
| status | Article status: 1-Published (online) 2-Draft (offline) |
type | Type: 1-Section 2-Article |
| id | The ID of this Q&A session (Q&A record ID) |
| name | Article/Column Name |
| slug | The article can be found at https://sitedomain/docs/:slug |
| add_time | Creation time |
| update_time | Update time |
| content | Published article content (article content seen by online visitors) |
draft_content | Unpublished or draft content |
Response example:
{
"data": {
"id": "8161504",
"string_id": "vuLVJ8",
"status": "1",
"is_del": "0",
"type": "2",
"name": "新文章名",
"slug": "11-yong-hu-xin-xi-mu-ban-s4eQ",
"add_time": "1725517672",
"update_time": "1734420390",
"content": {
"content_id": "8161504",
"content": "<h1>hello world2</h1>",
"pure_content": "hello world2",
"is_draft": "0",
"editor_type": "3",
"file_path": "",
"add_time": "1725517673",
"update_time": "1734420390"
},
"draft_content": {
"content_id": "8161504",
"content": "<h1>hello world2</h1>",
"pure_content": "hello world2",
"is_draft": "0",
"editor_type": "3",
"file_path": "",
"add_time": "1725517673",
"update_time": "1734420390"
}
},
"msg": "Success",
"code": 200
}