查询通知渠道
POST
/web/v1/notification-channels/queryWEB使用可选筛选条件查询通知渠道。返回分页结果。
鉴权
需要有效的 JWT token 和 Turnstile 验证。Gateway 校验:enableJwtToken=true, enableTurnstile=true。
请求参数
请求体
NotificationChannelQueryRequest:
| Name | Type | Required | In | Description |
|---|---|---|---|---|
bizId | string | No | body | 按渠道业务 ID 筛选(最长 64 字符) |
institutionBizId | string | No | body | 按机构业务 ID 筛选(最长 64 字符) |
channelName | string | No | body | 按渠道名称筛选(最长 255 字符) |
channelCategory | string | No | body | 按分类筛选:EMAIL |
channelStatus | string | No | body | 按状态筛选:ACTIVE, INACTIVE, PENDING, ERROR |
activeOnly | boolean | No | body | 如果为 true,仅返回活跃渠道 |
查询参数(分页)
| Name | Type | Required | In | Description |
|---|---|---|---|---|
page | integer | No | query | 页码(从 0 开始) |
size | integer | No | query | 每页大小 |
sort | string | No | query | 排序字段和方向(例如 createdAt,desc) |
成功响应
成功200
{
"code": "2000",
"message": "SUCCESS",
"data": {
"content": [
{
"bizId": "ch_abc123",
"institutionBizId": "inst_abc123",
"channelName": "Main Email",
"channelRemark": null,
"channelHost": "smtp.example.com",
"channelCategory": "EMAIL",
"channelStatus": "ACTIVE",
"emailConfig": {
"smtpHost": "smtp.example.com",
"smtpPort": 587,
"senderEmail": "noreply@example.com",
"senderName": "Acme Corp",
"username": "noreply@example.com",
"password": "******",
"useSsl": true,
"useStartTls": false,
"connectionTimeout": 10000,
"readTimeout": 30000
},
"createdAt": "2026-03-21T00:00:00Z",
"updatedAt": "2026-03-21T00:00:00Z",
"createdBy": "user_xyz",
"updatedBy": "user_xyz"
}
],
"totalElements": 1,
"totalPages": 1,
"number": 0,
"size": 20
}
}错误响应
| 错误码 | 描述 |
|---|---|
4010 | 未授权(JWT token 无效或缺失) |
4030 | Turnstile 验证失败 |
说明
- 所有筛选字段均为可选;省略时将返回所有渠道。
- 响应使用 Spring Data
Page格式,包含content、totalElements、totalPages、number和size字段。 - 响应中邮箱配置的密码已脱敏。