ImportWorkflows - 导入工作流

导入工作流

调试

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

授权信息

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

请求参数

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

A short description of struct

xxljob-a1804a3226d
Overwriteboolean

如果已存在,是否覆盖。默认值为 true。

  • true:覆盖。
  • false:不覆盖。
true
Contentstring

导入内容。

[{"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"}]}]
AutoCreateAppboolean

自动创建应用。

true

返回参数

名称类型描述示例值
object

Schema of Response

Codeinteger

响应码。

200
RequestIdstring

本次调用请求的 ID,是由阿里云为该请求生成的唯一标识符,可用于排查和定位问题。

27B1345D-5F71-5972-8E4C-AABA6C6232F0
Messagestring

错误信息。

Parameter error: content is null.
Successboolean

是否调用成功。

  • true:调用成功。
  • false:调用失败。
true

示例

正常返回示例

JSON格式

{
  "Code": 200,
  "RequestId": "27B1345D-5F71-5972-8E4C-AABA6C6232F0",
  "Message": "Parameter error: content is null.",
  "Success": true
}

错误码

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查看变更详情