模板任务(Operator)接口
更新时间:2024-08-16
模板任务(Operator)列表
请求参数
名称 | 类型 | 描述 | 是否必须 | 参数位置 |
---|---|---|---|---|
pageNo | int | 页数,从1开始计数 | 是 | RequestBody参数 |
pageSize | int | 每页展示数量,最大值:100 | 是 | RequestBody参数 |
请求示例
JSON
1POST /api/logic/oos/v1/operator/list
2req := &model.BasePageRequest{
3 PageNo: 1,
4 PageSize: 100,
5}
6result, err := oosClient.GetOperatorList(req)
响应示例
JSON
1{
2 "success": true,
3 "msg": "",
4 "result": {
5 "operators": [
6 {
7 "name": "BCE::Agent::ExecuteHttp",
8 "label": "虚机执行Http请求",
9 "description": "虚机执行Http请求",
10 "operator": "BCE::Agent::ExecuteHttp",
11 "retries": 0,
12 "retryInterval": 300000,
13 "timeout": 21600000,
14 "parallelismRatio": 0.0,
15 "parallelismCount": 0,
16 "allowedFailureRatio": 0.0,
17 "allowedFailureCount": 0,
18 "manually": false,
19 "scheduleDelayMilli": 0,
20 "pauseOnFailure": false,
21 "properties": [
22 {
23 "name": "method",
24 "required": true,
25 "type": "string",
26 "label": "请求方法类型",
27 "multiple": false,
28 "description": "",
29 "options": [
30 "GET",
31 "POST",
32 "PUT",
33 "DELETE"
34 ],
35 "defaultValue": "",
36 "properties": []
37 },
38 {
39 "name": "url",
40 "required": true,
41 "type": "string",
42 "label": "请求地址",
43 "multiple": false,
44 "description": "",
45 "options": [],
46 "defaultValue": "",
47 "properties": []
48 },
49 {
50 "name": "headers",
51 "required": false,
52 "type": "list",
53 "label": "请求头",
54 "multiple": false,
55 "description": "",
56 "options": [],
57 "defaultValue": "",
58 "properties": []
59 },
60 {
61 "name": "body",
62 "required": false,
63 "type": "list",
64 "label": "请求体",
65 "multiple": false,
66 "description": "",
67 "options": [],
68 "defaultValue": "",
69 "properties": []
70 },
71 {
72 "name": "timeoutMill",
73 "required": false,
74 "type": "number",
75 "label": "请求连接超时时间",
76 "multiple": false,
77 "description": "",
78 "options": [],
79 "defaultValue": 10000,
80 "unit": "ms",
81 "properties": []
82 },
83 {
84 "name": "__workerSelectors__",
85 "required": true,
86 "type": "bccInstance",
87 "label": "执行脚本虚机列表",
88 "multiple": true,
89 "description": "",
90 "options": [],
91 "defaultValue": "",
92 "properties": []
93 }
94
95 ],
96 "initContext": {}
97 }
98 // 省略剩余
99 ],
100 "orderBy": "createTime",
101 "order": "desc",
102 "pageNo": 1,
103 "pageSize": 10,
104 "totalCount": 39
105 }
106}