Get the model details interface

API call address

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

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

Calling methods

GET

Request parameters

Field name type Required illustrate
id int yes Model ID, if filename is passed, you don't need to pass the ID
filename string no Model URL alias, model ID, filename, choose one

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 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

parameter value
id 1

Return to the data example

{
    "code": 0,
    "data": {
            "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