Get the document classification interface

API call address

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

illustrate:{域名地址}Need to replace it with your domain address.{token}Need to be replaced with the token in the background content import interface function, such as/api/import/categories?token=xxx

Calling methods

GET

Request parameters

Field name type Required illustrate
token string yes Token in the background content import interface function
module_id int yes Classification type to obtain, fill in the number, supported values: 1 article, 2 products

Return parameters

Field name type illustrate
code int Error code
msg string Error Cause Description
data object Results content

Data parameters

Field name type illustrate
id int Document ID
url string Document URL

Request data example

parameter value
token 4712a54b4c456bb29b7816d241db69a7
module_id 1

Return to the 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 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