Reviewed-by: Bobkova, Natalia <natalia.bobkova@t-systems.com> Reviewed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com> Co-authored-by: liusiying77 <liusiying@huawei.com> Co-committed-by: liusiying77 <liusiying@huawei.com>
11 KiB
Deleting a Message Template
Function
This API is used to delete a notification template.
URI
DELETE /v2/{project_id}/{domain_id}/lts/events/notification/templates
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
project_id |
Yes |
String |
Project ID. For details about how to obtain a project ID, see Obtaining the Project ID, Account ID, Log Group ID, and Log Stream ID. Minimum: 32 Maximum: 32 |
domain_id |
Yes |
String |
Account ID. For details about how to obtain an account ID, see Obtaining the Project ID, Account ID, Log Group ID, and Log Stream ID. Minimum: 32 Maximum: 32 |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
X-Auth-Token |
Yes |
String |
User token obtained from IAM. For details about how to obtain a user token, see Obtaining a User Token. Minimum: 1000 Maximum: 2000 |
Content-Type |
Yes |
String |
Set this parameter to application/json;charset=UTF-8. Minimum: 30 Maximum: 30 |
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
template_names |
Yes |
Array of strings |
Array of names of templates to be deleted. |
Response Parameters
Status code: 400
Parameter |
Type |
Description |
|---|---|---|
error_code |
String |
Error code. |
error_msg |
String |
Error message. |
Status code: 500
Parameter |
Type |
Description |
|---|---|---|
error_code |
String |
Error code. |
error_msg |
String |
Error message. |
Example Requests
Deleting a message template
DELETE https://{endpoint}/v2/{project_id}/{domain_id}/lts/events/notification/templates
/v2/{project_id}/{domain_id}/lts/events/notification/templates
{"template_names":["template1","template2"]}
Example Responses
Status code: 400
Invalid request. Modify the request based on the description in error_msg before a retry.
{
"error_code" : "LTS.2015",
"error_msg" : "delete template name is empty or projectId is null"
}
Status code: 500
The server has received the request but encountered an internal error.
{
"error_code" : "LTS.2015",
"error_msg" : "Failed to delete notification template."
}
Status Codes
Status Code |
Description |
|---|---|
204 |
If the response body is empty, the request is successfully responded. |
400 |
Invalid request. Modify the request based on the description in error_msg before a retry. |
500 |
The server has received the request but encountered an internal error. |
Error Codes
See Error Codes.