{ "restSchemaVersion": "1.0", "errors": [ { "error_id": "BAD_REQUEST", "description": "Invalid argument.", "http_status": "400" }, { "error_id": "AUTH_REQUIRED", "description": "Authentication required.", "http_status": "401" }, { "error_id": "AUTH_INVALID_CREDENTIALS", "description": "Make sure the user name is correct and type your password again. Be sure to use the correct case for the user name and password.", "http_status": "401" }, { "error_id": "INTERNAL_ERROR", "description": "Internal error.", "http_status": "500" } ], "name": "mgmt.notification_settings", "title": "Notifications API.", "version": "1.0", "schemas": [], "defaultAuthorization": "required", "servicePath": "/api/mgmt.notification_settings/1.0", "resources": { "Notification settings": { "methods": { "Get recipient list": { "description": "Returns a list of all recipients.", "formats": [ "json" ], "httpmethod": "GET", "path": "recipient", "authorization_methods": [ "BASIC", "COOKIE", "OAUTH_2_0" ], "response": { "description": "List of all recipients. if an argument named \"uncloak\" is passed as true it will show \"snmp_community\" in text format otherwise it will be cloaked and shown as \"********\"", "type": "array", "items": { "type": "object", "properties": { "recipient_id": { "description": "Unique if for the recipient, it is passed while using update and delete method also when trying to set notifications.", "type": "number" }, "recipient_label": { "description": "Name of the recipient.", "type": "string" }, "email_address": { "description": "Email address of the recipient.", "type": "string" }, "email_format": { "description": "For PDF it is set to 1 and 2 for HTML", "type": "number" }, "assigned_groups": { "description": "Groups to which this recipient is associated", "type": "string" }, "snmp_des_ip_1": { "description": "IP for SNMP destination 1", "type": "string" }, "snmp_des_port_1": { "description": "Port for SNMP destination 1", "type": "number" }, "snmp_des_ip_2": { "description": "IP for SNMP destination 2", "type": "string" }, "snmp_des_port_2": { "description": "Port for SNMP destination 2", "type": "number" }, "snmp_version": { "description": "SNMP protocol version V1/V2C/V3", "type": "string" }, "snmp_community": { "description": "secret key, pass \"uncloak\" argument to reveal the key", "type": "string" } }, "required": [ "recipient_id", "recipient_label" ] }, "id": "GetRecipient", "example": [ { "recipient_id": 1, "recipient_label": "Default", "snmp_community": "********" }, { "recipient_id": 2, "recipient_label": "name", "email_address": "name@domain", "email_format": 1, "assigned_groups": "[group_type:group_id]", "snmp_des_ip_1": "1.1.1.1", "snmp_des_port_1": 1010, "snmp_des_ip_2": "2.2.2.2", "snmp_des_port_2": 2020, "snmp_version": "V1", "snmp_community": "********" } ] }, "authorization": "required" }, "Add recipient": { "description": "Adds new recipient.", "formats": [ "json" ], "httpmethod": "POST", "path": "recipient", "authorization_methods": [ "BASIC", "COOKIE", "OAUTH_2_0" ], "request": { "description": "Required fields to add a new recipient", "type": "object", "properties": { "recipient_label": { "description": "Name of the recipient.", "type": "string" }, "email_address": { "description": "Email address of the recipient.", "type": "string" }, "email_format": { "description": "For PDF it is set to 1 and 2 for HTML", "type": "number" }, "assigned_groups": { "description": "Groups to which this recipient is associated in \"group_type1:group_id1|group_type2:group_id2\" format", "type": "string" }, "snmp_des_ip_1": { "description": "IP for SNMP destination 1", "type": "string" }, "snmp_des_port_1": { "description": "Port for SNMP destination 1", "type": "number" }, "snmp_des_ip_2": { "description": "IP for SNMP destination 2", "type": "string" }, "snmp_des_port_2": { "description": "Port for SNMP destination 2", "type": "number" }, "snmp_version": { "description": "SNMP protocol version V1/V2C/V3", "type": "string" }, "snmp_community": { "description": "secret key", "type": "string" } }, "required": [ "recipient_label", "email_address", "email_format", "assigned_groups", "snmp_des_ip_1", "snmp_des_port_1", "snmp_des_ip_2", "snmp_des_port_2", "snmp_version", "snmp_community" ], "id": "AddRecipient", "example": { "recipient_label": "lableName", "email_address": "address@domain.com", "email_format": 1, "assigned_groups": "100:3|100:2|100:1", "snmp_des_ip_1": "99.99.99.1", "snmp_des_port_1": 8085, "snmp_des_ip_2": "99.99.99.1", "snmp_des_port_2": 8086, "snmp_version": "V2C", "snmp_community": "hello" } }, "authorization": "required" }, "Update existing recipient": { "description": "Updates an existing recipient with recipient_id passed in the URL.", "formats": [ "json" ], "httpmethod": "PUT", "path": "recipient/", "authorization_methods": [ "BASIC", "COOKIE", "OAUTH_2_0" ], "request": { "description": "Required fields to add a new recipient", "type": "object", "properties": { "recipient_label": { "description": "Name of the recipient.", "type": "string" }, "email_address": { "description": "Email address of the recipient.", "type": "string" }, "email_format": { "description": "For PDF it is set to 1 and 2 for HTML", "type": "number" }, "assigned_groups": { "description": "Groups to which this recipient is associated in \"group_type1:group_id1|group_type2:group_id2\" format", "type": "string" }, "snmp_des_ip_1": { "description": "IP for SNMP destination 1", "type": "string" }, "snmp_des_port_1": { "description": "Port for SNMP destination 1", "type": "number" }, "snmp_des_ip_2": { "description": "IP for SNMP destination 2", "type": "string" }, "snmp_des_port_2": { "description": "Port for SNMP destination 2", "type": "number" }, "snmp_version": { "description": "SNMP protocol version V1/V2C/V3", "type": "string" }, "snmp_community": { "description": "secret key", "type": "string" } }, "required": [ "recipient_label", "email_address", "email_format", "assigned_groups", "snmp_des_ip_1", "snmp_des_port_1", "snmp_des_ip_2", "snmp_des_port_2", "snmp_version", "snmp_community" ], "id": "UpdateRecipient", "example": { "recipient_label": "lableName", "email_address": "address@domain.com", "email_format": 1, "assigned_groups": "100:3|100:2|100:1", "snmp_des_ip_1": "99.99.99.1", "snmp_des_port_1": 8085, "snmp_des_ip_2": "99.99.99.1", "snmp_des_port_2": 8086, "snmp_version": "V2C", "snmp_community": "hello" } }, "authorization": "required" }, "Delete recipient by id": { "description": "Deletes an existing recipient with recipient_id passed in the URL.", "formats": [ "json" ], "httpmethod": "DELETE", "path": "recipient/", "authorization_methods": [ "BASIC", "COOKIE", "OAUTH_2_0" ], "authorization": "required" }, "Delete all recipient": { "description": "Deletes all recipient except default.", "formats": [ "json" ], "httpmethod": "DELETE", "path": "recipient", "authorization_methods": [ "BASIC", "COOKIE", "OAUTH_2_0" ], "authorization": "required" }, "Get notifications list": { "description": "Returns a list of all notifications settings and clear event notifications flag.", "formats": [ "json" ], "httpmethod": "GET", "path": "notifications", "authorization_methods": [ "BASIC", "COOKIE", "OAUTH_2_0" ], "response": { "description": "List of all notifications and clear event notifications flag.", "type": "object", "properties":{ "clear_event_notification": { "description": "Value of clear event notification flag", "type": "string", "required": true }, "notifications": { "type": "array", "description": "List of all notifications", "required": true, "items": { "type": "object", "properties": { "policy_name": { "description": "Name of the policy", "type": "string" }, "low": { "description": "Recipient id for low", "type": "number" }, "medium": { "description": "Recipient id for medium", "type": "number" }, "high": { "description": "Recipient id for high", "type": "number" } }, "required": [ "policy_name", "low", "medium", "high" ] }, "id": "ListNotifications" } }, "id": "GetNotifications", "example": { "clear_event_notification": "false", "notifications": [ { "policy_name": "P2P Port Activity", "low": 1, "medium": 1, "high": 1 }, { "policy_name": "Tunneled Application Activity", "low": 1, "medium": 1, "high": 1 }, { "policy_name": "Firewall Tunneling Activity", "low": 1, "medium": 1, "high": 1 }, { "policy_name": "P2P Application Activity", "low": 1, "medium": 1, "high": 1 }, { "policy_name": "SpamBot Activity", "low": 1, "medium": 1, "high": 1 } ] } }, "authorization": "required" }, "Set Notifications": { "description": "Sets the recipients for all policies.", "formats": [ "json" ], "httpmethod": "POST", "path": "notifications", "authorization_methods": [ "BASIC", "COOKIE", "OAUTH_2_0" ], "request": { "description": "Required fields to assign recipients to each policy", "type": "object", "properties":{ "clear_event_notification": { "description": "clear event notification flag", "type": "string", "required": true }, "notifications": { "type": "array", "description": "List of all notifications settings", "required": true, "items": { "type": "object", "properties": { "policy_name": { "description": "Name of the policy", "type": "string" }, "low": { "description": "Recipient id for low", "type": "number" }, "medium": { "description": "Recipient id for medium", "type": "number" }, "high": { "description": "Recipient id for high", "type": "number" } }, "required": [ "policy_name", "low", "medium", "high" ] }, "id": "ListNotifications" } }, "id": "SetNotifications", "example": { "clear_event_notification": "true", "notifications": [ { "policy_name": "P2P Port Activity", "low": 1, "medium": 1, "high": 1 }, { "policy_name": "Tunneled Application Activity", "low": 1, "medium": 1, "high": 1 }, { "policy_name": "Firewall Tunneling Activity", "low": 1, "medium": 1, "high": 1 }, { "policy_name": "P2P Application Activity", "low": 1, "medium": 1, "high": 1 }, { "policy_name": "SpamBot Activity", "low": 1, "medium": 1, "high": 1 } ] } }, "authorization": "required" } } } }, "description": "" }