查询事件通知规则列表
更新时间 2026-07-31 15:06:43
最近更新时间: 2026-07-31 15:06:43
接口功能介绍
查询事件通知规则列表
接口约束
仅限企业版实例使用
URI
GET /v2/listEventRule
路径参数 无
Query参数
| 参数 | 是否必填 | 参数类型 | 说明 | 示例 | 下级对象 |
|---|---|---|---|---|---|
| instanceId | 是 | String | 实例ID | f04e47d9b48747958c9f4516cf1a8d82 | |
| ruleName | 否 | String | 规则名称,支持模糊查询 | test_rule | |
| pageNum | 否 | Integer | 当前页码(默认为1) | 1 | |
| pageSize | 否 | Integer | 每页条数(默认为10,最大值为50) | 10 |
请求参数
请求头header参数
| 参数 | 是否必填 | 参数类型 | 说明 | 示例 | 下级对象 |
|---|---|---|---|---|---|
| Content-Type | 是 | String | 类型 | application/json | |
| regionId | 是 | String | 资源池编码(资源池ID,您可以查看容器镜像服务资源池获取) | bb9fdb42056f11eda1610242ac110002 |
请求体body参数 无
响应参数
| 参数 | 参数类型 | 说明 | 示例 | 下级对象 |
|---|---|---|---|---|
| statusCode | Integer | 响应码 (800为请求成功,900为失败 ) | 800 | |
| message | String | 返回信息 | ||
| error | String | 错误码 | ||
| returnObj | Object | 返回结果 | returnObj |
表 returnObj
| 参数 | 参数类型 | 说明 | 示例 | 下级对象 |
|---|---|---|---|---|
| total | Integer | 总条数 | 5 | |
| size | Integer | 每页条数 | 10 | |
| current | Integer | 当前页码 | 1 | |
| pages | Integer | 总页数 | 1 | |
| records | Array of Objects | 规则列表 | record |
表 record
| 参数 | 参数类型 | 说明 | 示例 | 下级对象 |
|---|---|---|---|---|
| instanceId | String | 实例ID | f04e47d9b48747958c9f4516cf1a8d82 | |
| ruleId | String | 规则ID | 1848620848898904065 | |
| ruleName | String | 规则名称 | test_rule | |
| eventType | String | 事件类型 | sign | |
| eventScope | String | 生效范围 | repository | |
| namespaceId | String | 命名空间ID | f5b49578426e6da458fb9aba36d8cfdb | |
| namespaceName | String | 命名空间名称 | test_namespace | |
| repositoryId | String | 仓库ID | 9c7f70ae24dbdf535d81f6f94cc8fe01 | |
| repositoryName | String | 仓库名称 | test_repository | |
| tagPattern | String | 标签匹配的正则表达式 | v1 | |
| notifyUrl | String | 通知URL | http://test.com | |
| notifyFields | String | 通知参数 | InstanceId,NamespaceName | |
| disabled | Boolean | 是否禁用 | false | |
| createdTime | String | 创建时间 | 2023-07-18 17:11:26 |
枚举参数
无
请求示例
请求url
GET https://crs-global.ctapi.ctyun.cn/v2/listEventRule?instanceId=f04e47d9b48747958c9f4516cf1a8d82&ruleName=test_rule
请求头header
{
"Content-Type": "application/json",
"regionId": "bb9fdb42056f11eda1610242ac110002"
}
请求体body
无
响应示例
{
"statusCode": 800,
"message": "",
"returnObj": {
"records": [
{
"instanceId": "f04e47d9b48747958c9f4516cf1a8d82",
"ruleId": "1848620848898904065",
"ruleName": "test_rule",
"eventType": "sign",
"eventScope": "repository",
"namespaceId": "f5b49578426e6da458fb9aba36d8cfdb",
"namespaceName": "test_namespace",
"repositoryId": "9c7f70ae24dbdf535d81f6f94cc8fe01",
"repositoryName": "test_repository",
"tagPattern": "v1",
"notifyUrl": "http://test.com",
"notifyFields": "InstanceId,NamespaceName",
"disabled": false,
"createdTime": "2023-07-18 17:11:26"
}
],
"total": "1",
"size": "10",
"current": "1",
"pages": "1"
}
}
状态码
请参考 状态码
错误码
请参考 错误码