Get the document list interface

API call address

{域名地址}/api/archive/list

illustrate:{域名地址}You need to replace it with your domain address, such ashttps://en.anqicms.com/api/archive/list

Calling methods

GET

Request parameters

Field name type Required illustrate
id int no Document ID, required when fetching type=related
moduleId int no Model ID
parentId int no Parent document ID
categoryId string no Document category ID, multiple category IDs can be separated by commas
excludeCategoryId string no Excluded document category ID, multiple category IDs can be separated by commas
Order string no Sort by:id desc, supported fields are:id/views/category_id/created_time/updated_timewait
type int no Support buttonpage/list/relatedList method. The default value islistWhen type=“list”, only the specified limit of items will be displayed; if type=“page”, the total number of documents can be retrieved.
flag string no Recommended attributesflagThe supported property values are Headline [h], Recommended [c], Slider [f], Special Recommended [a], Scrolling [s], Bold [h], Image [p], and Jump [j]. To display the flag attribute as recommended, the tag is flag="c".
child boolean no Whether to display all subcategories documents, the supported attribute values ​​are false|true, and the default is true. If you want to display only documents belonging to the current category and do not include documents that are subcategorized, 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, and it pages by how many quantities, for example, if 'limit' is set to '10', only 10 items will be displayed. When 'limit' is not used in a pagination list, it supports the 'offset' mode, which is also known as comma-separated mode. If you want to start from the second item and retrieve 10 items, it can be set to 'limit'='2,10'.
q string no
Custom filter parameters string no

Return parameters

Field name type illustrate
code int Error code
msg string Error Cause Description
data object[] Results content
Total int Document count, returned only when type=page

data result item parameter

Field name type illustrate
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 Introduction
module_id int Document Model ID
category_id int Document Category ID
views int Document view count
comment_count int Document comments
images string[] Document group photo
logo string Document Logo
thumb string Document thumbnails
flag string Document recommendation attributes, headlines[h]recommended[c]slide[f]special recommendation[a]scroll[s]bold[h]pics[p]jump[j]
canonical_url string canonical url
fixed_link string Document Permalink
created_time int Document release timestamp
updated_time int Document update timestamp
status int Document display status
user_id int User ID
price int Price, unit points
stock int Inventory quantity
user_id int User ID
extra object Other fields information of the document
extra document other field information

extra Displayed based on model settings, field structure is key => item: key is the field name, item is the content:

Field name type illustrate
name string Field name
value string The value filled in
default string default value

Request data example

parameter value
moduleId 1
type page

Return to the 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 illustrate
0 OK
-1 Error, the error reason is indicated in msg
1001 Not logged in
1002 Unauthorized
200 API Request OK