Data - Submit Task For Execution
提交任务以供执行。
POST http://<Servername>/OperationsManager/data/submitTask
请求正文
Media Types: "application/json", "text/json", "application/xml", "text/xml", "application/x-www-form-urlencoded"
| 名称 | 类型 | 说明 |
|---|---|---|
| credentials |
用于任务执行的凭证 |
|
| monitoringObjectIds |
string[] |
监控对象 ID |
| parametersWithValues |
object |
带值的参数 |
| taskId |
string |
任务标识 |
响应
| 名称 | 类型 | 说明 |
|---|---|---|
| 200 OK |
string |
还行。 已成功提交要执行的任务。 Media Types: "application/json", "text/json", "application/xml", "text/xml" |
示例
SubmitTaskForExecution
示例请求
POST http://<Servername>/OperationsManager/data/submitTask
{
"taskId": "5d649d3c-7c4c-8dec-a1fd-2f5711ac7f3d",
"monitoringObjectIds": [
"b4abc994-7f94-ef4b-9a4b-69611635f6a0"
],
"parametersWithValues": {},
"credentials": {
"domain": "contoso",
"username": "scomuser",
"password": "passwords"
}
}
示例响应
[
"789be4ae-d365-4dca-8cdc-0c8c3b239689"
]
定义
| 名称 | 说明 |
|---|---|
|
Task |
|
|
Task |
TaskExecutionCredentials
| 名称 | 类型 | 说明 |
|---|---|---|
| domain |
string |
域名 |
| password |
string |
密码 |
| username |
string |
用户名 |
TaskExecutionRequest
| 名称 | 类型 | 说明 |
|---|---|---|
| credentials |
用于任务执行的凭证 |
|
| monitoringObjectIds |
string[] |
监控对象 ID |
| parametersWithValues |
object |
带值的参数 |
| taskId |
string |
任务标识 |