/JSON/core/view/messages/?zapapiformat=JSON&formMethod=GET&baseurl=&start=&count=
requestHeader : "POST http://ocsp.digicert.com/ HTTP/1.1 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:46.0) Gecko/20100101 Firefox/46.0 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Language: en-US,en;q=0.5 Content-Length: 83 Content-Type: application/ocsp-request Connection: keep-alive Host: ocsp.digicert.com "
id : "5"
{"newLevel": "1","parameter": "","contextId": "4","ruleId": "1","url": "","urlIsRegex": "false","enabled": "true"}The ruleId is the id of the rule you want the filter to apply to.
The ids can be read via the API, are included in any alerts raised and also in this doc: https://github.com/zaproxy/zaproxy/blob/develop/src/doc/scanners.md
BTW I'm making a note of all of the questions people ask about the API so that we know where we need to improve our docs ;)
Cheers,
Simon