{域名地址}/api/category/list
illustrate:{域名地址}
You need to replace it with your domain address, such as/api/category/list
GET
Field name |
type |
Required |
illustrate |
moduleId |
int |
no |
Model ID, you can get the classification list of the specified document model, such as moduleId="1" to get the classification list of the article model. |
parentId |
int |
no |
The superior classification can obtain the subcategory under the specified superior classification. When parentId="0", the top classification can be obtained. To obtain the top-level classification, you must specify the model ID moduleId |
limit |
int |
no |
To display quantity, limit can specify the display quantity and paging according to the number. For example, limit="10" will only display 10 pieces. When limit is not a paging list, it supports offset mode, that is, separating mode. If you want to obtain 10 pieces of data from item 2, you can set it to limit="2,10". |
Field name |
type |
illustrate |
code |
int |
Error code |
msg |
string |
Error Cause Description |
data |
object[] |
Results content |
Field name |
type |
illustrate |
id |
int |
Classification ID |
parent_id |
int |
Classification superior ID |
title |
string |
Category Name |
seo_title |
string |
Classified SEO titles |
url_token |
string |
Classified URL alias |
keywords |
string |
Classification keywords |
Description |
string |
Category Introduction |
module_id |
int |
Model ID |
content |
string |
Category content details |
type |
int |
Classification attribute value, 1 category, 3 single pages |
sort |
int |
Classification sorting values |
images |
string[] |
Classification Banner Chart |
logo |
string |
Classification thumbnails |
thumb |
string |
Classification thumbnails |
created_time |
int |
Classified publishing timestamp |
updated_time |
int |
Classification update timestamp |
status |
int |
Classification display status |
parameter |
value |
moduleId |
1 |
parentId |
0 |
{
"code": 0,
"data": [
{
"id": 1,
"created_time": 1607308159,
"updated_time": 1657761249,
"title": "AnqiCMS使用帮助",
"seo_title": "",
"keywords": "",
"url_token": "help",
"description": "",
"content": "<p><br/></p>",
"module_id": 1,
"parent_id": 0,
"type": 1,
"sort": 1,
"images": [],
"logo": "",
"status": 1,
"thumb": "/uploads/202012/7/bd36c37ef742c7be.webp",
},{
"id": 2,
"created_time": 1607308159,
"updated_time": 1657761249,
"title": "AnqiCMS模板手册",
"seo_title": "",
"keywords": "",
"url_token": "help",
"description": "",
"content": "<p><br/></p>",
"module_id": 1,
"parent_id": 0,
"type": 1,
"sort": 1,
"images": [],
"logo": "",
"status": 1,
"thumb": "/uploads/202012/7/bd36c37ef742c7be.webp",
}
],
"msg": ""
}
Error code |
illustrate |
0 |
OK |
-1 |
Error, the cause of the error is pointed out in msg |
1001 |
Not logged in |
1002 |
Unauthorized |
200 |
API request OK |