{"type":"api","title":"Update Status of Alert Rules","meta":{"id":"/apps/pubhub/media/cloud-security-apis-in-eft/83e8a10367d157243cd1c3e478b807cb81262a3d/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":"updateAlertRulesStatus","summary":"Update Status of Alert Rules","description":"Update the status of the alert rules.","tags":["Alert Rules","Secure Access"],"security":[{"oauthFlow":["admin.alertrules:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","description":"The properties of the alert rules used by the system to update the alert rules.","required":["status","entity_ids"],"properties":{"status":{"type":"integer","enum":[1,2],"description":"The numeric identifier of the status for the alert rule.\nUse `1` to enable the alert rule or `2` to disable the alert rule.","example":1},"entity_ids":{"type":"array","description":"The list of identifiers used by the system to update the alert rules.","maxItems":100,"minItems":1,"items":{"type":"integer","description":"The identifier of the alert rule. The system uses this identifier to update the alert rule.","example":1},"example":[1,2],"$$ref":"#/components/schemas/entity_ids_alert_rules"}}}}},"$$ref":"#/components/requestBodies/UpdateStatusAlertRuleRequestBody"},"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 updated status of the alert rules.","properties":{"success":{"type":"boolean","description":"Specifies whether the operation succeeded.\nReturns false if any ID is invalid.","example":true},"successfulIds":{"type":"array","description":"The list of IDs for the alert rules that the system updated.","items":{"type":"integer","description":"The ID of the alert rule that the system updated.","example":1234},"example":[1234],"$$ref":"#/components/schemas/successfulIdsUpdateInteger"},"errorIds":{"type":"array","description":"The list of unique identifiers that either do no exist or the system failed to delete or update.","items":{"type":"integer","description":"The unique identifier of the alert rule that does not exist or the system failed to delete or update.","example":100},"example":[100],"$$ref":"#/components/schemas/errorIdsInteger"}}},"example":{"success":true,"successfulIds":[1,2,3,4],"errorIds":[1,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"},"422":{"description":"Unprocessable Entity (Too many email recipients or webhooks in notification_info)","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","example":"Bad Request, Maximum 50 email recipients allowed per rule, found 100"},"status":{"type":"integer","description":"The HTTP status code returned in the response.","example":422}}},"example":{"error":"Bad Request, Maximum 50 email recipients allowed per rule, found 100"}}},"$$ref":"#/components/responses/422Error"},"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":"updateAlertRulesStatus","method":"put","path":"/alerting/rules/status"}}