Get Model Details Interface

API Call Address

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

Description:{域名地址}Need to replace it with your domain address, such ashttps://en.anqicms.com/api/module/detail

Calling method

GET

Request parameters

Field name Type Required Description
id int Yes Model ID, if filename is provided, ID is not required
filename string No Model URL alias, either model ID or filename is optional

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 Model ID
title string Model name
table_name string Additional table name
url_token string Model URL alias
is_system int Is system built-in model
title_name string Title Name
fields object[] Model Custom Field List
Created Time int Model Publish Timestamp
updated_time int Model Update Timestamp
status int Model display status

Model custom field field

Field name Type Description
name string Field Chinese name
field_name string Field Name
type string Field type
required boolean Is Required
is_system boolean Is system built-in field
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 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 Description
0 OK
-1 Error, the reason is indicated in the msg
1001 Not logged in
1002 Unauthorized
200 API request OK