Hi,
can someone give me an example of calling create_alert()
function, with method=HTTP_GET
. I am in trouble with method_data
parameter, how can I correctly use if to specify URL for GET request.
Firstly I tried to use a dict such this {"http_get_url": "127.0.0.1:9999"}
, but it didn’t work.
I tried to create alert via web UI, then looked in postgres
base, and checked alert_method_data
table, for this alert there was something more, then just http_get_url
, and i tried dict like
{
"delta_type": "None",
"http_get_url": "127.0.0.1:9999",
"delta_report_id": "",
"details_url": "https://secinfo.greenbone.net/omp?cmd=get_info&info_type=$t&info_id=$o&details=1&token=guest"
}
but, unfortunately, it didn’t work too. After this I checked API docs and python-gvm docs, and didn’t find there an answer.
So, can someone please give me correct example how to call create_alert()
function in such way.
Used python-gvm version 1.6.0, with GMP connection.
Apologize if I used wrong category, and for my english
Thank you!