Get the tag list interface

API call address

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

illustrate:{域名地址}You need to replace it with your domain address, such as/api/tag/list

Calling methods

GET

Request parameters

Field name type Required illustrate
itemId int no Document ID, reads the tag list of the specified document. If not specified, all tags are read
letter string no First letter, specify the initial letter to get the specified tag collection
type string no Link form, default list, can be list|page, type=page, you can get total
page int no Get the specified page data, which is only valid when type=page
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".

Return parameters

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

data result item parameter

Field name type illustrate
id int Tag ID
title string Tag name
seo_title string Tag SEO title
url_token string Tag URL alias
keywords string Tag keywords
Description string Label introduction
first_letter string First letter
link string Link
created_time int Tag publish timestamp
updated_time int Tag update timestamp
status int Tag display status

Request data example

parameter value
itemId 1

Return to the data example

{
    "code": 0,
    "data": [
        {
            "id": 2,
            "created_time": 1662733318,
            "updated_time": 1662733318,
            "title": "安企CMS",
            "seo_title": "",
            "keywords": "",
            "url_token": "an-qi-cms",
            "description": "",
            "first_letter": "A",
            "status": 1,
            "link": "/tag/2/"
        },
        {
            "id": 1,
            "created_time": 1662733318,
            "updated_time": 1662733318,
            "title": "AnqiCMS",
            "seo_title": "",
            "keywords": "",
            "url_token": "anqicms",
            "description": "",
            "first_letter": "A",
            "status": 1,
            "link": "/tag/1/"
        }
    ],
    "msg": "",
    "total": 2
}

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