[ZBX-25734] Create Host with multiple templates failed Created: 2024 Dec 12  Updated: 2024 Dec 12  Resolved: 2024 Dec 12

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: API (A)
Affects Version/s: 6.0.36
Fix Version/s: None

Type: Incident report Priority: Trivial
Reporter: Fabrice Assignee: Zabbix Development Team
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File issue1.png     PNG File issue2.png    

 Description   

Steps to reproduce:

  1. Create you request to create an host with 2 template
  2. execute
  3. Check on frontend
  4. ...

Result:
host is not created
Expected:
host created with 2 templates

 

When we createa with only one templatte , its work

the documentation

templates object/array Templates to be linked to the host.
 
The templates must have only the templateid property defined.

 

 



 Comments   
Comment by Alexander Vladishev [ 2024 Dec 12 ]

What does your API request return? How are you specifying multiple templates in your request?

Comment by Fabrice [ 2024 Dec 12 ]

Hello

thank you for your reply 

this is how i specify mutiple templates in my request :

 
"templates": [
            {
                "templateid":"10226"
            },
            {
                "templateid": "10226"
]

 

sorry , solved !

the two templates try to populate  the same inventory

and my python wrapper didnt show the error , just http code 200

when i use postman  to check the error message was clear

Thank you and Sorry for the inconvenience.

 

 

Comment by Fabrice [ 2024 Dec 12 ]

two template try to pupalate the same inventory item

Generated at Wed Jul 30 03:04:03 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.