转换Flow DSL。
接口说明
将第三方工作流 DSL(如 Dify、n8n 等)转换为 AgentRun Flow 定义。支持兼容性检查、插件识别和元数据提取,返回转换后的 Flow 配置、兼容性分析报告和所需的 Toolset 安装配置。此操作为 dry-run 模式,不会创建实际的 Flow 资源。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
请求语法
POST /2025-09-10/flows/action/convertDsl HTTP/1.1
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| body |
ConvertFlowDSLInput |
是 |
Flow DSL 转换请求参数 |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
ConvertFlowDSLResult |
返回 Flow DSL 转换结果 |
示例
正常返回示例
JSON格式
{
"code": "SUCCESS",
"requestId": "F8A0F5F3-0C3E-4C82-9D4F-5E4B6A7C8D9E",
"data": {
"flow": {
"flowName": "dify-flow",
"description": "Converted from external workflow",
"definition": "",
"environmentConfiguration": {
"variables": [
{
"name": "MY_KEY",
"value": "my-value",
"description": "A configuration key"
}
]
}
},
"conversionPlan": {
"summary": {
"totalNodes": 10,
"compatibleNodes": 7,
"nodesNeedConfig": 2,
"nodesNeedConversion": 0,
"unsupportedNodes": 1
},
"issues": [
{
"nodeId": "1760514991682",
"nodeType": "tool",
"nodeTitle": "Google Search",
"level": "warning",
"issueType": "needs_config",
"description": "Tool node requires Toolset installation",
"suggestion": "Install Toolset 'google' before using this flow",
"details": {
"key": ""
}
}
]
},
"toolsetInstallations": [
{
"name": "google",
"description": "Google Search Plugin",
"spec": {
"key": ""
}
}
],
"pluginErrors": [
{
"nodeId": "1760514996015",
"providerName": "langgenius",
"toolName": "google_search",
"reason": "Plugin not found in marketplace"
}
]
}
}
错误码
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。
该文章对您有帮助吗?