API Call Address
{域名地址}/api/archive/list
Description:{域名地址}
Need to replace it with your domain address, such ashttps://en.anqicms.com/api/archive/list
Calling method
GET
Request parameters
Field name |
Type |
Required |
Description |
id |
int |
No |
Document ID, required when retrieving type=related |
moduleId |
int |
No |
Model ID |
parentId |
int |
No |
Parent document ID |
Category ID |
string |
No |
Document classification ID, multiple classification IDs can be separated by commas |
excludeCategoryId |
string |
No |
Excluded document category ID, multiple category IDs can be separated by commas |
order |
string |
No |
Sorting method, such as:id desc The supported fields include:id /views /category_id /created_time /updated_time etc |
type |
int |
No |
Supports sorting bypage /list /related method. The default value islist When type=“list”, only the specified limit number will be displayed. If type=“page”, the total number of documents can be obtained. |
flag |
string |
No |
recommended attributeflag The supported attribute values are Top Stories [h], Recommended [c], Slider [f], Special Recommendation [a], Scrolling [s], Bold [h], Image [p], and Link [j]. To display the flag attribute as recommended, the tag is flag="c" |
child |
boolean |
No |
Whether to display all child category documents, supported property values are false|true, default is true. If you only want to display documents belonging to the current category and not include documents from child categories, then you need to specify child=false |
page |
int |
No |
Specify the page content to be retrieved, only effective when type=‘page’ |
limit |
int |
No |
Display quantity, 'limit' can specify the display quantity, paginated by how many items, for example, 'limit="10"' will only display 10 items. When 'limit' is not used in a pagination list, it supports the 'offset' mode, which is the comma-separated mode. If you want to start from the second item and get 10 items, you can set it to 'limit="2,10"'. |
q |
string |
No |
Search keywords, 'q' is only effective when the list type is 'page', and it can specify the search content. If search content is needed, it can be displayed through the parameter 'q' to show the specified title search content containing the keywords, such as 'q="seo"'. The results will only display the list of titles containing the keyword 'seo'.The value can also be unspecified. If the query parameter 'q=' exists in the URL, the q keyword content will be automatically read and used for searching in the pagination list. |
Custom filter parameters |
string |
No |
The filter parameters are only effective when the list type is "page", such as in the additional automatic configuration of documents, where configurable filterable fields are set, these parameters can be used to complete parameter-based filtering of documents.If your document has set the filter to gender by default, with options such as Male, Female, Confidential, then you can search for documents where the gender field is Male by using the URL query parameter gender=Male. |
Return parameters
Field name |
Type |
Description |
code |
int |
error code |
msg |
string |
error reason description |
data |
object[] |
result content |
Total |
int |
Number of documents, returned only when type=page |
data result item parameters
Field name |
Type |
Description |
id |
int |
Document ID |
title |
string |
Document Title |
seo_title |
string |
Document SEO Title |
url_token |
string |
Document URL Alias |
Keywords |
string |
Document Keywords |
Description |
string |
Document Summary |
module_id |
int |
Document Model ID |
category_id |
int |
Document Category ID |
Views |
int |
Document Views |
Comment Count |
int |
Document comments count |
images |
string[] |
Document group image |
Logo |
string |
Document Logo |
Thumb |
string |
Document thumbnail |
flag |
string |
Document recommendation attributes, headline [h] recommended [c] featured [f] special [a] scrolling [s] bold [h] image [p] jump [j] |
canonical_url |
string |
canonical url |
fixed_link |
string |
document fixed link |
Created Time |
int |
document publish timestamp |
updated_time |
int |
Document update timestamp |
status |
int |
Document display status |
user_id |
int |
User ID |
price |
int |
Price, unit in cents |
stock |
int |
Inventory quantity |
user_id |
int |
User ID |
extra |
object |
Additional document fields information |
extra documentation other field information
extra Based on the model settings, the field structure is key => item:
key is the form field name, item is the content:
Field name |
Type |
Description |
name |
string |
Field Name |
Value |
string |
The entered value |
Default |
string |
Default Value |
request data example
Parameter |
Value |
moduleId |
1 |
type |
page |
Return Data Example
{
"code": 0,
"data": [
{
"id": 1,
"created_time": 1607308159,
"updated_time": 1662717106,
"title": "关于AnqiCMS",
"seo_title": "",
"url_token": "design",
"keywords": "",
"description": "安企内容管理系统(AnqiCMS),是一款使用 GoLang 开发的企业站内容管理系统,它部署简单,软件安全,界面优雅,小巧,执行速度飞快,使用 AnqiCMS 搭建的网站可以防止众多安全问题发生。",
"module_id": 1,
"category_id": 1,
"views": 1338,
"comment_count": 0,
"images": null,
"template": "",
"status": 1,
"canonical_url": "",
"fixed_link": "",
"flag": "",
"user_id": 0,
"price": 0,
"stock": 9999999,
"has_pseudo": 0,
"keyword_id": 0,
"origin_url": "",
"origin_title": "",
"category": null,
"module_name": "",
"data": null,
"logo": "https://en.anqicms.com/uploads/202012/7/bd36c37ef742c7be.webp",
"thumb": "https://en.anqicms.com/uploads/202012/7/thumb_bd36c37ef742c7be.webp",
"extra": {
"author": {
"name": "作者",
"value": "AnqiCMS",
"default": null
},
"certificate": {
"name": "学历",
"value": null,
"default": null
},
"city": {
"name": "城市",
"value": null,
"default": null
}
},
"link": "https://en.anqicms.com/design"
},
{
"id": 2,
"created_time": 1607308247,
"updated_time": 1611373941,
"title": "AnqiCMS使用帮助",
"seo_title": "",
"url_token": "help",
"keywords": "",
"description": "anqicms常见问题汇总",
"module_id": 1,
"category_id": 1,
"views": 1655,
"comment_count": 0,
"images": null,
"template": "",
"status": 1,
"canonical_url": "",
"fixed_link": "",
"flag": "",
"user_id": 0,
"price": 0,
"stock": 9999999,
"has_pseudo": 0,
"keyword_id": 0,
"origin_url": "",
"origin_title": "",
"category": null,
"module_name": "",
"data": null,
"logo": "https://en.anqicms.com/uploads/202012/7/bd36c37ef742c7be.webp",
"thumb": "https://en.anqicms.com/uploads/202012/7/thumb_bd36c37ef742c7be.webp",
"extra": null,
"link": "https://en.anqicms.com/help"
}
],
"msg": "",
"total": 2
}
Error Code
error code |
Description |
0 |
OK |
-1 |
Error, the reason is indicated in the msg |
1001 |
Not logged in |
1002 |
Unauthorized |
200 |
API request OK |