Ad Widget

Collapse

Host Name population in URL Trigger expression

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • soumya
    Junior Member
    • Nov 2013
    • 21

    #1

    Host Name population in URL Trigger expression

    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
    {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",
    but it's not working. I'm getting below error
    {"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.

    Last edited by soumya; 20-08-2019, 17:33.
Working...