Get the model list interface

API call address

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

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

Calling methods

GET

Request parameters

none

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 Model ID
title string Model name
table_name string Attached table name
url_token string Model URL alias
is_system int Is the system built-in model
title_name string Title name
fields object[] Model custom field list
created_time int Model release timestamp
updated_time int Model update timestamp
status int Model display status

Model custom field field

Field name type illustrate
name string Field Chinese name
field_name string Field name
type string Field Type
required boolean Is it required
is_system boolean Is the system built-in fields
is_filter boolean Whether to filter parameters
Follow_level boolean Whether to follow the document reading level
content string default value

Request data example

none

Return to the data example

{
    "code": 0,
    "data": [
        {
            "id": 1,
            "created_time": 1689603570,
            "updated_time": 1689924577,
            "table_name": "article",
            "url_token": "news",
            "title": "文章中心",
            "fields": null,
            "is_system": 1,
            "title_name": "标题",
            "status": 1,
            "link": ""
        },
        {
            "id": 2,
            "created_time": 1689603570,
            "updated_time": 1702908648,
            "table_name": "product",
            "url_token": "product",
            "title": "产品中心",
            "fields": [
                {
                    "name": "产品参数",
                    "field_name": "canshu",
                    "type": "text",
                    "required": false,
                    "is_system": false,
                    "is_filter": false,
                    "follow_level": false,
                    "content": ""
                },
                {
                    "name": "批号",
                    "field_name": "pihao",
                    "type": "text",
                    "required": false,
                    "is_system": false,
                    "is_filter": false,
                    "follow_level": false,
                    "content": ""
                }
            ],
            "is_system": 1,
            "title_name": "产品名称",
            "status": 1,
            "link": ""
        },
    ],
    "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