查询消息模板详情
功能介绍
查询模板详情,包括模板内容。
调用方法
请参见如何调用API。
URI
GET /v2/{project_id}/notifications/message_template/{message_template_id}
请求参数
| 参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
| X-Auth-Token | 是 | String | 用户Token。 通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。 |
响应参数
状态码: 200
| 参数 | 参数类型 | 描述 |
|---|---|---|
| message_template_id | String | 模板ID。 |
| message_template_name | String | 模板名称。 |
| protocol | String | 模板支持的协议类型。 目前支持的协议包括: “default”:默认协议。 “email”:邮件传输协议。 “sms”:短信传输协议。 “functionstage”:FunctionGraph(函数)传输协议。 “dms”:DMS传输协议。 “http”、“https”:HTTP/HTTPS传输协议。 |
| tag_names | Array of strings | 模板tag列表。 是消息模板“{}”内的字段,在具体使用消息模板时,可根据实际情况替为该字段赋值。 |
| create_time | String | 模板创建时间。 时间格式为UTC时间,YYYY-MM-DDTHH:MM:SSZ。 |
| update_time | String | 模板最后更新时间。时间格式为UTC时间,YYYY-MM-DDTHH:MM:SSZ。 |
| content | String | 模板内容。 |
| request_id | String | 请求的唯一标识ID。 |
请求示例
查询消息模板详情
GET https://{SMN_Endpoint}/v2/{project_id}/notifications/message_template/57ba8dcecda844878c5dd5815b65d10f
null 响应示例
状态码: 200
OK
{
"message_template_id" : "57ba8dcecda844878c5dd5815b65d10f",
"message_template_name" : "confirm_message",
"protocol" : "https",
"tag_names" : [ "topic_id_id4" ],
"create_time" : "2016-08-02T08:22:20Z",
"update_time" : "2016-08-02T08:22:25Z",
"content" : "(1/24)You are invited to subscribe to topic({topic_id_id4}). Click the following URL to confirm subscription:(If you do not want to subscribe to this topic, ignore this message.)",
"request_id" : "ba79ca8f794f4f50985ce7b98a401b47"
} 状态码
| 状态码 | 描述 |
|---|---|
| 200 | OK |
错误码
请参见错误码。