Hi,
I'm creating a shell script to create web scenario & trigger using API. In Trigger expression hostname will be mandatory, as this use web scenario to create trigger, like
.
Now how can i set a variable to get the hostname automatically in trigger expression. I've tried like this
but it's not working. I'm getting below error
Kindly help. Thank you.
I'm creating a shell script to create web scenario & trigger using API. In Trigger expression hostname will be mandatory, as this use web scenario to create trigger, like
{testserver:web.test.rspcode[https://google.com/,https://google.com/].last()}<>200
Now how can i set a variable to get the hostname automatically in trigger expression. I've tried like this
"jsonrpc": "2.0",
"method": "trigger.create",
"params": [
{
"description": "URL https://google.com/ Down",
"expression": "{{HOST.HOST}:web.test.rspcode[https://google.com/,https://google.com/].last()}<>200",
"method": "trigger.create",
"params": [
{
"description": "URL https://google.com/ Down",
"expression": "{{HOST.HOST}:web.test.rspcode[https://google.com/,https://google.com/].last()}<>200",
{"jsonrpc":"2.0","error":{"code":-32602,"message":"Invalid params.","data":"Incorrect trigger expression. Check expression part starting from "{{HOST.HOST}:web.test.rspcode[https://google.com/,https://google.com/].last<>200"."},"id":1}
Kindly help. Thank you.