Get the list of templates for messages in the notification center

Last Updated on : 2023-06-20 12:34:13download

Get the list of templates for messages in the notification center.

API address

GET: /v1.0/iot-03/msg-templates/app-notifications

Request parameter

Parameter name Type IN Required Description
page_no Integer query false The page number. Query the first page if this parameter is not entered.
page_size Integer query false The page size. It is 10 by default if this parameter is not entered.
sort Integer query false Sort the results. 0: Sort by creation time in ascending order. 1: Sort by creation time in descending order. The results are sorted by creation time in descending order if this parameter is not entered.

Return parameter

Parameter name Type Description
result TemplatesListRes

Description of result

Parameter name Type Description
total Long The total number of template lists.
list List The list of templates.
has_more Boolean Whether there is a next page.

Description of has_more

Parameter name Type Description
template_id String Template ID.
name String The template name with 1 to 40 characters.
content String The template content with 1 to 60 characters.
status Integer The review status of the template. 0: The review is in progress. 1: Passed the review. 2: Failed to pass the review.

Request example

GET: /v1.0/iot-03/msg-templates/app-notifications?page_no=1&page_size=10&sort=1

Return example

{ "result": { "list": [ { "content": "The pushed content", "name": "App notification center", "template_id": "PUSH_1234****", "status": 1 } ], "total": 1, "has_more": false }, "t": 1586153261345, "success": true }

Error code

For more information, see error code.