ExportWorkflows - 导出工作流

导出工作流为JSON格式,包含工作流基本信息、工作流内所有节点信息、工作流的DAG依赖关系

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

授权信息

当前API暂无授权信息透出。

请求参数

名称类型必填描述示例值
ClusterIdstring

A short description of struct

xxljob-b6ec1xxxx
AppNamestring

应用名称。

test-app
WorkflowIdarray

工作流 ID。

long

工作流 ID

20

返回参数

名称类型描述示例值
byte

请求体。

[{"kind":"SchedulerXWorkflows","type":"JSON","version":"2.0","workflowInfo":{"name":"myWorkflow","description":"","appName":"xuerentest","appType":1,"maxConcurrency":1,"currentExecuteStatus":0,"timeConfig":{"timeType":1,"timeExpression":"0 0 12 * * ?","dataOffset":0}},"nodes":[{"name":"Java1","startTime":-1,"coordinate":{"x":-222.0,"y":40.0,"width":220.0,"height":76.0},"appName":"xuerentest","description":"","jobType":"xxljob","executeMode":"standalone","contentType":1,"content":"{\"jobHandler\":\"helloworld\"}","xattrs":"{\"executorBlockStrategy\":1}","dependentStrategy":1,"routeStrategy":1,"parameters":"","maxConcurrency":1,"maxAttempt":0,"attemptInterval":30,"priority":5,"weight":1,"timeConfig":{"timeType":1,"calendar":"","dataOffset":0},"monitorConfigInfo":{"timeoutEnable":true,"failEnable":true,"failLimitTimes":1,"failRate":100,"missWorkerEnable":true,"timeout":300,"timeoutKillEnable":false,"daysOfDeadline":0,"sendChannel":"","alarmType":"CustomContacts","successNotice":false,"endEarlyEnable":false,"endEarly":30},"contactInfoList":[]},{"name":"shell1","startTime":-1,"coordinate":{"x":102.0,"y":-51.0,"width":220.0,"height":76.0},"appName":"xuerentest","description":"","jobType":"script_shell","executeMode":"standalone","contentType":2,"content":"echo \"hello world\"","xattrs":"{\"executorBlockStrategy\":1}","dependentStrategy":1,"routeStrategy":1,"parameters":"","maxConcurrency":1,"maxAttempt":0,"attemptInterval":30,"priority":5,"weight":1,"timeConfig":{"timeType":1,"calendar":"","dataOffset":0},"monitorConfigInfo":{"timeoutEnable":true,"failEnable":true,"failLimitTimes":1,"failRate":100,"missWorkerEnable":true,"timeout":300,"timeoutKillEnable":false,"daysOfDeadline":0,"sendChannel":"","alarmType":"CustomContacts","successNotice":false,"endEarlyEnable":false,"endEarly":30},"contactInfoList":[]},{"name":"Java2","startTime":-1,"coordinate":{"x":390.0,"y":55.0,"width":220.0,"height":76.0},"appName":"xuerentest","description":"","jobType":"xxljob","executeMode":"standalone","contentType":1,"content":"{\"jobHandler\":\"helloworld2\"}","xattrs":"{\"executorBlockStrategy\":1,\"localParams\":[]}","dependentStrategy":1,"routeStrategy":1,"parameters":"","maxConcurrency":1,"maxAttempt":0,"attemptInterval":30,"priority":5,"weight":1,"timeConfig":{"timeType":1,"calendar":"","dataOffset":0},"monitorConfigInfo":{"timeoutEnable":true,"failEnable":true,"failLimitTimes":1,"failRate":100,"missWorkerEnable":true,"timeout":300,"timeoutKillEnable":false,"daysOfDeadline":0,"sendChannel":"","alarmType":"CustomContacts","successNotice":false,"endEarlyEnable":false,"endEarly":30},"contactInfoList":[]},{"name":"shell2","startTime":-1,"coordinate":{"x":89.0,"y":161.0,"width":220.0,"height":76.0},"appName":"xuerentest","description":"","jobType":"script_shell","executeMode":"standalone","contentType":2,"content":"echo \"hello world2\"","xattrs":"{\"executorBlockStrategy\":1}","dependentStrategy":1,"routeStrategy":1,"parameters":"","maxConcurrency":1,"maxAttempt":0,"attemptInterval":30,"priority":5,"weight":1,"timeConfig":{"timeType":1,"calendar":"","dataOffset":0},"monitorConfigInfo":{"timeoutEnable":true,"failEnable":true,"failLimitTimes":1,"failRate":100,"missWorkerEnable":true,"timeout":300,"timeoutKillEnable":false,"daysOfDeadline":0,"sendChannel":"","alarmType":"CustomContacts","successNotice":false,"endEarlyEnable":false,"endEarly":30},"contactInfoList":[]}],"edges":[{"from":"Java1","to":"shell1"},{"from":"Java1","to":"shell2"},{"from":"Schedulerx-Root","to":"Java1"},{"from":"shell1","to":"Java2"},{"from":"shell2","to":"Java2"}]}]

示例

正常返回示例

JSON格式

[
  {
    "kind": "SchedulerXWorkflows",
    "type": "JSON",
    "version": 2,
    "workflowInfo": {
      "name": "myWorkflow",
      "description": "",
      "appName": "xuerentest",
      "appType": 1,
      "maxConcurrency": 1,
      "currentExecuteStatus": 0,
      "timeConfig": {
        "timeType": 1,
        "timeExpression": "0 0 12 * * ?",
        "dataOffset": 0
      }
    },
    "nodes": [
      {
        "name": "Java1",
        "startTime": -1,
        "coordinate": {
          "x": -222,
          "y": 40,
          "width": 220,
          "height": 76
        },
        "appName": "xuerentest",
        "description": "",
        "jobType": "xxljob",
        "executeMode": "standalone",
        "contentType": 1,
        "content": {
          "jobHandler": "helloworld"
        },
        "xattrs": {
          "executorBlockStrategy": 1
        },
        "dependentStrategy": 1,
        "routeStrategy": 1,
        "parameters": "",
        "maxConcurrency": 1,
        "maxAttempt": 0,
        "attemptInterval": 30,
        "priority": 5,
        "weight": 1,
        "timeConfig": {
          "timeType": 1,
          "calendar": "",
          "dataOffset": 0
        },
        "monitorConfigInfo": {
          "timeoutEnable": true,
          "failEnable": true,
          "failLimitTimes": 1,
          "failRate": 100,
          "missWorkerEnable": true,
          "timeout": 300,
          "timeoutKillEnable": false,
          "daysOfDeadline": 0,
          "sendChannel": "",
          "alarmType": "CustomContacts",
          "successNotice": false,
          "endEarlyEnable": false,
          "endEarly": 30
        },
        "contactInfoList": []
      },
      {
        "name": "shell1",
        "startTime": -1,
        "coordinate": {
          "x": 102,
          "y": -51,
          "width": 220,
          "height": 76
        },
        "appName": "xuerentest",
        "description": "",
        "jobType": "script_shell",
        "executeMode": "standalone",
        "contentType": 2,
        "content": "echo \"hello world\"",
        "xattrs": {
          "executorBlockStrategy": 1
        },
        "dependentStrategy": 1,
        "routeStrategy": 1,
        "parameters": "",
        "maxConcurrency": 1,
        "maxAttempt": 0,
        "attemptInterval": 30,
        "priority": 5,
        "weight": 1,
        "timeConfig": {
          "timeType": 1,
          "calendar": "",
          "dataOffset": 0
        },
        "monitorConfigInfo": {
          "timeoutEnable": true,
          "failEnable": true,
          "failLimitTimes": 1,
          "failRate": 100,
          "missWorkerEnable": true,
          "timeout": 300,
          "timeoutKillEnable": false,
          "daysOfDeadline": 0,
          "sendChannel": "",
          "alarmType": "CustomContacts",
          "successNotice": false,
          "endEarlyEnable": false,
          "endEarly": 30
        },
        "contactInfoList": []
      },
      {
        "name": "Java2",
        "startTime": -1,
        "coordinate": {
          "x": 390,
          "y": 55,
          "width": 220,
          "height": 76
        },
        "appName": "xuerentest",
        "description": "",
        "jobType": "xxljob",
        "executeMode": "standalone",
        "contentType": 1,
        "content": {
          "jobHandler": "helloworld2"
        },
        "xattrs": {
          "executorBlockStrategy": 1,
          "localParams": []
        },
        "dependentStrategy": 1,
        "routeStrategy": 1,
        "parameters": "",
        "maxConcurrency": 1,
        "maxAttempt": 0,
        "attemptInterval": 30,
        "priority": 5,
        "weight": 1,
        "timeConfig": {
          "timeType": 1,
          "calendar": "",
          "dataOffset": 0
        },
        "monitorConfigInfo": {
          "timeoutEnable": true,
          "failEnable": true,
          "failLimitTimes": 1,
          "failRate": 100,
          "missWorkerEnable": true,
          "timeout": 300,
          "timeoutKillEnable": false,
          "daysOfDeadline": 0,
          "sendChannel": "",
          "alarmType": "CustomContacts",
          "successNotice": false,
          "endEarlyEnable": false,
          "endEarly": 30
        },
        "contactInfoList": []
      },
      {
        "name": "shell2",
        "startTime": -1,
        "coordinate": {
          "x": 89,
          "y": 161,
          "width": 220,
          "height": 76
        },
        "appName": "xuerentest",
        "description": "",
        "jobType": "script_shell",
        "executeMode": "standalone",
        "contentType": 2,
        "content": "echo \"hello world2\"",
        "xattrs": {
          "executorBlockStrategy": 1
        },
        "dependentStrategy": 1,
        "routeStrategy": 1,
        "parameters": "",
        "maxConcurrency": 1,
        "maxAttempt": 0,
        "attemptInterval": 30,
        "priority": 5,
        "weight": 1,
        "timeConfig": {
          "timeType": 1,
          "calendar": "",
          "dataOffset": 0
        },
        "monitorConfigInfo": {
          "timeoutEnable": true,
          "failEnable": true,
          "failLimitTimes": 1,
          "failRate": 100,
          "missWorkerEnable": true,
          "timeout": 300,
          "timeoutKillEnable": false,
          "daysOfDeadline": 0,
          "sendChannel": "",
          "alarmType": "CustomContacts",
          "successNotice": false,
          "endEarlyEnable": false,
          "endEarly": 30
        },
        "contactInfoList": []
      }
    ],
    "edges": [
      {
        "from": "Java1",
        "to": "shell1"
      },
      {
        "from": "Java1",
        "to": "shell2"
      },
      {
        "from": "Schedulerx-Root",
        "to": "Java1"
      },
      {
        "from": "shell1",
        "to": "Java2"
      },
      {
        "from": "shell2",
        "to": "Java2"
      }
    ]
  }
]

错误码

HTTP status code错误码错误信息描述
400InvalidParameterParameter error: %s.参数错误: %s
401IllegalRequestIllegalRequest: %s.非法请求:%s
403NoPermissionNo permission to perform this operation: %s.没有权限去执行该操作:%s
404NotFoundNot found: %s.资源不存在:%s
500InternalErrorInternalError: %s.系统内部错误:%s

访问错误中心查看更多错误码。

变更历史

变更时间变更内容概要操作
2025-12-25新增 OpenAPI查看变更详情