[ZBX-13248] Zabbix API 3.4 behaves differently than API 3.2. Created: 2017 Dec 22  Updated: 2024 Apr 10  Resolved: 2018 Mar 02

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: API (A), Documentation (D)
Affects Version/s: 3.4.4
Fix Version/s: 3.4.8rc1, 4.0.0alpha4, 4.0 (plan)

Type: Problem report Priority: Trivial
Reporter: Heino Talvik Assignee: Alexander Shubin
Resolution: Fixed Votes: 0
Labels: validation
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

docker zabbix/zabbix-server-mysql:ubuntu-3.4-latest


Team: Team B
Sprint: Sprint 25, Sprint 26, Sprint 27, Sprint 28
Story Points: 0.5

 Description   

Steps to reproduce:

  1. Changes in configuration...
    After upgrade to version 3.4.4 from 3.2 API calls is not working as they are described in documentation.

Result:
Call:

{"jsonrpc": "2.0", "method": "item.create", "params": {"name": "uhoidla.Summary.Delete","key_": "uhoidla.Summary.Delete", "hostid" :"10254", "description": "Delete / Second", "type": 2, "value_type": 3, "delta": 1, "history":2, "trend":90, "applications": ["1065"], "delay": 60}, "auth": "861486bafe312b8d2cec683cbfc5b9ea", "id": 1}

gives back:

{
  "jsonrpc": "2.0",
  "error": {
    "code": -32602,
    "message": "Invalid params.",
    "data": "Incorrect value for field \"trapper_hosts\": invalid address range \"\"."
  },
  "id": 1
}

Expected:
Acording to documentation, in case of Item Type:2 (trapper), there is no
need for trapper_hosts value.
Also I don't like, that in API version 3.4, there is no possibilities to describe value_type . Now this can be done only manually under PreProcessing tab.



 Comments   
Comment by Olegs Vasiljevs (Inactive) [ 2017 Dec 22 ]

Hello Heino!

Thank you for submitting this issue!

trapper_hosts parameter is indeed mandatory for Trapper item.create, although it can be empty.
Item preprocessing steps are supported through API as per the example given in documentation, although type of preprocessing is not well documented.

Regards,
Oleg

Comment by Alexander Vladishev [ 2018 Feb 11 ]

(1) No translation strings changed

HunterCRS CLOSED

Comment by Alexander Shubin [ 2018 Feb 19 ]

Implemented:

  • 3.4.8rc1 in r77816,r77914,r78243;
  • 4.0.0alpha4 (trunk) in r77817,r77819,r77849,r77913,r78244;
Comment by richlv [ 2018 Feb 21 ]

(2) changelog entry does not follow the guidelines - it does not start with a verb in the past tense :

field trapper_hosts changed to optional for trapper item.create

HunterCRS RESOLVED in r77913, r77914

sasha ChangeLog entry should be started from "fixed ...".

REOPENED

HunterCRS RESOLVED in r78243, 78244

sasha CLOSED

Generated at Wed Apr 24 18:10:13 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.