查询业务表Shema

此文章介绍如何通过API查询应用内业务表的名称、字段名称、字段类型、是否必填等Schema信息。

查询应用内全部业务表Schema

请求地址:https://api.hipacloud.com/v1/apps/{应用ID}/tables

请求方法:Get

接口描述:查询应用内全部业务表的Schema信息

示例请求:

curl -X GET 'https://api.hipacloud.com/v1/apps/{应用ID}/tables' -H "Authorization: Bearer {API Key}"

示例结果:

{
    "tables": [
        {
            "id": "608aa0df3909e3c5cca9c791",
            "name": "项目",
            "fields": [
                {
                    "id": "608aa0df3909e3c5cca9c792",
                    "name": "名称",
                    "type": "single_line_text",
                    "validations": {
                        "required": false
                    }
                },
                {
                    "id": "608aa15b5ef7cf132728417a",
                    "name": "开始日期",
                    "type": "date",
                    "validations": {
                        "required": false
                    }
                },
                {
                    "id": "608aa13d11222731ac1e1b19",
                    "name": "截止日期",
                    "type": "date",
                    "validations": {
                        "required": false
                    }
                },
                {
                    "id": "609cca90bdd6c63429bb7034",
                    "name": "状态",
                    "type": "formula",
                    "validations": {
                        "required": false
                    }
                },
                {
                    "id": "608aa24bfc1699789e07ec1b",
                    "name": "负责人",
                    "type": "member",
                    "validations": {
                        "required": false
                    }
                }
            ]
        },
        {
            "id": "608aa1a611222731ac1e1b1f",
            "name": "任务",
            "fields": [
                {
                    "id": "608aa1a611222731ac1e1b20",
                    "name": "名称",
                    "type": "single_line_text",
                    "validations": {
                        "required": false
                    }
                },
                {
                    "id": "609cc2b825dfef78884f04a5",
                    "name": "截止日期",
                    "type": "lookup",
                    "validations": {
                        "required": false
                    }
                },
                {
                    "id": "609cc2c926e6645d2225d2b5",
                    "name": "负责人",
                    "type": "member",
                    "validations": {
                        "required": false
                    }
                }
            ]
        }
    ]
}

查询应用内指定业务表Schema

请求地址:https://api.hipacloud.com/v1/apps/{应用ID}/tables/{业务表ID}

请求方法:Get

接口描述:查询应用内指定业务表的Schema信息

示例请求:

curl -X GET 'https://api.hipacloud.com/v1/apps/{应用ID}/tables/{业务表ID}' -H "Authorization: Bearer {API Key}"

示例结果:

{
    "fields": [
        {
            "id": "608aa0df3909e3c5cca9c792",
            "name": "名称",
            "type": "single_line_text",
            "validations": {
                "required": false
            }
        },
        {
            "id": "608aa15b5ef7cf132728417a",
            "name": "开始日期",
            "type": "date",
            "validations": {
                "required": false
            }
        },
        {
            "id": "608aa13d11222731ac1e1b19",
            "name": "截止日期",
            "type": "date",
            "validations": {
                "required": false
            }
        },
        {
            "id": "609cca90bdd6c63429bb7034",
            "name": "状态",
            "type": "formula",
            "validations": {
                "required": false
            }
        },
        {
            "id": "609cc9e837a85348bd4ca174",
            "name": "进度",
            "type": "formula",
            "validations": {
                "required": false
            }
        },
        {
            "id": "608aa24bfc1699789e07ec1b",
            "name": "负责人",
            "type": "member",
            "validations": {
                "required": false
            }
        }
    ]
}

字段类型码参照表

类型码 字段类型
singlelinetext 单行文本
paragraph_text 多行文本
numeric 数字
currency 货币
single_select 单项选择
multiple_select 多项选择
date 日期
check 勾选
url 网址
attachment 附件
member 成员
formula 公式
mobile 手机
email 邮箱
link_record 关联表
rollup 数据聚合
lookup 引用
autonumber 流水号
created_time 创建时间
lastmodifiedtime 修改时间
creator 创建人
last_editor 修改人

最后更新时间: 06月11日 15:00