模板相关接口
更新时间:2021-12-14
获取模板列表
接口描述
本接口用于获取模板列表。
请求结构
Plain Text
1POST /api/v{version}/seniorbsc/template/list HTTP/1.1
2 {
3 ListUserTemplateRequest
4 }
-
请求头域
除公共头域外,无其它特殊头域。
- 请求参数
参数名称 | 类型 | 是否必需 | 参数位置 | 描述 |
---|---|---|---|---|
version | String | 是 | URL | API版本号 |
ListUserTemplateRequest | [ListUserTemplateRequest] | 是 | RequestBody | 获取模板列表参数 |
返回
-
返回头域
除公共头域,无其它特殊头域。
- 返回参数
参数名称 | 类型 | 描述 |
---|---|---|
page | Int | 当前页码 |
pageSize | Int | 每页展示数量 |
totalCount | Long | 总记录数 |
result | List[Template] | 响应带回的具体数据 |
示例
-
请求示例
Plain Text1POST /api/v3/seniorbsc/template/list HTTP/1.1 2authorization: bce-auth-v1/2f48672d408541d99c083131d9ba2926/2019-03-27T07:41:49Z/3600/host;x-bce-console-rpc-id;x-bce-date/66be528d53fb9f0716049004ebc7c93a9801e022252760be49c8b4b0428bc600 3x-bce-console-rpc-id: 5377d020-48d4-4567-be82-dfd08af91ab0 4x-bce-date: 2019-03-27T07:41:49Z 5x-Region: bj 6{ 7 "page": "总页数", 8 "pageSize": "每页数量" 9 "orderBy": "排序字段", 10 "order": "排序规则", 11 "category": "PRIVATE", 12 "name": "模板名称" 13}
-
返回示例
Plain Text1HTTP/1.1 200 OK 2Transfer-Encoding: chunked 3Cache-Control: no-cache 4Server: BWS 5Date: Thu, 16 Feb 2017 02:17:26 GMT 6Content-Type: application/json;charset=UTF-8 7 8{ 9 "status": 200, 10 "success": true, 11 "pageNo": 当前页码, 12 "pageSize": 每页记录数, 13 "totalCount": 总记录数, 14 "result": 15 [ 16 { 17 "id": 模板ID, 18 "accountId": "用户账号", 19 "name": 模板名称, 20 "region": "地域", 21 "createBy": "创建人", 22 "createAt": 创建时间, 23 "updateBy": "更新人", 24 "updateAt": 更新时间, 25 "deleteAt": 删除时间, 26 "description": "模板描述" 27 }, 28 ... 29 ] 30}
获取模板详情
描述
本接口用于获取模板详情。
请求
-
请求结构
Plain Text1GET /api/v{version}/seniorbsc/template/detail/{templateId} HTTP/1.1
-
请求头域
除公共头域外,无其它特殊头域。
- 请求参数
参数名称 | 类型 | 是否必需 | 参数位置 | 描述 |
---|---|---|---|---|
version | String | 是 | URL | API版本号 |
templateId | Long | 是 | URL | 模版ID |
返回
-
返回头域
除公共头域,无其它特殊头域。
- 返回参数
参数名称 | 类型 | 描述 |
---|---|---|
result | [Template] | 返回结果 |
示例
-
请求示例
Plain Text1GET /api/v3/seniorbsc/template/detail/3452 HTTP/1.1 2authorization: bce-auth-v1/2f48672d408541d99c083131d9ba2926/2019-03-27T07:41:49Z/3600/host;x-bce-console-rpc-id;x-bce-date/66be528d53fb9f0716049004ebc7c93a9801e022252760be49c8b4b0428bc600 3x-bce-console-rpc-id: 5377d020-48d4-4567-be82-dfd08af91ab0 4x-bce-date: 2019-03-27T07:41:49Z 5x-Region: bj
-
返回示例
Plain Text1HTTP/1.1 200 OK 2Transfer-Encoding: chunked 3Cache-Control: no-cache 4Server: BWS 5Date: Thu, 16 Feb 2017 02:17:26 GMT 6Content-Type: application/json;charset=UTF-8 7 8{ 9 "status": 200, 10 "success": true, 11 "result": { 12 "id": 模板ID, 13 "name": "模板名称", 14 "description": "模板描述", 15 "code": "代码", 16 "createBy": "创建人", 17 "createAt": 创建时间, 18 "updateBy": "更新人", 19 "updateAt": 更新时间 20 } 21}
创建模板
描述
本接口用于创建模板。
请求
-
请求结构
Plain Text1POST /api/v{version}/seniorbsc/template/create HTTP/1.1 2 3{ 4 CreateTemplateParameters 5}
-
请求头域
除公共头域外,无其它特殊头域。
- 请求参数
参数名称 | 类型 | 是否必需 | 参数位置 | 描述 |
---|---|---|---|---|
version | String | 是 | URL | API版本号 |
CreateTemplateRequest | [CreateTemplateRequest] | 是 | RequestBody | 创建模板参数 |
返回
-
返回头域
除公共头域,无其它特殊头域。
- 返回参数
参数名称 | 类型 | 描述 |
---|---|---|
templateId | String | 模型Id |
示例
-
请求示例
Plain Text1POST /api/v3/seniorbsc/template/create HTTP/1.1 2authorization: bce-auth-v1/2f48672d408541d99c083131d9ba2926/2019-03-27T07:41:49Z/3600/host;x-bce-console-rpc-id;x-bce-date/66be528d53fb9f0716049004ebc7c93a9801e022252760be49c8b4b0428bc600 3x-bce-console-rpc-id: 5377d020-48d4-4567-be82-dfd08af91ab0 4x-bce-date: 2019-03-27T07:41:49Z 5x-Region: bj 6 7{ 8 "name": "模板名称", 9 "code": "代码", 10 "description": "模板描述" 11 ... 12}
-
返回示例
Plain Text1HTTP/1.1 200 OK 2Transfer-Encoding: chunked 3Cache-Control: no-cache 4Server: BWS 5Date: Thu, 16 Feb 2017 02:17:26 GMT 6Content-Type: application/json;charset=UTF-8 7 8{ 9 "status": 200, 10 "success": true, 11 "result": { 12 "templateId": 模板ID, 13 } 14}
修改模板
描述
本接口用于修改模板。
请求
-
请求结构
Plain Text1POST /api/v{version}/seniorbsc/template/update/${templateId} HTTP/1.1 2 3{ 4 UpdateTemplateRequest 5}
-
请求头域
除公共头域外,无其它特殊头域。
- 请求参数
参数名称 | 类型 | 是否必需 | 参数位置 | 描述 |
---|---|---|---|---|
version | String | 是 | URL | API版本号 |
UpdateTemplateRequest | [UpdateTemplateRequest] | 是 | RequestBody | 修改模板参数 |
返回
-
返回头域
除公共头域,无其它特殊头域。
- 返回参数
参数名称 | 类型 | 描述 |
---|---|---|
templateId | String | 模型Id |
示例
-
请求示例
Plain Text1POST /api/v3/seniorbsc/template/update/123 HTTP/1.1 2authorization: bce-auth-v1/2f48672d408541d99c083131d9ba2926/2019-03-27T07:41:49Z/3600/host;x-bce-console-rpc-id;x-bce-date/66be528d53fb9f0716049004ebc7c93a9801e022252760be49c8b4b0428bc600 3x-bce-console-rpc-id: 5377d020-48d4-4567-be82-dfd08af91ab0 4x-bce-date: 2019-03-27T07:41:49Z 5x-Region: bj 6 7{ 8 "name": "模板名称", 9 "region": "bj", 10 "description": "模板描述", 11 "code": "代码" 12}
-
返回示例
Plain Text1HTTP/1.1 200 OK 2Transfer-Encoding: chunked 3Cache-Control: no-cache 4Server: BWS 5Date: Thu, 16 Feb 2017 02:17:26 GMT 6Content-Type: application/json;charset=UTF-8 7 8{ 9 "status": 200, 10 "success": true 11 "result": { 12 "templateId" : "xxx" 13 } 14}
删除模板
描述
本接口用于删除模板。
请求
-
请求结构
Plain Text1POST /api/v{version}/seniorbsc/template/delete/{templateId} HTTP/1.1
-
请求头域
除公共头域外,无其它特殊头域。
- 请求参数
参数名称 | 类型 | 是否必需 | 参数位置 | 描述 |
---|---|---|---|---|
version | String | 是 | URL | API版本号 |
templateId | Long | 是 | URL | 模板id |
返回
-
返回头域
除公共头域,无其它特殊头域。
示例
-
请求示例
Plain Text1POST /api/v3/seniorbsc/template/delete/3452 HTTP/1.1 2authorization: bce-auth-v1/2f48672d408541d99c083131d9ba2926/2019-03-27T07:41:49Z/3600/host;x-bce-console-rpc-id;x-bce-date/66be528d53fb9f0716049004ebc7c93a9801e022252760be49c8b4b0428bc600 3x-bce-console-rpc-id: 5377d020-48d4-4567-be82-dfd08af91ab0 4x-bce-date: 2019-03-27T07:41:49Z 5x-Region: bj
-
返回示例
Plain Text1HTTP/1.1 200 OK 2Transfer-Encoding: chunked 3Cache-Control: no-cache 4Server: BWS 5Date: Thu, 16 Feb 2017 02:17:26 GMT 6Content-Type: application/json;charset=UTF-8 7 8{ 9 "status": 200, 10 "success": true 11}
模型定义
ListUserTemplateRequest
参数名称 | 类型 | 描述 |
---|---|---|
region | String | 作业所在地域,如保定区域为bd |
page | Integer | 请求分页的总页数 |
pageSize | Integer | 每页大小 |
name | String | 作业名 |
category | String | 模板类别(PUBLIC or PRIVATE) |
orderBy | String | 排序字段 |
order | String | asc或desc,顺序或倒序 |
keyWords | List[Map[String, String]] | 根据关键字过滤 |
CreateTemplateRequest
参数名称 | 类型 | 描述 |
---|---|---|
region | String | 所在地域,如保定区域为bd |
name | String | 模型名称,只能包含大小写英文字母,数字,下划线_ ,横行- |
type | String | 模型类型 (SPARK or FLINK) |
description | String | 模型描述 |
UpdateTemplateRequest
参数名称 | 类型 | 描述 |
---|---|---|
region | String | 所在地域,如保定区域为bd |
name | String | 模型名称,只能包含大小写英文字母,数字,下划线_ ,横行- |
code | String | base64之后的code |
description | String | 模型描述 |
CreateTemplateRequest
参数名称 | 类型 | 描述 |
---|---|---|
region | String | 所在地域,如保定区域为bd |
name | String | 模型名称,只能包含大小写英文字母,数字,下划线_ ,横行- |
type | String | 模型类型 (SPARK or FLINK) |
description | String | 模型描述 |
Template
参数名称 | 类型 | 描述 |
---|---|---|
templateId | String | 模板ID |
region | String | 作业区域 |
accountId | String | 账户名称 |
name | String | 模板名称 |
type | String | 模板类型(FLINK or SPARK) |
category | String | 模板类别(PUBLIC or PRIVATE) |
code | String | base64编码之后的code |
createUser | String | 创建人 |
createTime | String | 创建时间 |
modifyUser | String | 更新人 |
modifyTime | String | 更新时间 |
isDeleted | Integer | 是否删除 |
description | String | 模板描述 |