Actions
Bug #9074
openAPI - incorrect FQDN matcher when creating host with name set to hostname
Status:
New
Priority:
Normal
Assignee:
-
Category:
API
Target version:
-
Description
When POSTing to /api/v2/hosts and using host[lookup_values_attributes] hash, parameter host[name] is directly used for smart variable matcher (fqdn=name). When host[name] is just hostname and not FQDN the resulting matcher is incorrect.
As workaround it is possible to set host[name] to FQDN, but web interface can use just hostname, so API should handle it in the same way. Btw. host[lookup_values_attributes] is missing in API documentation.
Actions