fxapi-data-management
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinese数据管理技能
Data Management Skill
是提供的命令行程序,所有操作通过执行fx-api-cli命令完成。fx-api-cli
通过 与数据管理系统交互。
fx-api-cli data <接口名> '<json入参>'is the provided command line program, all operations are completed by executing thefx-api-clicommand.fx-api-cli
Interact with the data management system via .
fx-api-cli data <interface name> '<json input parameters>'接口列表
API List
app.entry.data.get — 查询单条数据接口
app.entry.data.get — Single Data Query Interface
bash
fx-api-cli data get '{"app_id": "59264073a2a60c0c08e20bfb", "entry_id": "59264073a2a60c0c08e20bfd", "data_id": "59e9a2fe283ffa7c11b1ddbf"}'通过查询单条数据接口,可以查询表单中的指定数据。需要指定应用 ID、表单 ID 和数据 ID。
bash
fx-api-cli data get '{"app_id": "59264073a2a60c0c08e20bfb", "entry_id": "59264073a2a60c0c08e20bfd", "data_id": "59e9a2fe283ffa7c11b1ddbf"}'With the single data query interface, you can query the specified data in the form. You need to specify the application ID, form ID and data ID.
app.entry.data.list — 查询多条数据接口
app.entry.data.list — Multiple Data Query Interface
bash
fx-api-cli data list '{"app_id": "59264073a2a60c0c08e20bfb", "entry_id": "59264073a2a60c0c08e20bfd", "limit": 100, "fields": ["_widget_1508400000001", "_widget_1508400000002"]}'通过查询多条数据接口,可以一次查询表单中的多条数据。支持分页、字段过滤和条件过滤。
bash
fx-api-cli data list '{"app_id": "59264073a2a60c0c08e20bfb", "entry_id": "59264073a2a60c0c08e20bfd", "limit": 100, "fields": ["_widget_1508400000001", "_widget_1508400000002"]}'With the multiple data query interface, you can query multiple pieces of data in the form at one time. It supports pagination, field filtering and conditional filtering.
app.entry.data.create — 新建单条数据接口
app.entry.data.create — Single Data Creation Interface
bash
fx-api-cli data create '{"app_id": "59264073a2a60c0c08e20bfb", "entry_id": "59264073a2a60c0c08e20bfd", "data": {"_widget_1432728651402": {"value": "Saas"}, "_widget_1432728651403": {"value": 100}}}'通过新建单条数据接口,可以向指定的表单中添加单条数据。需要指定应用 ID、表单 ID 和数据内容。
bash
fx-api-cli data create '{"app_id": "59264073a2a60c0c08e20bfb", "entry_id": "59264073a2a60c0c08e20bfd", "data": {"_widget_1432728651402": {"value": "Saas"}, "_widget_1432728651403": {"value": 100}}}'With the single data creation interface, you can add a single piece of data to the specified form. You need to specify the application ID, form ID and data content.
app.entry.data.batch_create — 新建多条数据接口
app.entry.data.batch_create — Multiple Data Batch Creation Interface
bash
fx-api-cli data batch_create '{"app_id": "59264073a2a60c0c08e20bfb", "entry_id": "59264073a2a60c0c08e20bfd", "data_list": [{"_widget_1432728651402": {"value": "Saas 1"}, "_widget_1432728651403": {"value": 100}}, {"_widget_1432728651402": {"value": "Saas 2"}, "_widget_1432728651403": {"value": 200}}]}'通过新建多条数据接口,可以向指定的表单中添加多条数据。需要指定应用 ID、表单 ID 和数据列表。
bash
fx-api-cli data batch_create '{"app_id": "59264073a2a60c0c08e20bfb", "entry_id": "59264073a2a60c0c08e20bfd", "data_list": [{"_widget_1432728651402": {"value": "Saas 1"}, "_widget_1432728651403": {"value": 100}}, {"_widget_1432728651402": {"value": "Saas 2"}, "_widget_1432728651403": {"value": 200}}]}'With the multiple data batch creation interface, you can add multiple pieces of data to the specified form. You need to specify the application ID, form ID and data list.
app.entry.data.update — 更新单条数据接口
app.entry.data.update — Single Data Update Interface
bash
fx-api-cli data update '{"app_id": "59264073a2a60c0c08e20bfb", "entry_id": "59264073a2a60c0c08e20bfd", "data_id": "59e9a2fe283ffa7c11b1ddbf", "data": {"_widget_1432728651402": {"value": "Updated Saas"}, "_widget_1432728651403": {"value": 200}}}'通过更新单条数据接口,可以更新表单中的指定数据。需要指定应用 ID、表单 ID、数据 ID 和更新的数据内容。
bash
fx-api-cli data update '{"app_id": "59264073a2a60c0c08e20bfb", "entry_id": "59264073a2a60c0c08e20bfd", "data_id": "59e9a2fe283ffa7c11b1ddbf", "data": {"_widget_1432728651402": {"value": "Updated Saas"}, "_widget_1432728651403": {"value": 200}}}'With the single data update interface, you can update the specified data in the form. You need to specify the application ID, form ID, data ID and the updated data content.
app.entry.data.batch_update — 批量更新数据接口
app.entry.data.batch_update — Batch Data Update Interface
bash
fx-api-cli data batch_update '{"app_id": "59264073a2a60c0c08e20bfb", "entry_id": "59264073a2a60c0c08e20bfd", "data_list": [{"data_id": "59e9a2fe283ffa7c11b1ddbf", "data": {"_widget_1432728651402": {"value": "Updated Saas 1"}}}, {"data_id": "59e9a2fe283ffa7c11b1ddbe", "data": {"_widget_1432728651402": {"value": "Updated Saas 2"}}}]}'通过批量更新数据接口,可以批量更新表单中的多条数据。需要指定应用 ID、表单 ID 和数据列表。
bash
fx-api-cli data batch_update '{"app_id": "59264073a2a60c0c08e20bfb", "entry_id": "59264073a2a60c0c08e20bfd", "data_list": [{"data_id": "59e9a2fe283ffa7c11b1ddbf", "data": {"_widget_1432728651402": {"value": "Updated Saas 1"}}}, {"data_id": "59e9a2fe283ffa7c11b1ddbe", "data": {"_widget_1432728651402": {"value": "Updated Saas 2"}}}]}'With the batch data update interface, you can update multiple pieces of data in the form in batches. You need to specify the application ID, form ID and data list.
app.entry.data.delete — 删除单条数据接口
app.entry.data.delete — Single Data Deletion Interface
bash
fx-api-cli data delete '{"app_id": "59264073a2a60c0c08e20bfb", "entry_id": "59264073a2a60c0c08e20bfd", "data_id": "59e9a2fe283ffa7c11b1ddbf"}'通过删除单条数据接口,可以删除表单中的指定数据。需要指定应用 ID、表单 ID 和数据 ID。
bash
fx-api-cli data delete '{"app_id": "59264073a2a60c0c08e20bfb", "entry_id": "59264073a2a60c0c08e20bfd", "data_id": "59e9a2fe283ffa7c11b1ddbf"}'With the single data deletion interface, you can delete the specified data in the form. You need to specify the application ID, form ID and data ID.
app.entry.data.batch_delete — 批量删除数据接口
app.entry.data.batch_delete — Batch Data Deletion Interface
bash
fx-api-cli data batch_delete '{"app_id": "59264073a2a60c0c08e20bfb", "entry_id": "59264073a2a60c0c08e20bfd", "data_id_list": ["59e9a2fe283ffa7c11b1ddbf", "59e9a2fe283ffa7c11b1ddbe"]}'通过批量删除数据接口,可以批量删除表单中的多条数据。需要指定应用 ID、表单 ID 和数据 ID 列表。
bash
fx-api-cli data batch_delete '{"app_id": "59264073a2a60c0c08e20bfb", "entry_id": "59264073a2a60c0c08e20bfd", "data_id_list": ["59e9a2fe283ffa7c11b1ddbf", "59e9a2fe283ffa7c11b1ddbe"]}'With the batch data deletion interface, you can delete multiple pieces of data in the form in batches. You need to specify the application ID, form ID and data ID list.
app.entry.data.batch_hard_delete — 批量硬删除数据接口
app.entry.data.batch_hard_delete — Batch Hard Data Deletion Interface
bash
fx-api-cli data batch_hard_delete '{"app_id": "59264073a2a60c0c08e20bfb", "entry_id": "59264073a2a60c0c08e20bfd", "data_id_list": ["59e9a2fe283ffa7c11b1ddbf", "59e9a2fe283ffa7c11b1ddbe"]}'通过批量硬删除数据接口,可以批量硬删除表单中的多条数据。需要指定应用 ID、表单 ID 和数据 ID 列表。
bash
fx-api-cli data batch_hard_delete '{"app_id": "59264073a2a60c0c08e20bfb", "entry_id": "59264073a2a60c0c08e20bfd", "data_id_list": ["59e9a2fe283ffa7c11b1ddbf", "59e9a2fe283ffa7c11b1ddbe"]}'With the batch hard data deletion interface, you can hard delete multiple pieces of data in the form in batches. You need to specify the application ID, form ID and data ID list.
核心规则
Core Rules
数据 ID 查找规则
Data ID Lookup Rules
- 当用户需要操作数据但未提供数据 ID 时:
- 调用 获取数据列表(需要先确定应用 ID 和表单 ID)
app.entry.data.list - 根据用户提供的条件(如关键字、时间范围等)过滤数据
- 匹配策略:
- 精确匹配唯一结果:直接使用
- 模糊匹配多个结果:展示候选列表让用户选择
- 无匹配结果:告知用户未找到
- 调用
- When the user needs to operate data but does not provide the data ID:
- Call to get the data list (you need to confirm the application ID and form ID first)
app.entry.data.list - Filter data according to the conditions provided by the user (such as keywords, time range, etc.)
- Matching strategy:
- Exact match with unique result: use directly
- Fuzzy match with multiple results: display the candidate list for the user to choose
- No matching result: inform the user that no data is found
- Call
数据创建规则
Data Creation Rules
- 必填字段:根据表单配置,确保所有必填字段都有值
- 数据格式:确保数据格式符合字段类型要求
- 工作流触发:如需触发工作流,设置
is_start_workflow: true
- Required fields: Ensure all required fields have values according to the form configuration
- Data format: Ensure the data format meets the requirements of the field type
- Workflow trigger: If you need to trigger a workflow, set
is_start_workflow: true
数据更新规则
Data Update Rules
- 部分更新:只需要提供需要更新的字段
- 数据格式:确保更新的数据格式符合字段类型要求
- Partial update: Only need to provide the fields that need to be updated
- Data format: Ensure the updated data format meets the requirements of the field type
数据删除规则
Data Deletion Rules
- 软删除:默认使用软删除,数据仍可在回收站中恢复
- 硬删除:使用批量硬删除接口,数据将被永久删除,无法恢复
- 删除确认:删除操作前必须向用户确认
- Soft delete: Soft delete is used by default, and the data can still be recovered in the recycle bin
- Hard delete: Use the batch hard delete interface, the data will be permanently deleted and cannot be recovered
- Deletion confirmation: You must confirm with the user before performing the deletion operation
典型工作流
Typical Workflows
查询单条数据
Query Single Data
用户query示例:
- "帮我查询指定数据"
- "查看这条数据的详情"
执行流程:
- 通过 应用 ID 查找规则 确定目标应用的
app_id - 通过 表单 ID 查找规则 确定目标表单的
entry_id - 通过 数据 ID 查找规则 确定目标数据的
data_id - 调用 获取数据详情
app.entry.data.get - 展示数据的所有字段值
Example user query:
- "Help me query the specified data"
- "View the details of this data"
Execution process:
- Confirm the of the target application through Application ID Lookup Rules
app_id - Confirm the of the target form through Form ID Lookup Rules
entry_id - Confirm the of the target data through Data ID Lookup Rules
data_id - Call to get the data details
app.entry.data.get - Display all field values of the data
查询多条数据
Query Multiple Data
用户query示例:
- "帮我查询表单的所有数据"
- "查看最近的10条数据"
- "查询满足条件的数据"
执行流程:
- 通过 应用 ID 查找规则 确定目标应用的
app_id - 通过 表单 ID 查找规则 确定目标表单的
entry_id - 确定查询参数(分页、字段过滤、条件过滤)
- 调用 获取数据列表
app.entry.data.list - 展示数据列表,包括每条数据的关键字段值
- 若 为
has_more,告知用户还有更多数据可继续查看true
Example user query:
- "Help me query all data of the form"
- "View the latest 10 pieces of data"
- "Query data that meets the conditions"
Execution process:
- Confirm the of the target application through Application ID Lookup Rules
app_id - Confirm the of the target form through Form ID Lookup Rules
entry_id - Confirm query parameters (pagination, field filtering, conditional filtering)
- Call to get the data list
app.entry.data.list - Display the data list, including the key field values of each piece of data
- If is
has_more, inform the user that there is more data available for further viewingtrue
新建单条数据
Create Single Data
用户query示例:
- "帮我在表单中添加一条数据"
- "创建新数据"
执行流程:
- 通过 应用 ID 查找规则 确定目标应用的
app_id - 通过 表单 ID 查找规则 确定目标表单的
entry_id - 收集用户提供的数据内容
- 调用 创建数据
app.entry.data.create - 展示创建结果,包括新数据的 ID
Example user query:
- "Help me add a piece of data to the form"
- "Create new data"
Execution process:
- Confirm the of the target application through Application ID Lookup Rules
app_id - Confirm the of the target form through Form ID Lookup Rules
entry_id - Collect the data content provided by the user
- Call to create the data
app.entry.data.create - Display the creation result, including the ID of the new data
批量新建数据
Batch Create Data
用户query示例:
- "帮我批量添加多条数据"
- "导入数据"
执行流程:
- 通过 应用 ID 查找规则 确定目标应用的
app_id - 通过 表单 ID 查找规则 确定目标表单的
entry_id - 收集用户提供的数据列表
- 调用 批量创建数据
app.entry.data.batch_create - 展示创建结果,包括成功创建的数量和数据 ID 列表
Example user query:
- "Help me add multiple pieces of data in batches"
- "Import data"
Execution process:
- Confirm the of the target application through Application ID Lookup Rules
app_id - Confirm the of the target form through Form ID Lookup Rules
entry_id - Collect the data list provided by the user
- Call to create data in batches
app.entry.data.batch_create - Display the creation result, including the number of successfully created data and the data ID list
更新数据
Update Data
用户query示例:
- "帮我更新这条数据"
- "修改数据内容"
执行流程:
- 通过 应用 ID 查找规则 确定目标应用的
app_id - 通过 表单 ID 查找规则 确定目标表单的
entry_id - 通过 数据 ID 查找规则 确定目标数据的
data_id - 收集用户提供的更新内容
- 调用 更新数据
app.entry.data.update - 展示更新结果
Example user query:
- "Help me update this piece of data"
- "Modify data content"
Execution process:
- Confirm the of the target application through Application ID Lookup Rules
app_id - Confirm the of the target form through Form ID Lookup Rules
entry_id - Confirm the of the target data through Data ID Lookup Rules
data_id - Collect the updated content provided by the user
- Call to update the data
app.entry.data.update - Display the update result
批量更新数据
Batch Update Data
用户query示例:
- "帮我批量更新多条数据"
- "批量修改数据"
执行流程:
- 通过 应用 ID 查找规则 确定目标应用的
app_id - 通过 表单 ID 查找规则 确定目标表单的
entry_id - 收集用户提供的数据 ID 列表和更新内容
- 调用 批量更新数据
app.entry.data.batch_update - 展示更新结果
Example user query:
- "Help me update multiple pieces of data in batches"
- "Modify data in batches"
Execution process:
- Confirm the of the target application through Application ID Lookup Rules
app_id - Confirm the of the target form through Form ID Lookup Rules
entry_id - Collect the data ID list and updated content provided by the user
- Call to update data in batches
app.entry.data.batch_update - Display the update result
删除数据
Delete Data
用户query示例:
- "帮我删除这条数据"
- "移除数据"
执行流程:
- 通过 应用 ID 查找规则 确定目标应用的
app_id - 通过 表单 ID 查找规则 确定目标表单的
entry_id - 通过 数据 ID 查找规则 确定目标数据的
data_id - 向用户确认删除操作
- 调用 删除数据
app.entry.data.delete - 展示删除结果
Example user query:
- "Help me delete this piece of data"
- "Remove data"
Execution process:
- Confirm the of the target application through Application ID Lookup Rules
app_id - Confirm the of the target form through Form ID Lookup Rules
entry_id - Confirm the of the target data through Data ID Lookup Rules
data_id - Confirm the deletion operation with the user
- Call to delete the data
app.entry.data.delete - Display the deletion result
批量删除数据
Batch Delete Data
用户query示例:
- "帮我批量删除多条数据"
- "批量移除数据"
执行流程:
- 通过 应用 ID 查找规则 确定目标应用的
app_id - 通过 表单 ID 查找规则 确定目标表单的
entry_id - 收集用户提供的数据 ID 列表
- 向用户确认删除操作
- 调用 批量删除数据
app.entry.data.batch_delete - 展示删除结果
Example user query:
- "Help me delete multiple pieces of data in batches"
- "Remove data in batches"
Execution process:
- Confirm the of the target application through Application ID Lookup Rules
app_id - Confirm the of the target form through Form ID Lookup Rules
entry_id - Collect the data ID list provided by the user
- Confirm the deletion operation with the user
- Call to delete data in batches
app.entry.data.batch_delete - Display the deletion result
错误处理
Error Handling
- 数据未找到:明确告知用户未找到对应数据
- 字段验证失败:展示具体的字段验证错误信息
- API错误:展示具体错误信息,必要时重试
- 网络问题:HTTP错误时主动重试最多3次
- Data not found: Clearly inform the user that the corresponding data is not found
- Field validation failed: Display specific field validation error information
- API error: Display specific error information, retry if necessary
- Network problem: Actively retry up to 3 times when HTTP error occurs