Get the list information of all single pages, returning all published single page content in the system.
Points to note
- This interface uses the GET method
- No request parameters are required
- Return all published single-page lists
- Include basic information, SEO information, and content summary of single pages
Request address
{域名地址}/api/page/list
Description:{域名地址}Replace it with your domain name, such ashttps://en.anqicms.com/api/page/list
Request Syntax
GET {域名地址}/api/page/list
Request Headers
This interface also involves common request headers. For more information, please refer toCommon Request Headers (Common Request Headers).
Request parameters
None
Response header
This interface only involves public response headers. For more information, please refer toCommon Request Headers (Common Request Headers).
Return parameters
| Field name | Type | Description |
|---|---|---|
| code | int | Error code |
| msg | string | Error description |
| data | object[] | Single-page list array |
data result item parameter
| Field name | Type | Description |
|---|---|---|
| id | int | Single page ID |
| Title | string | Single page name |
| seo title | string | Single Page SEO Title |
| URL Token | string | Single Page URL Alias |
| keywords | string | Single Page Keywords |
| description | string | Single Page Introduction |
| content | string | Single Page Content Details |
| type | int | Single page attribute value, 1 single page, 3 single page |
| sort | int | Single page sorting value |
| Images | string array | Single page Banner image |
| Logo | string | Single page Logo |
| thumbnail | string | single page thumbnail |
| created_time | int | single page publish timestamp |
| updated_time | int | single page update timestamp |
| status | int | single page display status |
Usage Example
Request example
GET /api/page/list HTTP/1.1
Host: www.anqicms.com
Response Example
{
"code": 0,
"msg": "",
"data": [
{
"id": 1,
"created_time": 1607308159,
"updated_time": 1657761249,
"title": "关于AnqiCMS",
"seo_title": "",
"keywords": "",
"url_token": "about",
"description": "关于AnqiCMS的介绍",
"content": "<p>AnqiCMS是一个内容管理系统...</p>",
"type": 3,
"sort": 1,
"images": [],
"logo": "",
"status": 1,
"thumb": "https://en.anqicms.com/uploads/202012/7/bd36c37ef742c7be.webp"
},
{
"id": 2,
"created_time": 1607308159,
"updated_time": 1657761249,
"title": "联系AnqiCMS",
"seo_title": "",
"keywords": "",
"url_token": "contact",
"description": "联系AnqiCMS的方式",
"content": "<p>联系我们的方式...</p>",
"type": 3,
"sort": 2,
"images": [],
"logo": "",
"status": 1,
"thumb": "https://en.anqicms.com/uploads/202012/7/bd36c37ef742c7be.webp"
}
]
}
error code
| Error code | Description |
|---|---|
| 0 | OK |
| -1 | Error, the reason is indicated in msg |
| 1001 | Not logged in |
| 1002 | Not authorized |
| 200 | API request OK |