Ad Widget

Collapse

2.4.7 web scenario api error with httptest.create...

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • regl
    Junior Member
    • Jan 2007
    • 4

    #1

    2.4.7 web scenario api error with httptest.create...

    Hello,

    I am working on a script to maintain a list of URL to test using the Zabbix API. I am receiving the same error in 2.2 and now 2.4.7 when creating the httptest, specifically the step.

    I am sending:
    {"jsonrpc":"2.0","method":"httptest.create","param s":{"name":"SiteName","hostid":"10107","applicatio nid":"491","steps":{"name":"Homepage","url":"http: \/\/www.somerealurl.org","status_codes":"200","no":"1" }},"auth":"xxxxxxxxxxxxxxxxxxxxxxx","id":"14582373 108777"}

    And the result is:
    {"jsonrpc":"2.0","error":{"code":-32602,"message":"Invalid params.","data":"Web scenario step name cannot be empty."},"id":"14582373108777"}

    I have been searching around, but haven't found anything useful, hoping someone here can help me resolve this. Thanks
  • regl
    Junior Member
    • Jan 2007
    • 4

    #2
    I guess I just had to write it out to see the issue. Needed to add another level to the steps. For those who run in to this, the correct request should be, with the additional {} wrapper around the steps:

    {"jsonrpc":"2.0","method":"httptest.create","pa ram s":{"name":"SiteName","hostid":"10107","applica tio nid":"491","steps":{{"name":"Homepage","url":"http : \/\/www.somerealurl.org","status_codes":"200","no":"1" }}},"auth":"xxxxxxxxxxxxxxxxxxxxxxx","id":"1458237 3 108777"}

    Comment

    Working...