You should call $.ajax
simply with data: {alerts: alert_ids}
instead of data: JSON.stringify({alerts: alert_ids})
.
Also, remove the contentType : "application/json",
line. CherryPy exposed methods expect form-urlencoded format, not json.
If you set traditional: true
, you must not add the braces after the alerts
parameter in CherryPy, otherwise you must add them.