导入工作流
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
授权信息
当前API暂无授权信息透出。
请求参数
| 名称 | 类型 | 必填 | 描述 | 示例值 |
|---|---|---|---|---|
| ClusterId | string | 是 | A short description of struct | xxljob-a1804a3226d |
| Overwrite | boolean | 否 | 如果已存在,是否覆盖。默认值为 true。
| true |
| Content | string | 否 | 导入内容。 | [{"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"}]}] |
| AutoCreateApp | boolean | 否 | 自动创建应用。 | true |
返回参数
示例
正常返回示例
JSON格式
{
"Code": 200,
"RequestId": "27B1345D-5F71-5972-8E4C-AABA6C6232F0",
"Message": "Parameter error: content is null.",
"Success": true
}错误码
| HTTP status code | 错误码 | 错误信息 | 描述 |
|---|---|---|---|
| 400 | InvalidParameter | Parameter error: %s. | 参数错误: %s |
| 401 | IllegalRequest | IllegalRequest: %s. | 非法请求:%s |
| 403 | NoPermission | No permission to perform this operation: %s. | 没有权限去执行该操作:%s |
| 404 | NotFound | Not found: %s. | 资源不存在:%s |
| 500 | InternalError | InternalError: %s. | 系统内部错误:%s |
访问错误中心查看更多错误码。
变更历史
| 变更时间 | 变更内容概要 | 操作 |
|---|---|---|
| 2025-12-25 | 新增 OpenAPI | 查看变更详情 |
