用途
restart RESTful API 使用以下 URL 和方法重新启动作业︰
| 项 | 说明 | ||
|---|---|---|---|
| URL | /datamover/executingJobs | ||
| 方法 | POST | ||
请求参数
- action
- 说明︰值 "restart" 用于与 /executingJobs 上的其他 POST 命令区分开(不区分大小写)
- jobExecutionName
- 说明︰restart 的作业执行名称
- uowid
- 说明:工作单元 ID
- sync
- 说明︰指定该命令是否为 sync
响应参数
- jobExecutionName
- 说明︰如果作业已执行,则为作业执行名称;如果未执行,则为空白
- status
- 说明︰作业的状态
响应示例
在此示例中,sync 为 false.
{
"jobExecutionName" : "executedJob-20141204175020" ,
"status":"started"
"links" : [{
"rel" : "status"
"href" : "http://server/datamover/jobs/executedJob-20141204175020"
},
{
"rel" : "stop"
"href" : "http://server/datamover/jobs/executedJob-20141204175020"
}
]
}
在此示例中,sync 为 true。
{
"jobExecutionName" : "executedJob-20141204175020" ,
"status" : "FAILED" ,
"links" : [{
"rel" : "status"
"href" : "http://server/datamover/jobs/executedJob-20141204175020"
}
]
}
在此示例中,作业重新启动失败。
{
"error" : "The job failed to execute because another job has already started"
}
restart RESTful API 示例
{
"action":"restart",
"jobExecutionName":"job_restart-date-time",
"sync":"true"
}