A AuthMS API Wiki API Reference iam.tianv.com →

GET /admin/communication/templates/{id}/versions

根据模板ID获取该模板的所有历史版本记录。每次更新模板会递增版本号并保存快照,用于变更追溯和版本回退参考。参考:ePrivacy Directive 2002/58/EC、CAN-SPAM Act。

通信服务 `bearerAuth` application/json

Request Parameters

NameInTypeRequiredDefaultExampleConstraintsDescription
id path string Yes 模板ID

Responses

StatusDescriptionSchema
200查询成功,返回版本历史列表dto.TemplateVersionListResponse
400请求参数错误dto.SimpleResponse
401未认证或令牌无效dto.SimpleResponse
403无权访问该资源dto.SimpleResponse
404模板不存在dto.SimpleResponse
500服务内部错误dto.SimpleResponse

Referenced Schemas

dto.PageInfo

FieldTypeRequiredExampleConstraintsDescription
has_next boolean No HasNext indicates whether there is a next page
has_prev boolean No HasPrev indicates whether there is a previous page
page integer No Page is the current page number (1-based)
page_size integer No PageSize is the number of items per page
total integer No Total is the total number of items across all pages
total_pages integer No TotalPages is the total number of pages

dto.SimpleResponse

FieldTypeRequiredExampleConstraintsDescription
code integer No
message string No
timestamp string No

dto.TemplateVersionListResponse

FieldTypeRequiredExampleConstraintsDescription
code integer No
items array of

See dto.TemplateVersionResponse

No 统一使用 items
message string No
pagination object No 分页信息(嵌套对象)
timestamp string No
total integer No 总条数(平铺,便于直接读取)

dto.TemplateVersionResponse

FieldTypeRequiredExampleConstraintsDescription
changed_by string No usr_abc123
channel string No sms
code string No verify_code
content string No 您的验证码是{code},5分钟内有效
content_type string No text
created_at string No 2026-04-15T10:00:00Z
id string No tv_abc123
name string No 验证码模板
subject string No 验证码通知
template_id string No tpl_abc123
text_content string No
variables string No ["code"]
version integer No 3