Skip to content

织信WebAPI

概述

如果你需要在自己的系统中访问织信应用中的数据,我们也为你提供了丰富的WebAPI, 你可以通过WebAPI来获取数据,并进行处理。

统一规范

统一使用UTF-8编码,请确保您的文件编码及传入参数的格式,接口所有请求方式均为POST

如何获取apiKey

在织信【工作台】>【应用管理】>【设置】>【生成API Key】 生成API Key

数据表操作

查询数据表列表

请求地址

https://next.informat.cn/web0/webapi/table_record_list

Body参数

名称类型是否必填描述
apiKeyString应用的Apikey
tableIdString数据表的标识符
pageIndexNumber页码,不传值时,默认为1
pageSizeNumber每页数量,不传值时,默认为50-1表示查询所有数据
filterFilterCondition过滤条件,不传值时,默认为{}
aggregationQueryListArray<AggregationQuery>聚合查询列表,不传值时,默认为[]
groupByListArray<String>分组字段列表,不传值时,不进行数据分组
excludeFieldsArray<String>返回值排除的字段标识符列表,不传递或传递空数组时查询全部字段
orderByListArray<OrderBy>排序方式列表,数组越靠前的排序优先级越高

返回值 返回查询的记录列表,类型为Array<Object>

示例1:通过条件过滤查询数据表

查询标识符为dataModelBasics的数据表中字段integerNum大于等于100的所有记录

json
{
  "apiKey": "ok3lluet8ni30ztwto0sj",
  "tableId": "dataModelBasics",
  "pageSize": -1,
  "filter": {
    "conditionList": [
      {
        "fieldId": "integerNum",
        "opt": "ge",
        "value": 100
      }
    ]
  }
}

返回示例

json
{
  "requestId": "b91d8upmbviqy",
  "message": "success",
  "code": 0,
  "data": {
    "recordList": [
      {
        "integerNum": 222,
        "id": "v4ln4hun0hzkc",
        "seq": 1,
        "singleText": "informat-next"
      },
      {
        "integerNum": 100,
        "id": "y9j5n6q86us1b",
        "seq": 2,
        "singleText": "informat"
      }
    ],
    "count": 2
  },
  "timestamp": 1740653036527,
  "remark": null
}

示例2:聚合查询数据表

聚合查询员工表(标识符为staffs)在职员工年龄的平均值

json
{
  "apiKey": "ok3lluet8ni30ztwto0sj",
  "tableId": "staffs",
  "pageSize": -1,
  "filter": {
    "conditionList": [
      {
        "fieldId": "status",
        "opt": "eq",
        "value": "onjob"
      }
    ]
  },
  "aggregationQueryList":[{
            "func": "avg",
            "fieldId": "age"
  }]
}

返回示例

json
{
    "requestId": "w6dvurgfs63lm",
    "message": "success",
    "code": 0,
    "data": {
        "recordList": [
            {
                "age_avg": 28.82
            }
        ],
        "count": 1
    },
    "timestamp": 1743310798279,
    "remark": null
}

通过ID查询数据表记录

请求地址

https://next.informat.cn/web0/webapi/table_record_get

Body参数

名称类型是否必填描述
apiKeyString应用的Apikey
tableIdString数据表的标识符
idString记录ID

返回值 返回查询的记录详情,类型为Object

Body示例

查询标识符为dataModelBasics的数据表中记录ID为v4ln4hun0hzkc的记录详情

json
{
  "apiKey": "ok3lluet8ni30ztwto0sj",
  "tableId": "dataModelBasics",
  "id": "v4ln4hun0hzkc"
}

返回示例

json
{
  "requestId": "b91d8upmbviqy",
  "message": "success",
  "code": 0,
  "data": {
        "integerNum": 222,
        "id": "v4ln4hun0hzkc",
        "seq": 1,
        "singleText": "informat-next"
  },
  "timestamp": 1740653036527,
  "remark": null
}

插入数据表记录

请求地址

https://next.informat.cn/web0/webapi/table_record_insert

Body参数

名称类型是否必填描述
apiKeyString应用的Apikey
tableIdString数据表的标识符
rowDataObject需要创建的记录

返回值 返回插入的记录,类型为Object

Body示例

json
{
  "apiKey": "ok3lluet8ni30ztwto0sj",
  "tableId": "dataModelBasics",
  "rowData": {
    "integerNum": 100,
    "singleText": "informat"
  }
}

返回示例

json
{
  "requestId": "wzrnibc1hrzh5",
  "message": "success",
  "code": 0,
  "data": {
    "id": "m0d77w6c8ptul",
    "seq": 1,
    "integerNum": 100,
    "singleText": "informat"
  },
  "timestamp": 1740653292358,
  "remark": null
}

批量插入数据表记录

请求地址

https://next.informat.cn/web0/webapi/table_record_batch_insert

Body参数

名称类型是否必填描述
apiKeyString应用的Apikey
tableIdString数据表的标识符
rowDataListArray<Object>需要创建的记录列表

返回值 返回插入的记录数,类型为Number

Body示例

json
{
  "apiKey": "ok3lluet8ni30ztwto0sj",
  "tableId": "dataModelBasics",
  "rowDataList": [
    {
      "integerNum": 100,
      "singleText": "informat"
    },
    {
      "integerNum": 200,
      "singleText": "informat"
    }
  ]
}

返回示例

json
{
  "requestId": "wzrnibc1hrzh5",
  "message": "success",
  "code": 0,
  "data": 2,
  "timestamp": 1740653292358,
  "remark": null
}

更新数据表记录

请求地址

https://next.informat.cn/web0/webapi/table_record_update

Body参数

名称类型是否必填描述
apiKeyString应用的Apikey
tableIdString数据表的标识符
rowDataObject需要更新的记录,必须包含id
updateFieldsArray<String>需要更新的字段标识符列表

返回值 返回更新的记录数,类型为Number

Body示例

json
{
  "apiKey": "ok3lluet8ni30ztwto0sj",
  "tableId": "dataModelBasics",
  "rowData": {
    "id": "m0d77w6c8ptul",
    "integerNum": 200
  },
  "updateFields": ["integerNum"]
}

返回示例

json
{
  "requestId": "wzrnibc1hrzh5",
  "message": "success",
  "code": 0,
  "data": 1,
  "timestamp": 1740653292358,
  "remark": null
}

批量更新数据表记录

请求地址

https://next.informat.cn/web0/webapi/table_record_batch_update

Body参数

名称类型是否必填描述
apiKeyString应用的Apikey
tableIdString数据表的标识符
rowDataListArray<Object>需要更新的记录列表,必须包含id

返回值 返回更新的记录数,类型为Number

Body示例

json
{
  "apiKey": "ok3lluet8ni30ztwto0sj",
  "tableId": "dataModelBasics",
  "rowDataList": [
    {
      "id": "m0d77w6c8ptul",
      "integerNum": 101,
      "singleText": "informat"
    },
    {
      "id": "d239lnruys24t",
      "integerNum": 102,
      "singleText": "informat"
    }
  ],
  "updateFields": ["integerNum", "singleText"]
}

返回示例

json
{
  "requestId": "wzrnibc1hrzh5",
  "message": "success",
  "code": 0,
  "data": 2,
  "timestamp": 1740653292358,
  "remark": null
}

删除数据表记录

请求地址

https://next.informat.cn/web0/webapi/table_record_delete

Body参数

名称类型是否必填描述
apiKeyString应用的Apikey
tableIdString数据表的标识符
idString记录ID

返回值 返回删除的记录数,类型为Number

Body示例

json
{
  "apiKey": "ok3lluet8ni30ztwto0sj",
  "tableId": "dataModelBasics",
  "id": "m0d77w6c8ptul"
}

返回示例

json
{
  "requestId": "wzrnibc1hrzh5",
  "message": "success",
  "code": 0,
  "data": 1,
  "timestamp": 1740653292358,
  "remark": null
}

批量删除数据表记录

请求地址

https://next.informat.cn/web0/webapi/table_record_batch_delete

Body参数

名称类型是否必填描述
apiKeyString应用的Apikey
tableIdString数据表的标识符
idListArray<String>需要删除的记录的ID列表

返回值 返回删除的记录数,类型为Number

Body示例

json
{
  "apiKey": "ok3lluet8ni30ztwto0sj",
  "tableId": "dataModelBasics",
  "idList": ["m0d77w6c8ptul","d239lnruys24t"]
}

返回示例

json
{
  "requestId": "wzrnibc1hrzh5",
  "message": "success",
  "code": 0,
  "data": 2,
  "timestamp": 1740653292358,
  "remark": null
}

应用设计

获取设计定义列表

请求地址

https://next.informat.cn/web0/webapi/app_define_object_list

Body参数

名称类型是否必填描述
apiKeyString应用的Apikey
nameString定义的名称,如数据表的名称等
typeString定义的类型

返回值 返回定义列表,类型为Array<DefineObject>

Body示例

json
{
  "apiKey": "jjw76elhtybxp3ew7gcay",
  "name": "数据表",
  "type": "Table"
}

返回示例

json
{
  "requestId": "adwvj2ianlqba",
  "message": "success",
  "code": 0,
  "data": [
    {
      "id": "zt2jjro99m7k1",
      "key": "zt2jjro99m7k1",
      "scope": "App",
      "name": "数据表",
      "displayName": null,
      "remark": "本模块详细介绍了织信的【仪表盘模块】如何配置数据表卡片。",
      "build": 4,
      "draftVersion": 3,
      "ignoreAddVersion": false,
      "isDeleted": false,
      "parentId": null,
      "parentName": null,
      "createUser": "王延峰",
      "updateUser": "skydu",
      "createTime": "Mon Aug 19 16:09:54 CST 2024",
      "updateTime": "Mon Feb 17 22:43:48 CST 2025",
      "type": "Dashboard",
      "icon": "line-chart",
      "iconColor": null,
      "textColor": null,
      "isHiddenWeb": false,
      "isHiddenMobile": false,
      "moduleHiddenVar": null,
      "bgColor": null,
      "disableNavBreadcrumb": false,
      "disableModuleTitle": false,
      "enableModuleTitleRichtext": false,
      "moduleTitleRichtext": null,
      "modulePadding": null,
      "moduleBorderRadius": null,
      ...
    }
  ],
  "timestamp": 1740653171798,
  "remark": null
}

获取设计定义

请求地址

https://next.informat.cn/web0/webapi/app_define_object_list

Body参数

名称类型是否必填描述
apiKeyString应用的Apikey
idString定义ID,例如,模块定义的ID为模块ID
scopeString作用域,App或其他定义ID。例如,查询数据表字段定义,作用域为数据表模块定义ID

返回值 返回定义列表,类型为Array<DefineObject>

Body示例

json
{
  "apiKey": "jjw76elhtybxp3ew7gcay",
  "id": "l69kzbnd1f048",
  "scope": "App"
}

返回示例

json
{
  "requestId": "r23fnl33hbdtl",
  "message": "success",
  "code": 0,
  "data": {
    "id": "l69kzbnd1f048",
    "key": "l69kzbnd1f048",
    "scope": "App",
    "name": "共享存储",
    "displayName": null,
    "remark": "织信对用户上传的文件统一采用基于S3协议的共享存储来保存,对应用内产生的数据根据不同场景会存储在不同的目录下。 共享存储会根据团队ID和应用ID隔离。",
    "build": 4,
    "draftVersion": 5,
    "ignoreAddVersion": false,
    "isDeleted": false,
    "parentId": null,
    "parentName": null,
    "updateUser": "skydu",
    "createTime": "Tue May 28 14:55:35 CST 2024",
    "updateTime": "Mon Feb 17 22:43:50 CST 2025",
    "type": "Dashboard",
    "icon": "line-chart",
    "iconColor": null,
    "textColor": null,
    "isHiddenWeb": false,
    "isHiddenMobile": false,
    "moduleHiddenVar": null,
    "bgColor": null,
    "disableNavBreadcrumb": false,
    "disableModuleTitle": false,
    "enableModuleTitleRichtext": false,
    "moduleTitleRichtext": null,
    "modulePadding": null,
    "moduleBorderRadius": null,
    ...
  },
  "timestamp": 1740652803611,
  "remark": null
}

应用管理

获取应用成员列表

请求地址

https://next.informat.cn/web0/webapi/app_member_list

Body参数

名称类型是否必填描述
apiKeyString应用的Apikey
accountIdListArray<String>账号ID列表
roleListArray<String>角色ID列表

返回值 返回应用成员列表,类型为Array<AppMemberVO>

Body示例

json
{
  "apiKey": "jjw76elhtybxp3ew7gcay",
  "roleList": ["admin","user"]
}

返回示例

json
{
    "requestId": "d5vsjebh205uu",
    "message": "success",
    "code": 0,
    "data": {
        "list": [
            {
                "accountId": "zhangsan",
                "rowNumber": 1742458050115,
                "roleList": [
                    "admin"
                ],
                "createTime": "2025-03-20T08:07:30.130+00:00",
                "accountName": "张三",
                "accountAvatar": "pic15.jpg",
                "accountHint": "zhangsan",
                "accountRemark": null,
                "departmentList": [
                    "jiaofubu"
                ]
            },
            {
                "accountId": "lisi",
                "rowNumber": 1741058789049,
                "roleList": [
                    "user"
                ],
                "createTime": "2025-03-04T03:26:29.052+00:00",
                "accountName": "李四",
                "accountAvatar": "pic16.png",
                "accountHint": "lisi",
                "accountRemark": null,
                "departmentList": [
                    "jsb"
                ]
            }
        ],
        "count": 2
    },
    "timestamp": 1742631942367,
    "remark": null
}

通过账号ID获取应用成员详情

请求地址

https://next.informat.cn/web0/webapi/app_member_get

Body参数

名称类型是否必填描述
apiKeyString应用的Apikey
accountIdString账号ID

返回值 返回应用成员列表,类型为Array<AppMemberVO>

Body示例

json
{
  "apiKey": "jjw76elhtybxp3ew7gcay",
  "accountId": "zhangsan"
}

返回示例

json
{
    "requestId": "rg60k9kala8l4",
    "message": "success",
    "code": 0,
    "data": {
        "accountId": "zhangsan",
        "rowNumber": 1740731380122,
        "roleList": [
            "admin"
        ],
        "createTime": "2025-02-28T08:29:40.125+00:00",
        "accountName": "张三",
        "accountAvatar": "pic15.jpg",
        "accountHint": "zhangsan",
        "accountRemark": null,
        "departmentList": [
            "jiaofubu"
        ]
    },
    "timestamp": 1742632106330,
    "remark": null
}