หน้านี้ยังไม่พร้อมใช้งานในภาษาท้องถิ่นของคุณ เรากำลังพยายามอย่างหนักเพื่อเพิ่มเวอร์ชันภาษาอื่น ๆ เพิ่มเติม ขอบคุณสำหรับการสนับสนุนเสมอมา
- What's New
- Function Overview
- Service Overview
- Getting Started
-
User Guide
- Topic Management
- Subscription Management
- Message Template Management
- SMN Operation Recording
- Cloud Eye Monitoring
- Logs
- Permissions Management
- Quotas
- Appendix
- Best Practices
-
API Reference
- Before You Start
- API Overview
- Calling APIs
- Getting Started
- APIs
- Examples
- Permissions Policies and Supported Actions
- Public Parameters
- Out-of-Date APIs
- Appendix
- SDK Reference
-
FAQs
- What Are the Advantages of SMN?
- What Protocols Does SMN Support?
- How Is SMN Billed?
- What Are the Requirements for an SMN Topic Name?
- How Many Topics Can I Create?
- How Many Subscriptions Can Be Added to a Topic?
- How Many Messages Can Be Published to a Topic?
- How Many Message Templates Can I Create?
- What Are the Limitations on SMS Messages?
- Can I Add Subscriptions Using Multiple Protocols to a Topic?
- Can a Topic Creator Change Subscription Protocols in a Topic?
- Can I Change a Subscription Endpoint for a Topic?
- Can I Delete a Published Message?
- Does SMN Ensure That Messages Are Received by Subscription Endpoints?
- Will a Subscriber Receive the Same Message Multiple Times?
- Why Do Subscribers Fail to Receive Messages After I Publish Messages to a Topic?
- What Can I Do When Pictures in an Email Message Cannot Be Displayed?
- Does SMN Always Use the Same Phone Number or Sender Name to Send SMS Messages?
- How Do I Obtain My Account ID?
- How Does a DingTalk, Internal DingTalk, Lark, or WeCom Chatbot Obtain Subscription Endpoints?
- Videos
-
More Documents
-
User Guide (ME-Abu Dhabi Region)
- Overview
- Getting Started
- Topic Management
- Subscription Management
- Message Template Management
- SMN Operation Recording
- Logs
- Permissions Management
- Quotas
-
FAQs
- What Are the Advantages of SMN?
- What Protocols Does SMN Support?
- What Are the Requirements for an SMN Topic Name?
- How Many Topics Can I Create?
- How Many Subscriptions Can Be Added to a Topic?
- How Many Messages Can Be Published to a Topic?
- How Many Message Templates Can I Create?
- Can I Add Subscriptions Using Multiple Protocols to a Topic?
- Can a Topic Creator Change Subscription Protocols in a Topic?
- Can I Change a Subscription Endpoint for a Topic?
- Can I Delete a Published Message?
- Does SMN Ensure That Messages Are Received by Subscription Endpoints?
- Will a Subscriber Receive the Same Message Multiple Times?
- Why Do Subscribers Fail to Receive Messages After I Publish Messages to a Topic?
- What Can I Do When Pictures in an Email Message Cannot Be Displayed?
- How Do I Obtain My Account ID?
- Appendix
- Change History
- API Reference
-
User Guide (Paris Region)
- Overview
- Getting Started
- Topic Management
- Subscription Management
- Message Template Management
- SMN Operation Recording
- Logs
- Quotas
-
FAQs
- What Are the Advantages of SMN?
- What Protocols Does SMN Support?
- What Are the Requirements for an SMN Topic Name?
- How Many Topics Can I Create?
- How Many Subscriptions Can Be Added to a Topic?
- How Many Messages Can Be Published to a Topic?
- How Many Message Templates Can I Create?
- What Are the Limitations on SMS Messages?
- Can I Add Subscriptions Using Multiple Protocols to a Topic?
- Can a Topic Creator Change Subscription Protocols in a Topic?
- Can I Change a Subscription Endpoint for a Topic?
- Can I Delete a Published Message?
- Does SMN Ensure That Messages Are Received by Subscription Endpoints?
- Will a Subscriber Receive the Same Message Multiple Times?
- Why Do Subscribers Fail to Receive Messages After I Publish Messages to a Topic?
- What Can I Do When Pictures in an Email Message Cannot Be Displayed?
- How Do I Obtain My Account ID?
- Appendix
- Change History
- API Reference (Paris Region)
-
User Guide (Kuala Lumpur Region)
- Overview
- Getting Started
- Topic Management
- Subscription Management
- Message Template Management
- SMN Operation Recording
- Logs
- Permissions Management
- Quotas
-
FAQs
- What Are the Advantages of SMN?
- What Protocols Does SMN Support?
- What Are the Requirements for an SMN Topic Name?
- How Many Topics Can I Create?
- How Many Subscriptions Can Be Added to a Topic?
- How Many Messages Can Be Published to a Topic?
- How Many Message Templates Can I Create?
- Can I Add Subscriptions Using Multiple Protocols to a Topic?
- Can a Topic Creator Change Subscription Protocols in a Topic?
- Can I Change a Subscription Endpoint for a Topic?
- Can I Delete a Published Message?
- Does SMN Ensure That Messages Are Received by Subscription Endpoints?
- Will a Subscriber Receive the Same Message Multiple Times?
- Why Do Subscribers Fail to Receive Messages After I Publish Messages to a Topic?
- What Can I Do When Pictures in an Email Message Cannot Be Displayed?
- How Do I Obtain My Account ID?
- Appendix
- Change History
- API Reference (Kuala Lumpur Region)
-
User Guide (Ankara Region)
- Overview
- Getting Started
- Topic Management
- Subscription Management
- Message Template Management
- Permissions Management
- Quotas
-
FAQs
- What Are the Advantages of SMN?
- What Protocols Does SMN Support?
- What Are the Requirements for an SMN Topic Name?
- How Many Topics Can I Create?
- How Many Subscriptions Can Be Added to a Topic?
- How Many Messages Can Be Published to a Topic?
- How Many Message Templates Can I Create?
- Can I Add Subscriptions Using Multiple Protocols to a Topic?
- Can a Topic Creator Change Subscription Protocols in a Topic?
- Can I Change a Subscription Endpoint for a Topic?
- Can I Delete a Published Message?
- Does SMN Ensure That Messages Are Received by Subscription Endpoints?
- Will a Subscriber Receive the Same Message Multiple Times?
- Why Do Subscribers Fail to Receive Messages After I Publish Messages to a Topic?
- What Can I Do When Pictures in an Email Message Cannot Be Displayed?
- How Do I Obtain My Account ID?
- Appendix
- Change History
- API Reference (Ankara Region)
-
User Guide (ME-Abu Dhabi Region)
- General Reference
Copied.
Querying Message Templates
Function
This API is used to query the template list by page. The list is sorted by template creation time in ascending order. You can specify offset and limit. If no template has been created, an empty list is returned. The parameters message_template_name and protocol are added.
Calling Method
For details, see Calling APIs.
URI
GET /v2/{project_id}/notifications/message_template
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Specifies the project ID.For details about how to obtain the project ID, see Obtaining the Project ID. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
offset |
No |
Integer |
Specifies the offset. If the offset is an integer greater than 0 but less than the number of resources, all resources in excess of this offset will be queried. The default offset is 0. Default: 0 |
limit |
No |
Integer |
The number ranges from 1 to 100 and is generally 10, 20, or 50. Specifies the number of resources returned on each page. The default number is 100. Default: 100 |
message_template_name |
No |
String |
Specifies the template name. Enter 1 to 64 characters, and start with a letter or digit. Only letters, digits, hyphens (-), and underscores (_) are allowed. |
protocol |
No |
String |
Specifies the protocol supported by the template. The following protocols are supported: default sms functionstage dms http and https |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
Specifies a user token. It can be obtained by calling an IAM API. The value of X-Subject-Token in the response header is the user token. |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
request_id |
String |
Specifies the request ID, which is unique. |
message_template_count |
Integer |
Specifies the number of returned templates. |
message_templates |
Array of MessageTemplate objects |
Specifies the Message_template structure array. |
Parameter |
Type |
Description |
---|---|---|
message_template_id |
String |
Specifies the template ID. |
message_template_name |
String |
Specifies the template name. |
protocol |
String |
Specifies the protocol supported by the template. The following protocols are supported: sms functionstage dms http and https |
tag_names |
Array of strings |
Specifies the variable list. |
create_time |
String |
Specifies when the template was created. The UTC time is in YYYY-MM-DDTHH:MM:SSZ format. |
update_time |
String |
Specifies the last time when the template was updated. The UTC time is in YYYY-MM-DDTHH:MM:SSZ format. |
Status code: 400
Parameter |
Type |
Description |
---|---|---|
request_id |
String |
Specifies the request ID, which is unique. |
code |
String |
Specifies the error code. |
message |
String |
Describes the error message. |
Status code: 403
Parameter |
Type |
Description |
---|---|---|
request_id |
String |
Specifies the request ID, which is unique. |
code |
String |
Specifies the error code. |
message |
String |
Describes the error message. |
Status code: 404
Parameter |
Type |
Description |
---|---|---|
request_id |
String |
Specifies the request ID, which is unique. |
code |
String |
Specifies the error code. |
message |
String |
Describes the error message. |
Status code: 500
Parameter |
Type |
Description |
---|---|---|
request_id |
String |
Specifies the request ID, which is unique. |
code |
String |
Specifies the error code. |
message |
String |
Describes the error message. |
Example Requests
Querying message templates
GET https://{SMN_Endpoint}/v2/{project_id}/notifications/message_template?offset=0&limit=2&message_template_name=test1&protocol=email null
Example Responses
Status code: 200
OK
{ "request_id" : "6a63a18b8bab40ffb71ebd9cb80d0085", "message_template_count" : 3, "message_templates" : [ { "message_template_name" : "confirm_message", "protocol" : "sms", "update_time" : "2016-08-02T08:22:18Z", "create_time" : "2016-08-02T08:22:18Z", "tag_names" : [ "topic_urn" ], "message_template_id" : "79227dfdf88d4e52a1820ca1eb411635" }, { "message_template_name" : "confirm_message", "protocol" : "email", "update_time" : "2016-08-02T08:22:19Z", "create_time" : "2016-08-02T08:22:19Z", "tag_names" : [ "topic_id" ], "message_template_id" : "ecf63465804a4b10a0573980be78ffba" }, { "message_template_name" : "confirm_message", "protocol" : "https", "update_time" : "2016-08-02T08:22:20Z", "create_time" : "2016-08-02T08:22:20Z", "tag_names" : [ "topic_id" ], "message_template_id" : "57ba8dcecda844878c5dd5815b65d10f" } ] }
Status Codes
Status Code |
Description |
---|---|
200 |
OK |
400 |
Bad Request |
403 |
Unauthorized |
404 |
Not Found |
500 |
Internal Server Error |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot