[ZBX-17955] Inconsistency in user.create/user.get API methods Created: 2020 Jun 23  Updated: 2024 Apr 10  Resolved: 2020 Jul 28

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: API (A)
Affects Version/s: 4.0.20
Fix Version/s: 5.2.0alpha1, 5.2 (plan)

Type: Problem report Priority: Trivial
Reporter: Marek Assignee: Mārtiņš Tālbergs (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

zabbix-server-mysql 1:4.0.19-1+stretch


Team: Team B
Sprint: Sprint 65 (Jun 2020), Sprint 66 (Jul 2020)
Story Points: 0.125

 Description   

I'm using API to sync zabbix users with LDAP users.
When creating/updating of user (user.create/user.update) media section looks as folow:

"*user_medias*": [

                    {

                        "mediatypeid": "1",
                        "sendto": [
                         "[email protected]" 
                     ],
                         "active": 0 
                     }

]

When asking zabbix for user to compare (user.get), the same section looks different:

 "*medias*": [
             {
                     "active": "0",
                     "sendto": [
                      "[email protected]"
                   ],
                     "mediatypeid": "1"
             }
 ]

That difference in naming is misleading.



 Comments   
Comment by Alexander Vladishev [ 2020 Jun 25 ]

"user_medias" should be renamed to "medias" in user.create and user.update for consistency with user.get method

"user_medias" also should be supported as deprecated parameter.

Comment by Marek [ 2020 Jun 26 ]

Would be great if you add this fix also to v.4.0.2X.

Comment by Mārtiņš Tālbergs (Inactive) [ 2020 Jun 26 ]

FIXED in development branch feature/ZBX-17955-5.1

Comment by Valdis Murzins [ 2020 Jun 29 ]

Hello MarekJ,
4.0 version is already a stable and it would be wrong to backport API parameter deprecation there.
As such, this change in API method will be introduced only in future version that is 5.2.

When the change will be ready, you can apply it to your older installation yourself or by help of community, or you can request the patch from [email protected].

Comment by Mārtiņš Tālbergs (Inactive) [ 2020 Jul 16 ]

Available in:

Comment by Mārtiņš Tālbergs (Inactive) [ 2020 Jul 16 ]

Documentation updated:

Generated at Mon Apr 21 00:27:20 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.