-
Problem report
-
Resolution: Duplicate
-
Trivial
-
None
-
6.2.1
Steps to reproduce:
- Run 2 async curl requests
curl --location --request POST 'https://zabbix.example.com/api_jsonrpc.php' --header 'Content-Type: application/json' \ --data-raw '{ "jsonrpc": "2.0", "method": "host.create", "params": { "host": "hostname_test1", "name": "visiblename_test1", "groups": [ { "groupid": "293" } ], "templates": [ { "templateid": "35188" } ] }, "id": 1, "auth": "apikey" }' & \ curl --location --request POST 'https://zabbix.example.com/api_jsonrpc.php' --header 'Content-Type: application/json' \ --data-raw '{ "jsonrpc": "2.0", "method": "host.create", "params": { "host": "hostname_test1", "name": "visiblename_test1", "groups": [ { "groupid": "293" } ], "templates": [ { "templateid": "35188" } ] }, "id": 1, "auth": "apikey" }'
- Response is
{"jsonrpc":"2.0","result":{"hostids":["35198"]},"id":1} {"jsonrpc":"2.0","result":{"hostids":["35199"]},"id":1}
Result:
Two identical hosts are created:
Expected:
Creating only the first/one host.
- duplicates
-
ZBX-4134 It is possible to create duplicate objects using API in parallel requests
- Confirmed