- 文件分析
- 知识库管理
- 工作流
- MCP管理
- 数据库开发
- mineruPOST
工作流保存接口
开发中
开发环境
http://172.29.50.10:2333
开发环境
http://172.29.50.10:2333
POST
/zhixin_agent/workflows/draft
请求参数
Body 参数application/json
app_id
string
应用id
nodes
array [object {14}]
必需
edges
array [object {8}]
边
viewport
object
必需
features
object
功能
opening_statement
string
必需
suggested_questions
array[string]
必需
suggested_questions_after_answer
object
必需
text_to_speech
object
必需
speech_to_text
object
必需
retriever_resource
object
必需
sensitive_word_avoidance
object
必需
file_upload
object
必需
user_id
string
必需
hash
string
hash值
environment_variables
array[string]
环境变量
conversation_variables
array[string]
会话变量
示例
{
"app_id": "test2",
"graph": {
"nodes": [
{
"id": "1745481595747",
"type": "custom",
"data": {
"type": "start",
"title": "开始",
"desc": "",
"variables": [
{
"variable": "input_query",
"label": "input_query",
"type": "text-input",
"max_length": 48,
"required": false,
"options": []
},
{
"variable": "input_file",
"label": "input_file",
"type": "file",
"max_length": 48,
"required": false,
"options": [],
"allowed_file_upload_methods": [
"local_file",
"remote_url"
],
"allowed_file_types": [
"document"
],
"allowed_file_extensions": []
}
],
"selected": false
},
"position": {
"x": -345.7258848176418,
"y": 151.1348447447716
},
"targetPosition": "left",
"sourcePosition": "right",
"positionAbsolute": {
"x": -345.7258848176418,
"y": 151.1348447447716
},
"width": 244,
"height": 115,
"selected": false
},
{
"id": "1745564631704",
"type": "custom",
"data": {
"type": "end",
"title": "结束",
"desc": "",
"outputs": [
{
"variable": "text",
"value_selector": [
"1745995555099",
"text"
]
}
],
"selected": false
},
"position": {
"x": 379.88710281680426,
"y": 151.1348447447716
},
"targetPosition": "left",
"sourcePosition": "right",
"positionAbsolute": {
"x": 379.88710281680426,
"y": 151.1348447447716
},
"width": 244,
"height": 89,
"selected": false
},
{
"id": "1746494930925",
"type": "custom",
"data": {
"type": "document-extractor",
"title": "文档提取器",
"desc": "",
"variable_selector": [
"1745481595747",
"input_file"
],
"is_array_file": false,
"selected": true
},
"position": {
"x": 17.90886947588004,
"y": 151.1348447447716
},
"targetPosition": "left",
"sourcePosition": "right",
"positionAbsolute": {
"x": 17.90886947588004,
"y": 151.1348447447716
},
"width": 244,
"height": 91,
"selected": true
}
],
"edges": [
{
"id": "1745481595747-source-1746494930925-target",
"type": "custom",
"source": "1745481595747",
"sourceHandle": "source",
"target": "1746494930925",
"targetHandle": "target",
"data": {
"sourceType": "start",
"targetType": "document-extractor",
"isInIteration": false,
"isInLoop": false
},
"zIndex": 0
},
{
"id": "1746494930925-source-1745564631704-target",
"type": "custom",
"source": "1746494930925",
"target": "1745564631704",
"sourceHandle": "source",
"targetHandle": "target",
"data": {
"sourceType": "document-extractor",
"targetType": "end",
"isInLoop": false
},
"zIndex": 0
}
],
"viewport": {
"x": 681.0233898764018,
"y": 322.5983314686214,
"zoom": 0.6036748273130844
}
},
"features": {
"opening_statement": "",
"suggested_questions": [],
"suggested_questions_after_answer": {
"enabled": false
},
"text_to_speech": {
"enabled": false,
"voice": "",
"language": ""
},
"speech_to_text": {
"enabled": false
},
"retriever_resource": {
"enabled": true
},
"sensitive_word_avoidance": {
"enabled": false
},
"file_upload": {
"image": {
"enabled": false,
"number_limits": 3,
"transfer_methods": [
"local_file",
"remote_url"
]
},
"enabled": true,
"allowed_file_types": [
"image"
],
"allowed_file_extensions": [],
"allowed_file_upload_methods": [
"remote_url",
"local_file"
],
"number_limits": 1,
"fileUploadConfig": {
"file_size_limit": 15,
"batch_count_limit": 5,
"image_file_size_limit": 10,
"video_file_size_limit": 100,
"audio_file_size_limit": 50,
"workflow_file_upload_limit": 10
}
}
},
"user_id": "test01",
"hash": "ed26be547c305b48b72d8242273f9ee05a67a8888e225437aa364709e23aae2f",
"environment_variables": [],
"conversation_variables": []
}
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
cURL
curl --location --request POST 'http://172.29.50.10:2333/zhixin_agent/workflows/draft' \
--header 'Content-Type: application/json' \
--data-raw '{
"app_id": "test2",
"graph": {
"nodes": [
{
"id": "1745481595747",
"type": "custom",
"data": {
"type": "start",
"title": "开始",
"desc": "",
"variables": [
{
"variable": "input_query",
"label": "input_query",
"type": "text-input",
"max_length": 48,
"required": false,
"options": []
},
{
"variable": "input_file",
"label": "input_file",
"type": "file",
"max_length": 48,
"required": false,
"options": [],
"allowed_file_upload_methods": [
"local_file",
"remote_url"
],
"allowed_file_types": [
"document"
],
"allowed_file_extensions": []
}
],
"selected": false
},
"position": {
"x": -345.7258848176418,
"y": 151.1348447447716
},
"targetPosition": "left",
"sourcePosition": "right",
"positionAbsolute": {
"x": -345.7258848176418,
"y": 151.1348447447716
},
"width": 244,
"height": 115,
"selected": false
},
{
"id": "1745564631704",
"type": "custom",
"data": {
"type": "end",
"title": "结束",
"desc": "",
"outputs": [
{
"variable": "text",
"value_selector": [
"1745995555099",
"text"
]
}
],
"selected": false
},
"position": {
"x": 379.88710281680426,
"y": 151.1348447447716
},
"targetPosition": "left",
"sourcePosition": "right",
"positionAbsolute": {
"x": 379.88710281680426,
"y": 151.1348447447716
},
"width": 244,
"height": 89,
"selected": false
},
{
"id": "1746494930925",
"type": "custom",
"data": {
"type": "document-extractor",
"title": "文档提取器",
"desc": "",
"variable_selector": [
"1745481595747",
"input_file"
],
"is_array_file": false,
"selected": true
},
"position": {
"x": 17.90886947588004,
"y": 151.1348447447716
},
"targetPosition": "left",
"sourcePosition": "right",
"positionAbsolute": {
"x": 17.90886947588004,
"y": 151.1348447447716
},
"width": 244,
"height": 91,
"selected": true
}
],
"edges": [
{
"id": "1745481595747-source-1746494930925-target",
"type": "custom",
"source": "1745481595747",
"sourceHandle": "source",
"target": "1746494930925",
"targetHandle": "target",
"data": {
"sourceType": "start",
"targetType": "document-extractor",
"isInIteration": false,
"isInLoop": false
},
"zIndex": 0
},
{
"id": "1746494930925-source-1745564631704-target",
"type": "custom",
"source": "1746494930925",
"target": "1745564631704",
"sourceHandle": "source",
"targetHandle": "target",
"data": {
"sourceType": "document-extractor",
"targetType": "end",
"isInLoop": false
},
"zIndex": 0
}
],
"viewport": {
"x": 681.0233898764018,
"y": 322.5983314686214,
"zoom": 0.6036748273130844
}
},
"features": {
"opening_statement": "",
"suggested_questions": [],
"suggested_questions_after_answer": {
"enabled": false
},
"text_to_speech": {
"enabled": false,
"voice": "",
"language": ""
},
"speech_to_text": {
"enabled": false
},
"retriever_resource": {
"enabled": true
},
"sensitive_word_avoidance": {
"enabled": false
},
"file_upload": {
"image": {
"enabled": false,
"number_limits": 3,
"transfer_methods": [
"local_file",
"remote_url"
]
},
"enabled": true,
"allowed_file_types": [
"image"
],
"allowed_file_extensions": [],
"allowed_file_upload_methods": [
"remote_url",
"local_file"
],
"number_limits": 1,
"fileUploadConfig": {
"file_size_limit": 15,
"batch_count_limit": 5,
"image_file_size_limit": 10,
"video_file_size_limit": 100,
"audio_file_size_limit": 50,
"workflow_file_upload_limit": 10
}
}
},
"user_id": "test01",
"hash": "ed26be547c305b48b72d8242273f9ee05a67a8888e225437aa364709e23aae2f",
"environment_variables": [],
"conversation_variables": []
}'
返回响应
🟢200成功
application/json
Body
result
string
必需
hash
string
必需
updated_at
integer
必需
workflow_id
string
必需
示例
{
"result": "success",
"hash": "63405da6858a4a1fb04f995c60faef25133b94a3455e8ee9c6125bfe5b8e8cb0",
"updated_at": 1748198288,
"workflow_id": "644ebb79-0c74-4522-a6b6-3200d5d7b97c"
}
修改于 2025-06-17 06:28:41