接口功能介绍
分页查询DDL任务列表。
接口约束
请先订购DRDS实例。请先订购和DRDS实例在一个资源池同一个VPC下的RDS-MySQL实例,并关联到DRDS实例。请先创建一个schema。
URI
GET /v2/ddl-task/list
路径参数
无
Query参数
参数 | 是否必填 | 参数类型 | 说明 | 示例 | 下级对象 |
---|---|---|---|---|---|
prodInstId | 是 | String | DRDS产品实例id | a15838ebf80644d7aa07e39a3905eead | |
schemaName | 是 | String | schema名称 | sc1 | |
pageNow | 否 | Integer | 当前页,若为空或小于1,默认是1 | 1 | |
pageSize | 否 | Integer | 页大小,若为空或小于1,默认是10 | 10 |
请求参数
请求头header参数
无
请求体body参数
无
响应参数
参数 | 是否必填 | 参数类型 | 说明 | 示例 | 下级对象 |
---|---|---|---|---|---|
code | 是 | String | 返回码 取值范围:0表示成功,1表示失败 | 0 | |
message | 是 | String | 结果描述 | success | |
result | 否 | Array of Objects | 返回对象,列表,若无该字段或该字段为null或者空列表,都代表返回对象为空。 | result |
表 result
参数 | 是否必填 | 参数类型 | 说明 | 示例 | 下级对象 |
---|---|---|---|---|---|
jobId | 是 | Long | id | ||
createTime | 是 | String | 创建时间 | ||
finishTime | 否 | String | 结束时间 | ||
result | 是 | Byte | 执行结果, 0成功 1正在执行 2失败 3取消 4警告 | ||
tenantId | 否 | Long | 创建者 | ||
schemaName | 是 | String | schema名称 | ||
schemaId | 否 | String | schema id | ||
createdBy | 否 | Long | 创建者用户id | ||
createdName | 否 | String | 创建者用户名 | ||
script | 是 | String | SQL语句 |
请求示例
请求头header
无
请求体body
无
响应示例
{
"code": 0,
"message": "success",
"result": [
{
"jobId": 113,
"createTime": "2022-10-19T08:05:35.000+00:00",
"finishTime": "2022-10-19T08:05:40.000+00:00",
"result": 4,
"tenantId": 352412328,
"schemaName": "sc1",
"schemaId": "/dbproxy_cluster/dbproxy_cluster_0000000001/schemas/schema_0000000106",
"createdBy": 352401914,
"createdName": "testpermission@qq.com",
"script": "create table t8(id int not null primary key, name varchar(64) not null);\ncreate table t9(id int not null primary key, name varchar(64) not null);"
},
{
"jobId": 112,
"createTime": "2022-10-17T13:58:44.000+00:00",
"finishTime": "2022-10-17T13:58:47.000+00:00",
"result": 4,
"tenantId": 352412328,
"schemaName": "sc1",
"schemaId": "/dbproxy_cluster/dbproxy_cluster_0000000001/schemas/schema_0000000106",
"createdBy": 352401914,
"createdName": "testpermission@qq.com",
"script": "create table t7(id int not null primary key, name varchar(64) not null)"
}
]
}
状态码
请参考 状态码说明。