Skip to content

Commit

Permalink
Merge pull request #1005 from alex-smile/ft_esb_update_apis_20220705
Browse files Browse the repository at this point in the history
Ft esb update apis
  • Loading branch information
MrLYC authored Jul 5, 2022
2 parents 50f3894 + 7d41a63 commit 1c52cb3
Show file tree
Hide file tree
Showing 36 changed files with 5,551 additions and 41 deletions.
2 changes: 1 addition & 1 deletion paas2/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.14.15
2.14.16
1 change: 1 addition & 0 deletions paas2/esb/components/confapis/data/dataflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -392,3 +392,4 @@
dest_path: /v3/dataflow/flow/get_latest_msg/
dest_http_method: GET
is_hidden: true

9 changes: 9 additions & 0 deletions paas2/esb/components/confapis/data/v3_access.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -330,3 +330,12 @@
dest_path: /v3/access/rawdata/query_by_name/
dest_http_method: GET
is_hidden: true

- path: /data/v3/access/rawdata/{data_id}/tags/
name: v3_access_rawdata_raw_data_id_tags_post
label: 目标rawdata打标签接口
method: POST
comp_codename: generic.data.datav3_component
dest_path: /v3/access/rawdata/{data_id}/tags/
dest_http_method: POST
is_hidden: true
18 changes: 18 additions & 0 deletions paas2/esb/components/confapis/data/v3_aiops.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1383,3 +1383,21 @@
method: POST
name: v3_aiops_get_AIOps_Experiment_Node_execute_groups
path: /data/v3/aiops/models/{model_id}/experiments/{model_experiment_id}/node/execute/groups/

- path: /data/v3/aiops/envs/
name: v3_aiops_envs
label: 获取依赖的aiops部分环境变量
method: GET
comp_codename: generic.data.datav3_component
dest_path: /v3/aiops/envs/
dest_http_method: GET
is_hidden: true

- path: /data/v3/aiops/serving/processing/{result_table_name}/execute/
name: v3_aiops_api_serving_execute
label: 执行api_serving
method: POST
comp_codename: generic.data.datav3_component
dest_path: /v3/aiops/serving/processing/{result_table_name}/execute/
dest_http_method: POST
is_hidden: true
33 changes: 32 additions & 1 deletion paas2/esb/components/confapis/data/v3_meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -397,11 +397,42 @@
dest_http_method: GET
is_hidden: true


- path: /data/v3/meta/result_tables/{result_table_id}/geog_area/
name: v3_meta_result_tables__result_table_id__geog_area_get
label: 获取结果表所属地域
method: GET
comp_codename: generic.data.datav3_component
dest_path: /v3/meta/result_tables/{result_table_id}/geog_area/
dest_http_method: GET
is_hidden: true
is_hidden: true


- path: /data/v3/meta/tag/recommends/
name: v3_meta_tag_recommends_get
label: 标签推荐列表接口
method: GET
comp_codename: generic.data.datav3_component
dest_path: /v3/meta/tag/recommends/
dest_http_method: GET
is_hidden: true


- path: /data/v3/meta/tag/tags/
name: v3_meta_tag_tags_code_list
label: 标签列表接口
method: GET
comp_codename: generic.data.datav3_component
dest_path: /v3/meta/tag/tags/
dest_http_method: GET
is_hidden: true


- path: /data/v3/meta/result_tables/{result_table_id}/tags/
name: v3_meta_result_tables_post_tags
label: 目标rt打标签接口
method: POST
comp_codename: generic.data.datav3_component
dest_path: /v3/meta/result_tables/{result_table_id}/tags/
dest_http_method: POST
is_hidden: true
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
### 功能描述

删除处理套餐

### 请求参数

{{ common_args_desc }}

#### 接口参数

| 字段 | 类型 | 必选 | 描述 |
| ---- | ---- | ---- | ---------- |
| id | Int || 处理套餐ID |

#### 示例数据

```json
{
"bk_app_code": "xxx",
"bk_app_secret": "xxxxx",
"bk_token": "xxxx",
"id": 1
}
```

#### 响应参数

| 字段 | 类型 | 描述 |
| ------- | ------ | ------------ |
| result | Bool | 请求是否成功 |
| code | Int | 返回的状态码 |
| message | String | 描述信息 |
| data | null ||

#### 示例数据

```json
{
"message": "OK",
"code": 200,
"result": true,
"data": null
}
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
### 功能描述

删除日历

### 请求参数

{{ common_args_desc }}

#### 接口参数

| 字段名 | 类型 | 必选 | 描述 |
| ------ | ---- | ---- | ------ |
| int | Int || 日历ID |

#### 示例数据

```json
{
"bk_app_code": "xxx",
"bk_app_secret": "xxxxx",
"bk_token": "xxxx",
"id": 1
}
```

### 响应参数

| 字段名 | 类型 | 描述 |
| ------- | ------ | ------------ |
| result | Bool | 请求是否成功 |
| code | Int | 返回的状态码 |
| message | String | 描述信息 |
| data | Null ||

#### 示例数据

```json
{
"message": "OK",
"code": 200,
"data": null,
"result": true
}
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,169 @@
### 功能描述

删除日历事项

### 请求参数

{{ common_args_desc }}

#### 接口参数

| 字段名 | 类型 | 必选 | 描述 |
| ----------- | ---- | ---- | ------------------------------------------------------------ |
| id | Int || 日历事项ID |
| start_time | Int || 事项开始时间(传入时间戳) |
| end_time | Int || 事项结束时间(传入时间戳) |
| repeat | Dict || 重复事项配置信息(默认为{},表示不重复) |
| delete_type | Int || 删除类型(删除整个事项:0;删除当前事项:1;删除当前事项及未来所有事项:2) |

#### 重复事项配置信息(repeat)

| 字段名 | 类型 | 必选 | 说明 |
| ------------ | ----------- | ---- | ------------------------------------------------------------ |
| freq | String || 重复频率(天:"day",周:"week",月:"month",年:"year") |
| interval | Int || 重复间隔 |
| until | Int || 重复结束时间(传入时间戳) |
| every | List(int) || 重复区间,当`label``week`时这里是0-6(0为周天)的数字,当`label``month`的时候,这里是1-31的数字,当`label``year`的时候这里的数字是1-12(注:如果传入的start_time对应的标志不在重复区间内,则会自动将其加入) |
| exclude_date | List(int) || 排除事项日期(这里记录排除在重复范围内的日期) |

- 不重复(默认)=>`repeat={}`

- 每天

```python
{
"freq": "day",
"interval": 1, # 间隔
"until": 1648569600, # 结束日期
"every": [], # 区间
"exclude_date": [] # 排除事项日期
}
```

- 每个工作日

```python
{
"freq": "week",
"interval": 1,
"until": null, # 永不结束
"every": [1,2,3,4,5],
"exclude_date": [] # 排除事项日期
}
```

- 每周

```python
{
"freq": "week",
"interval": 1,
"until": null,
"every": [],
"exclude_date": [] # 排除事项日期
}
```

- 每月

```python
{
"freq": "month",
"interval": 1,
"until": null,
"every": [],
"exclude_date": [] # 排除事项日期
}
```

- 每年

```python
{
"freq": "year",
"interval": 1,
"until": null,
"every": [],
"exclude_date": [] # 排除事项日期
}
```

- 自定义

自定义这里,根据用户选择的重复结束日期和重复间隔在对应的位置进行处理

```python
# 每三天并且永不结束
{
"freq": "day",
"interval": 3, # 间隔
"until": null, # 结束日期
"every": [], # 区间
"exclude_date": [] # 排除事项日期
}
# 每四周并且10.1日结束
{
"freq": "week",
"interval": 4, # 间隔
"until": 1664553600, # 结束日期
"every": [], # 区间
"exclude_date": [] # 排除事项日期
}
# 每周四和六并且两周一次,永不结束
{
"freq": "week",
"interval": 2, # 间隔
"until": null, # 结束日期
"every": [4,6], # 区间
"exclude_date": [] # 排除事项日期
}
# 每月1号和15号重复,并且间隔3个月,永不重复
{
"freq": "month",
"interval": 3, # 间隔
"until": null, # 结束日期
"every": [1, 15], # 区间
"exclude_date": [] # 排除事项日期
}
```

#### 排除日期(repeat.exclude_date)

当用户对一个重复的事项进行单个编辑或者删除的时候,对应的日期就会存入`exclude_date`

例如:当有一从`2022-03-102022-03-20`的每天重复的事项,如果将15号的事项删除,则可以将3.15存入`exclude_date`,使之变成`[1647273600]`

#### 示例数据

```json
{
"bk_app_code": "xxx",
"bk_app_secret": "xxxxx",
"bk_token": "xxxx",
"id": 1,
"start_time": 1647043200,
"end_time": 1647052200,
"repeat": {},
"delete_type": 0
}
```

### 响应参数

| 字段名 | 类型 | 描述 |
| ------- | ------ | ------------ |
| result | Bool | 请求是否成功 |
| code | Int | 返回的状态码 |
| message | String | 描述信息 |
| data | Null ||

#### 示例数据

```json
{
"message": "OK",
"code": 200,
"data": null,
"result": true
}
```
Loading

0 comments on commit 1c52cb3

Please sign in to comment.