Get Document Category Interface

API Call Address

{域名地址}/api/import/categories?token={token}

Description:{域名地址}Replace it with your domain address,{token}Replace it with the Token in the background content import interface function,https://en.anqicms.com/api/import/categories?token=xxx

Calling method

GET

Request parameters

Field name Type Required Description
token string Yes Token in the background content import interface feature
module_id int Yes Enter the category type to get, fill in a number, supported values: 1 Article, 2 Product

Return parameters

Field name Type Description
code int error code
msg string error reason description
data object result content

data parameter

Field name Type Description
id int Document ID
url string Document URL

request data example

Parameter Value
token 5d3c3f3a4c534b6a9b7816d241db69a7
module_id 1

Return Data Example

{
  "code": 200,
  "data": [
    {
      "id": 1,
      "parent_id": 0,
      "title": "golang实战教程"
    },
    {
      "id": 10,
      "parent_id": 0,
      "title": "安企CMS使用帮助"
    },
    {
      "id": 11,
      "parent_id": 10,
      "title": "安企CMS基础"
    },
    {
      "id": 13,
      "parent_id": 10,
      "title": "安企CMS模板制作"
    },
    {
      "id": 12,
      "parent_id": 10,
      "title": "安企CMS后台操作教程"
    }
  ],
  "msg": "获取成功"
}

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