模板任务(Operator)接口
更新时间:2024-08-16
请求结构
- method:POST
- URL:/api/logic/oos/v1/operator/list
请求参数
名称 | 类型 | 描述 | 是否必须 | 参数位置 |
---|---|---|---|---|
pageNo | int | 页数,从1开始计数 | 是 | RequestBody参数 |
pageSize | int | 每页展示数量,最大值:100 | 是 | RequestBody参数 |
响应示例
请求示例
// config of client
String endpoint = "http://oos.bj.baidubce.com";
String userId = "a0d04************************ce4";
String ak = "ALTA*******************CYG";
String sk = "b2c5************************3ac1";
// create oos client
OosClientConfiguration config = new OosClientConfiguration();
config.setCredentials(new DefaultBceCredentials(ak, sk));
config.setEndpoint(endpoint);
OosClient oosClient = new OosClient(config);
// request params definition
OperatorListRequest request = new OperatorListRequest();
request.setPageNo(1);
request.setPageSize(10);
// call
OperatorListResponse operatorList = oosClient.getOperatorList(request);
响应示例
{
"metadata": {
"bceRequestId": "64da1e89-4b7c-4d7e-b276-6fa18c5b02dd",
"contentLength": 5340,
"contentType": "application/json;charset=UTF-8",
"date": 1713876907000,
"server": "BWS"
},
"success": true,
"msg": "",
"result": {
"operators": [
{
"name": "BCE::Agent::ExecuteHttp",
"label": "虚机执行Http请求",
"description": "虚机执行Http请求",
"operator": "BCE::Agent::ExecuteHttp",
"retries": 0,
"retryInterval": 300000,
"timeout": 21600000,
"parallelismRatio": 0.0,
"parallelismCount": 0,
"allowedFailureRatio": 0.0,
"allowedFailureCount": 0,
"manually": false,
"scheduleDelayMilli": 0,
"pauseOnFailure": false,
"properties": [
{
"name": "method",
"required": true,
"type": "string",
"label": "请求方法类型",
"multiple": false,
"description": "",
"options": [
"GET",
"POST",
"PUT",
"DELETE"
],
"defaultValue": "",
"properties": []
},
{
"name": "url",
"required": true,
"type": "string",
"label": "请求地址",
"multiple": false,
"description": "",
"options": [],
"defaultValue": "",
"properties": []
},
{
"name": "headers",
"required": false,
"type": "list",
"label": "请求头",
"multiple": false,
"description": "",
"options": [],
"defaultValue": "",
"properties": []
},
{
"name": "body",
"required": false,
"type": "list",
"label": "请求体",
"multiple": false,
"description": "",
"options": [],
"defaultValue": "",
"properties": []
},
{
"name": "timeoutMill",
"required": false,
"type": "number",
"label": "请求连接超时时间",
"multiple": false,
"description": "",
"options": [],
"defaultValue": 10000,
"unit": "ms",
"properties": []
},
{
"name": "__workerSelectors__",
"required": true,
"type": "bccInstance",
"label": "执行脚本虚机列表",
"multiple": true,
"description": "",
"options": [],
"defaultValue": "",
"properties": []
}
],
"initContext": {}
}
// 省略剩余
],
"orderBy": "createTime",
"order": "desc",
"pageNo": 1,
"pageSize": 10,
"totalCount": 39
}
}