Skip to content

Commit

Permalink
feat: 脚本开放管理类API TencentBlueKing#2318
Browse files Browse the repository at this point in the history
  • Loading branch information
liuliaozhong committed Sep 25, 2023
1 parent f538517 commit ecaf85d
Show file tree
Hide file tree
Showing 34 changed files with 144 additions and 78 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,14 @@
"version": "V1.0",
"content": "#!/bin/bash***",
"status": 1,
"version_desc": "版本描述"
"version_desc": "版本描述",
"creator": "admin",
"create_time": 1600746078520,
"last_modify_user": "admin",
"last_modify_time": 1600746078520
"last_modify_time": 1600746078520,
"script_language": 1,
"public_script": true,
"description": "脚本描述"
}
}
```
Expand Down Expand Up @@ -75,3 +78,6 @@
| create_time | long | 创建时间Unix时间戳(ms) |
| last_modify_user | string | 最近一次修改人 |
| last_modify_time | long | 最近一次修改时间Unix时间戳(ms) |
| script_language | int | 脚本语言:1 - shell, 2 - bat, 3 - perl, 4 - python, 5 - powershell |
| public_script | bool | 是否公共脚本 |
| description | string | 脚本描述 |
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,10 @@
"creator": "admin",
"create_time": 1600746078520,
"last_modify_user": "admin",
"last_modify_time": 1600746078520
"last_modify_time": 1600746078520,
"script_language": 1,
"public_script": true,
"description": "脚本描述"
}
],
"start": 0,
Expand Down Expand Up @@ -83,3 +86,6 @@
| create_time | long | 创建时间Unix时间戳(ms) |
| last_modify_user | string | 最近一次修改人 |
| last_modify_time | long | 最近一次修改时间Unix时间戳(ms) |
| script_language | int | 脚本语言:1 - shell, 2 - bat, 3 - perl, 4 - python, 5 - powershell |
| public_script | bool | 是否公共脚本 |
| description | string | 脚本描述 |
10 changes: 8 additions & 2 deletions docs/apidoc/bk-api-gateway/v3/zh/get_script_version_detail.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,14 @@
"version": "V1.0",
"content": "#!/bin/bash***",
"status": 1,
"version_desc": "版本描述"
"version_desc": "版本描述",
"creator": "admin",
"create_time": 1600746078520,
"last_modify_user": "admin",
"last_modify_time": 1600746078520
"last_modify_time": 1600746078520,
"script_language": 1,
"public_script": false,
"description": "脚本描述"
}
}
```
Expand Down Expand Up @@ -82,3 +85,6 @@
| create_time | long | 创建时间Unix时间戳(ms) |
| last_modify_user | string | 最近一次修改人 |
| last_modify_time | long | 最近一次修改时间Unix时间戳(ms) |
| script_language | int | 脚本语言:1 - shell, 2 - bat, 3 - perl, 4 - python, 5 - powershell |
| public_script | bool | 是否公共脚本 |
| description | string | 脚本描述 |
8 changes: 7 additions & 1 deletion docs/apidoc/bk-api-gateway/v3/zh/get_script_version_list.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,10 @@
"creator": "admin",
"create_time": 1600746078520,
"last_modify_user": "admin",
"last_modify_time": 1600746078520
"last_modify_time": 1600746078520,
"script_language": 1,
"public_script": false,
"description": "脚本描述"
}
],
"start": 0,
Expand Down Expand Up @@ -90,3 +93,6 @@
| create_time | long | 创建时间Unix时间戳(ms) |
| last_modify_user | string | 最近一次修改人 |
| last_modify_time | long | 最近一次修改时间Unix时间戳(ms) |
| script_language | int | 脚本语言:1 - shell, 2 - bat, 3 - perl, 4 - python, 5 - powershell |
| public_script | bool | 是否公共脚本 |
| description | string | 脚本描述 |
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Create public script
"code": 0,
"result": true,
"data": {
"script_version_id": 1000018,
"id": 1000018,
"script_id": "4537fb49ec0840a1b91cef4179c99f9c",
"name": "public script test",
"script_language": 1,
Expand Down Expand Up @@ -73,7 +73,7 @@ Create public script

| Fields | Type | Description |
| ----------------- | ------ | ------------------------------------------------------------ |
| script_version_id | long | Script version id |
| id | long | Script version id |
| script_id | string | Script id |
| name | string | Script name |
| script_language | int | Script language:1 - shell, 2 - bat, 3 - perl, 4 - python, 5 - powershell, 6 - sql |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Create Public Script Version
"code": 0,
"result": true,
"data": {
"script_version_id": 1000020,
"id": 1000020,
"script_id": "4537fb49ec0840a1b91cef4179c99f9c",
"name": "public script test",
"script_language": 1,
Expand Down Expand Up @@ -71,7 +71,7 @@ Create Public Script Version

| Fields | Type | Description |
| ----------------- | ------ | ------------------------------------------------------------ |
| script_version_id | long | Script version id |
| id | long | Script version id |
| script_id | string | Script id |
| name | string | Script name |
| script_language | int | Script language:1 - shell, 2 - bat, 3 - perl, 4 - python, 5 - powershell, 6 - sql |
Expand Down
4 changes: 2 additions & 2 deletions docs/apidoc/esb/jobv3-confapis/apidocs/en/create_script.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Create Script
"code": 0,
"result": true,
"data": {
"script_version_id": 1000019,
"id": 1000019,
"script_id": "4a350b0e0707450e93326f6ace921072",
"name": "script test",
"script_language": 1,
Expand Down Expand Up @@ -79,7 +79,7 @@ Create Script

| Fields | Type | Description |
| ----------------- | ------ | ------------------------------------------------------------ |
| script_version_id | long | Script version id |
| id | long | Script version id |
| script_id | string | Script id |
| name | string | Script name |
| script_language | int | Script language:1 - shell, 2 - bat, 3 - perl, 4 - python, 5 - powershell, 6 - sql |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Create Script Version
"code": 0,
"result": true,
"data": {
"script_version_id": 1000021,
"id": 1000021,
"script_id": "4a350b0e0707450e93326f6ace921072",
"name": "script test",
"script_language": 1,
Expand Down Expand Up @@ -77,7 +77,7 @@ Create Script Version

| Fields | Type | Description |
| ----------------- | ------ | ------------------------------------------------------------ |
| script_version_id | long | Script version id |
| id | long | Script version id |
| script_id | string | Script id |
| name | string | Script name |
| script_language | int | Script language:1 - shell, 2 - bat, 3 - perl, 4 - python, 5 - powershell, 6 - sql |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ Disable the public script version. Once disabled successfully, it cannot be rest
"code": 0,
"result": true,
"data": {
"script_version_id": 1000018,
"id": "4537fb49ec0840a1b91cef4179c99f9c",
"id": 1000018,
"script_id": "4537fb49ec0840a1b91cef4179c99f9c",
"status": 3
}
}
Expand All @@ -56,6 +56,6 @@ Disable the public script version. Once disabled successfully, it cannot be rest

| Fields | Type | Description |
| ----------------- | ------ | ------------------------------------------------------------ |
| id | string | Script id |
| script_version_id | long | Script version id |
| script_id | string | Script id |
| id | long | Script version id |
| status | int | Script version status (0: Not online, 1: Online, 2: Offline, 3: Disabled) |
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ Disable script version, once successfully disabled, cannot be restored! And any
"code": 0,
"result": true,
"data": {
"script_version_id": 1000019,
"id": "4a350b0e0707450e93326f6ace921072",
"id": 1000019,
"script_id": "4a350b0e0707450e93326f6ace921072",
"status": 3
}
}
Expand All @@ -60,6 +60,6 @@ Disable script version, once successfully disabled, cannot be restored! And any

| Fields | Type | Description |
| ----------------- | ------ | ------------------------------------------------------------ |
| id | string | Script id |
| script_version_id | long | Script version id |
| script_id | string | Script id |
| id | long | Script version id |
| status | int | Script version status (0: Not online, 1: Online, 2: Offline, 3: Disabled) |
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,10 @@ Query public script version details
"creator": "admin",
"create_time": 1600746078520,
"last_modify_user": "admin",
"last_modify_time": 1600746078520
"last_modify_time": 1600746078520,
"script_language": 1,
"public_script": true,
"description": "script description"
}
}
```
Expand Down Expand Up @@ -73,3 +76,6 @@ Query public script version details
| create_time | long | Creation time Unix timestamp (ms)|
| last_modify_user | string | Last modify user|
| last_modify_time | long | Last modified time Unix timestamp (ms)|
| script_language | int | Script language:1 - shell, 2 - bat, 3 - perl, 4 - python, 5 - powershell, 6 - sql |
| public_script | bool | Public script or not |
| description | string | Description |
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,10 @@ Query public script version list
"creator": "admin",
"create_time": 1600746078520,
"last_modify_user": "admin",
"last_modify_time": 1600746078520
"last_modify_time": 1600746078520,
"script_language": 1,
"public_script": true,
"description": "script description"
}
],
"start": 0,
Expand Down Expand Up @@ -84,3 +87,6 @@ Query public script version list
| create_time | long | Creation time Unix timestamp (ms)|
| last_modify_user | string | Last modify user|
| last_modify_time | long | Last modified time Unix timestamp (ms)|
| script_language | int | Script language:1 - shell, 2 - bat, 3 - perl, 4 - python, 5 - powershell, 6 - sql |
| public_script | bool | Public script or not |
| description | string | Description |
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,10 @@ Query business script version details
"creator": "admin",
"create_time": 1600746078520,
"last_modify_user": "admin",
"last_modify_time": 1600746078520
"last_modify_time": 1600746078520,
"script_language": 1,
"public_script": false,
"description": "script description"
}
}
```
Expand Down Expand Up @@ -81,3 +84,6 @@ Query business script version details
| create_time | long | Creation time Unix timestamp (ms)|
| last_modify_user | string | Last modify user|
| last_modify_time | long | Last modified time Unix timestamp (ms)|
| script_language | int | Script language:1 - shell, 2 - bat, 3 - perl, 4 - python, 5 - powershell, 6 - sql |
| public_script | bool | Public script or not |
| description | string | Description |
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,10 @@ Query business script version list
"creator": "admin",
"create_time": 1600746078520,
"last_modify_user": "admin",
"last_modify_time": 1600746078520
"last_modify_time": 1600746078520,
"script_language": 1,
"public_script": false,
"description": "script description"
}
],
"start": 0,
Expand Down Expand Up @@ -92,3 +95,6 @@ Query business script version list
| create_time | long | Creation time Unix timestamp (ms)|
| last_modify_user | string | Last modify user|
| last_modify_time | long | Last modified time Unix timestamp (ms)|
| script_language | int | Script language:1 - shell, 2 - bat, 3 - perl, 4 - python, 5 - powershell, 6 - sql |
| public_script | bool | Public script or not |
| description | string | Description |
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ After the public script version is launched, the previous online script will be
"code": 0,
"result": true,
"data": {
"script_version_id": 1000018,
"id": "4537fb49ec0840a1b91cef4179c99f9c",
"id": 1000018,
"script_id": "4537fb49ec0840a1b91cef4179c99f9c",
"status": 2
}
}
Expand All @@ -56,6 +56,6 @@ After the public script version is launched, the previous online script will be

| Fields | Type | Description |
| ----------------- | ------ | ------------------------------------------------------------ |
| id | string | Script id |
| script_version_id | long | Script version id |
| script_id | string | Script id |
| id | long | Script version id |
| status | int | Script version status (0: Not online, 1: Online, 2: Offline, 3: Disabled) |
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ After the online script version is launched, the previous online script will be
"code": 0,
"result": true,
"data": {
"script_version_id": 1000019,
"id": "4a350b0e0707450e93326f6ace921072",
"id": 1000019,
"script_id": "4a350b0e0707450e93326f6ace921072",
"status": 1
}
}
Expand All @@ -60,6 +60,6 @@ After the online script version is launched, the previous online script will be

| Fields | Type | Description |
| ----------------- | ------ | ------------------------------------------------------------ |
| id | string | Script id |
| script_version_id | long | Script version id |
| script_id | string | Script id |
| id | long | Script version id |
| status | int | Script version status (0: Not online, 1: Online, 2: Offline, 3: Disabled) |
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Update public script version
"code": 0,
"result": true,
"data": {
"script_version_id": 1000020,
"id": 1000020,
"script_id": "4537fb49ec0840a1b91cef4179c99f9c",
"name": "public script test",
"script_language": 1,
Expand Down Expand Up @@ -71,7 +71,7 @@ Update public script version

| Fields | Type | Description |
| ----------------- | ------ | ------------------------------------------------------------ |
| script_version_id | long | Script version id |
| id | long | Script version id |
| script_id | string | Script id |
| name | string | Script name |
| script_language | int | Script language:1 - shell, 2 - bat, 3 - perl, 4 - python, 5 - powershell, 6 - sql |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Update Script Version Information
"code": 0,
"result": true,
"data": {
"script_version_id": 1000019,
"id": 1000019,
"script_id": "4a350b0e0707450e93326f6ace921072",
"name": "script test",
"script_language": 1,
Expand Down Expand Up @@ -77,7 +77,7 @@ Update Script Version Information

| Fields | Type | Description |
| ----------------- | ------ | ------------------------------------------------------------ |
| script_version_id | long | Script version id |
| id | long | Script version id |
| script_id | string | Script id |
| name | string | Script name |
| script_language | int | Script language:1 - shell, 2 - bat, 3 - perl, 4 - python, 5 - powershell, 6 - sql |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"code": 0,
"result": true,
"data": {
"script_version_id": 1000018,
"id": 1000018,
"script_id": "4537fb49ec0840a1b91cef4179c99f9c",
"name": "public script test",
"script_language": 1,
Expand Down Expand Up @@ -73,7 +73,7 @@

| 字段 | 类型 | 描述 |
| ----------------- | ------ | ------------------------------------------------------------ |
| script_version_id | long | 公共脚本版本ID |
| id | long | 公共脚本版本ID |
| script_id | string | 公共脚本ID |
| name | string | 公共脚本名称 |
| script_language | int | 脚本语言:1 - shell, 2 - bat, 3 - perl, 4 - python, 5 - powershell, 6 - sql |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"code": 0,
"result": true,
"data": {
"script_version_id": 1000020,
"id": 1000020,
"script_id": "4537fb49ec0840a1b91cef4179c99f9c",
"name": "public script test",
"script_language": 1,
Expand Down Expand Up @@ -71,7 +71,7 @@

| 字段 | 类型 | 描述 |
| ----------------- | ------ | ------------------------------------------------------------ |
| script_version_id | long | 公共脚本版本ID |
| id | long | 公共脚本版本ID |
| script_id | string | 公共脚本ID |
| name | string | 公共脚本名称 |
| script_language | int | 脚本语言:1 - shell, 2 - bat, 3 - perl, 4 - python, 5 - powershell, 6 - sql |
Expand Down
Loading

0 comments on commit ecaf85d

Please sign in to comment.