{"type":"api","title":"Create Test Alert by Email","meta":{"id":"/apps/pubhub/media/cloud-security-apis-in-eft/a8c8e621000b4890cafc6ca5e88c701c42bc6d58/e7c4374c-388b-3f3f-bd38-63991a559765","info":{"title":"Cisco Secure Access Alerting API","version":"1.0.0","description":"Manage the alert rules in the organization and monitor the alerts generated by the alert rules.","contact":{"name":"Cloud Security Developer Community"}},"security":[{"oauthFlow":[]}],"tags":[{"name":"Alert Rules"},{"name":"Alerts"},{"name":"Secure Access"}],"x-parser-conf":{"overview":{"markdownPath":"secure-access/reference/admin/alert-rules-overview.md","uri":"secure-access-api-reference-alerting-overview"}},"openapi":"3.0.0","servers":[{"url":"https://api.sse.cisco.com/{basePath}","variables":{"basePath":{"default":"admin/v2"}}}],"securitySchemes":{"oauthFlow":{"type":"oauth2","description":"The client credential flow.","flows":{"clientCredentials":{"tokenUrl":"https://api.sse.cisco.com/auth/v2/token","scopes":{"admin.alertrules:read":"Read Alert Rules","admin.alertrules:write":"Write Alert Rules","admin.alerts:read":"Read Alerts","admin.alerts:write":"Write Alerts"}}}}}},"spec":{"operationId":"sendAlertNotifications","summary":"Create Test Alert by Email","description":"Create a test notification and send the alert to the recipients configured in the alert rule.","tags":["Alerts","Secure Access"],"security":[{"oauthFlow":["admin.alerts:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","description":"The properties of the test notification.","required":["name","type","severity","notification_info"],"properties":{"name":{"type":"string","description":"The name of the alert rule.","example":"Production VPN Tunnel Disconnected"},"type":{"type":"integer","description":"The identifier of the rule type.","example":1,"$$ref":"#/components/schemas/ruleTypeId"},"severity":{"type":"integer","enum":[1,2,3,4],"description":"The severity of the alert. The supported severity levels are:\n- 1 (High)\n- 2 (Medium)\n- 3 (Low)\n- 4 (Info)","example":1,"$$ref":"#/components/schemas/severityAlert"},"conditions":{"type":"object","description":"The conditions that trigger the type of notification.","properties":{"match_type":{"type":"string","enum":["all","any",""],"description":"Choose from one of the accepted conditions: `all` (AND), `any` (OR), or ''.","example":"all"},"rows":{"type":"array","description":"The list of conditions that the system uses to evaluate the alert rule.","items":{"type":"object","description":"The conditions that define the alert rule.","required":["field","value"],"properties":{"field":{"type":"string","description":"The name of the condition."},"value":{"type":"string","description":"The canonical name of the geographical region for the data center where the notification occurs."}}}}},"$$ref":"#/components/schemas/conditionsAlertRule"},"notification_info":{"type":"array","description":"The list of notification details.","minItems":1,"items":{"type":"object","description":"The properties of the notification for the alert rule.","properties":{"type":{"type":"string","enum":["email","webhook"],"description":"The type of the notification for the alert rule.","example":"webhook","$$ref":"#/components/schemas/notificationTypeAll"},"recipients":{"type":"array","description":"The list of email recipients configured in the alert rule to receive the notification.","minItems":1,"maxItems":50,"items":{"type":"string","format":"email","description":"An email recipient for the notification."},"example":["admin@company.com","ops@company.com"]},"webhook_ids":{"type":"array","description":"The list of unique identifiers for the Webhooks configured on the alert rule.","items":{"type":"string","description":"The unique identifier for the Webhook ID.","example":"1abcde"}}},"$$ref":"#/components/schemas/notificationInfoAlertRule"}},"event_time":{"type":"string","format":"date-time","description":"The date and time (ISO 8601 timestamp) when the system recorded the event.","example":"2024-10-22T10:30:00Z","$$ref":"#/components/schemas/event_time"},"redirect_link":{"type":"string","format":"uri","description":"The URL of the alert page in Secure Access.","example":"https://dashboard.company.com/alerts/42"}},"$$ref":"#/components/schemas/TestNotification"}}},"$$ref":"#/components/requestBodies/TestNotificationsEmailRequestBody"},"responses":{"200":{"description":"OK","headers":{"Content-Type":{"schema":{"type":"string"},"description":"The MIME content type of the response body.","example":"application/json","$$ref":"#/components/headers/Content-Type"},"Date":{"schema":{"type":"string","pattern":"^[0-90-90-90-9-0-90-9-0-90-9T0-90-9:0-90-9:0-90-9Z]+$"},"description":"The date and time (ISO 8601-formatted timestamp) when the system returned the response.","example":"2023-03-14T18:34:25Z","$$ref":"#/components/headers/Date"}},"content":{"application/json":{"schema":{"type":"object","description":"The properties of the test email notification.","properties":{"status":{"type":"string","enum":["success","partial_success","failed"],"description":"The status of the notification.","example":"success"},"message":{"type":"string","description":"The message sent by the system.","example":"All notifications sent successfully"},"results":{"type":"array","description":"The list of detailed results for each type of notification.","items":{"type":"object","description":"The properties of the test email notification sent by the system.","properties":{"type":{"type":"string","enum":["email"],"description":"The type of the notification.","example":"email","$$ref":"#/components/schemas/notificationTypeEmail"},"success":{"type":"boolean","description":"Specifies whether the notification was sent by the system successfully.","example":true},"error":{"type":"string","description":"When the system fails to send the test message, the system reports an error message.","example":"Error in sending the test notification."},"recipients_count":{"type":"integer","description":"The number of recipients of the test email notification.","example":2}}}}},"$$ref":"#/components/schemas/TestEmailNotificationResponse"},"example":{"status":"success","message":"All notifications sent successfully","results":[{"type":"email","success":true,"recipients_count":2}]}}}},"400":{"description":"Bad Request","headers":{"Content-Type":{"schema":{"type":"string"},"description":"The MIME content type of the response body.","example":"application/json","$$ref":"#/components/headers/Content-Type"},"Date":{"schema":{"type":"string","pattern":"^[0-90-90-90-9-0-90-9-0-90-9T0-90-9:0-90-9:0-90-9Z]+$"},"description":"The date and time (ISO 8601-formatted timestamp) when the system returned the response.","example":"2023-03-14T18:34:25Z","$$ref":"#/components/headers/Date"}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Bad Request","example":"Not found IAM key info for org 12355."},"status":{"type":"integer","description":"The HTTP status code returned in the response.","example":400}}}}},"$$ref":"#/components/responses/400Error"},"401":{"description":"Unauthorized","headers":{"Content-Type":{"schema":{"type":"string"},"description":"The MIME content type of the response body.","example":"application/json","$$ref":"#/components/headers/Content-Type"},"Date":{"schema":{"type":"string","pattern":"^[0-90-90-90-9-0-90-9-0-90-9T0-90-9:0-90-9:0-90-9Z]+$"},"description":"The date and time (ISO 8601-formatted timestamp) when the system returned the response.","example":"2023-03-14T18:34:25Z","$$ref":"#/components/headers/Date"}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Unauthorized","example":"Authorization token is invalid."},"status":{"type":"integer","description":"The HTTP status code returned in the response.","example":401}}}}},"$$ref":"#/components/responses/401Error"},"403":{"description":"Forbidden","headers":{"Content-Type":{"schema":{"type":"string"},"description":"The MIME content type of the response body.","example":"application/json","$$ref":"#/components/headers/Content-Type"},"Date":{"schema":{"type":"string","pattern":"^[0-90-90-90-9-0-90-9-0-90-9T0-90-9:0-90-9:0-90-9Z]+$"},"description":"The date and time (ISO 8601-formatted timestamp) when the system returned the response.","example":"2023-03-14T18:34:25Z","$$ref":"#/components/headers/Date"}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Error message explaining the reason for failure.","example":"Forbidden"},"status":{"type":"integer","description":"The HTTP status code returned in the response.","example":403}}}}},"$$ref":"#/components/responses/403Error"},"404":{"description":"Not Found","headers":{"Content-Type":{"schema":{"type":"string"},"description":"The MIME content type of the response body.","example":"application/json","$$ref":"#/components/headers/Content-Type"},"Date":{"schema":{"type":"string","pattern":"^[0-90-90-90-9-0-90-9-0-90-9T0-90-9:0-90-9:0-90-9Z]+$"},"description":"The date and time (ISO 8601-formatted timestamp) when the system returned the response.","example":"2023-03-14T18:34:25Z","$$ref":"#/components/headers/Date"}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Error message explaining the reason for failure.","example":"Not Found"},"status":{"type":"integer","description":"The HTTP status code returned in the response.","example":404}}}}},"$$ref":"#/components/responses/404Error"},"429":{"description":"Too Many Requests","headers":{"Content-Type":{"schema":{"type":"string"},"description":"The MIME content type of the response body.","example":"application/json","$$ref":"#/components/headers/Content-Type"},"Date":{"schema":{"type":"string","pattern":"^[0-90-90-90-9-0-90-9-0-90-9T0-90-9:0-90-9:0-90-9Z]+$"},"description":"The date and time (ISO 8601-formatted timestamp) when the system returned the response.","example":"2023-03-14T18:34:25Z","$$ref":"#/components/headers/Date"}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Error message explaining the reason for failure.","example":"Rate limit exceeded"},"status":{"type":"integer","description":"The HTTP status code returned in the response.","example":404}}}}},"$$ref":"#/components/responses/429Error"},"500":{"description":"Internal Server Error","headers":{"Content-Type":{"schema":{"type":"string"},"description":"The MIME content type of the response body.","example":"application/json","$$ref":"#/components/headers/Content-Type"},"Date":{"schema":{"type":"string","pattern":"^[0-90-90-90-9-0-90-9-0-90-9T0-90-9:0-90-9:0-90-9Z]+$"},"description":"The date and time (ISO 8601-formatted timestamp) when the system returned the response.","example":"2023-03-14T18:34:25Z","$$ref":"#/components/headers/Date"}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Error message explaining the reason for failure.","example":"Internal Server Error"},"status":{"type":"integer","description":"The HTTP status code returned in the response.","example":500}}}}},"$$ref":"#/components/responses/500Error"}},"__originalOperationId":"sendAlertNotifications","method":"post","path":"/alerting/alerts/testNotifications/emails"}}