通用参数
接口参数
字段 |
类型 |
必选 |
描述 |
bk_biz_id |
string |
是 |
模板所属业务ID |
template_id |
string |
是 |
模板ID |
template_source |
string |
否 |
流程模板来源,business:默认值,业务流程,common:公共流程 |
name |
string |
是 |
任务名称 |
flow_type |
string |
否 |
任务流程类型,common: 常规流程,common_func:职能化流程 |
constants |
dict |
否 |
任务全局参数,详细信息见下面说明 |
exclude_task_nodes_id |
list |
否 |
跳过执行的节点ID列表 |
scope |
string |
否 |
bk_biz_id 检索的作用域。默认为 cmdb_biz,此时检索的是绑定的 CMDB 业务 ID 为 bk_biz_id 的项目;当值为 project 时则检索项目 ID 为 bk_biz_id 的项目 |
constants KEY
constants VALUE
"result": true,
"data": {
"task_id": 10,
"task_url": "http://bk_sops_host/taskflow/execute/3/?instance_id=15364",
"pipeline_tree": {
"activities": {
"node9b5ae13799d63e179f0ce3088b62": {
"outgoing": "line27bc7b4ccbcf37ddb9d1f6572a04",
"incoming": "line490caa49d2a03e64829693281032",
"name": "timing",
"error_ignorable": false,
"component": {
"code": "sleep_timer",
"data": {
"bk_timing": {
"hook": false,
"value": "2"
}
}
},
"stage_name": "步骤1",
"retryable": true,
"skippable": true,
"type": "ServiceActivity",
"optional": false,
"id": "node9b5ae13799d63e179f0ce3088b62",
"loop": null
},
"node880ded556c6c3c269be3cedc64b6": {
"outgoing": "line490caa49d2a03e64829693281032",
"incoming": "lineb83161d6e0593ad68d9ec73a961b",
"name": "暂停",
"error_ignorable": false,
"component": {
"code": "pause_node",
"data": {}
},
"stage_name": "步骤1",
"retryable": true,
"skippable": true,
"type": "ServiceActivity",
"id": "node880ded556c6c3c269be3cedc64b6",
"loop": null
}
},
"end_event": {
"type": "EmptyEndEvent",
"outgoing": "",
"incoming": "line27bc7b4ccbcf37ddb9d1f6572a04",
"name": ""
},
"outputs": [],
"flows": {
"line490caa49d2a03e64829693281032": {
"is_default": false,
"source": "node880ded556c6c3c269be3cedc64b6",
"id": "line490caa49d2a03e64829693281032",
"target": "node9b5ae13799d63e179f0ce3088b62"
},
"lineb83161d6e0593ad68d9ec73a961b": {
"is_default": false,
"source": "noded383bc1d7387391f889c6bab18b8",
"id": "lineb83161d6e0593ad68d9ec73a961b",
"target": "node880ded556c6c3c269be3cedc64b6"
},
"line27bc7b4ccbcf37ddb9d1f6572a04": {
"is_default": false,
"source": "node9b5ae13799d63e179f0ce3088b62",
"id": "line27bc7b4ccbcf37ddb9d1f6572a04",
"target": "node5c48f37aa9f0351e8b43ab6a2295"
}
},
"gateways": {},
"line": [
{
"source": {
"id": "node9b5ae13799d63e179f0ce3088b62",
"arrow": "Right"
},
"target": {
"id": "node5c48f37aa9f0351e8b43ab6a2295",
"arrow": "Left"
},
"id": "line27bc7b4ccbcf37ddb9d1f6572a04"
},
{
"source": {
"id": "node880ded556c6c3c269be3cedc64b6",
"arrow": "Right"
},
"target": {
"id": "node9b5ae13799d63e179f0ce3088b62",
"arrow": "Left"
},
},
{
"source": {
"id": "noded383bc1d7387391f889c6bab18b8",
},
"id": "lineb83161d6e0593ad68d9ec73a961b",
"target": {
"id": "node880ded556c6c3c269be3cedc64b6",
"arrow": "Left"
}
}
],
"start_event": {
"type": "EmptyStartEvent",
"outgoing": "lineb83161d6e0593ad68d9ec73a961b",
"incoming": "",
"id": "noded383bc1d7387391f889c6bab18b8",
"name": ""
},
"id": "node7ef6970d06ad3bc092594cb5ec5f",
"constants": {},
"location": [
{
"stage_name": "步骤1",
"name": "暂停",
"y": 135,
"x": 300,
"type": "tasknode",
"id": "node880ded556c6c3c269be3cedc64b6"
},
{
"y": 150,
"x": 1000,
"type": "endpoint",
"id": "node5c48f37aa9f0351e8b43ab6a2295"
},
{
"stage_name": "步骤1",
"name": "timing",
"y": 135,
"x": 595,
"type": "tasknode",
"id": "node9b5ae13799d63e179f0ce3088b62"
},
{
"y": 150,
"x": 80,
"type": "startpoint",
"id": "noded383bc1d7387391f889c6bab18b8"
}
]
}
}
data
字段 |
类型 |
描述 |
task_id |
int |
任务实例ID |
task_url |
str |
任务实例链接 |
pipeline_tree |
dict |
任务实例树 |
data.pipeline_tree
data.pipeline_tree.constants KEY
data.pipeline_tree.constants VALUE
名称 |
类型 |
说明 |
key |
string |
同 KEY |
name |
string |
变量名字 |
index |
int |
变量在模板中的显示顺序 |
desc |
string |
变量说明 |
source_type |
string |
变量来源, 取值范围 custom: 自定义变量,component_inputs: 从标准插件输入参数勾选,component_outputs:从标准插件输出结果中勾选 |
custom_type |
string |
source_type=custom 时有效,自定义变量类型, 取值范围 input: 输入框,textarea: 文本框,datetime: 日期时间,int: 整数 |
source_tag |
string |
source_type=component_inputs/component_outputs 时有效,变量的来源标准插件 |
source_info |
dict |
source_type=component_inputs/component_outputs 时有效,变量的来源节点信息 |