Problem:
When attempting to create a host using the api/hosts API endpoint I get the following error:
{
“error”: {
“id”: null,
“errors”: {
“name”: [
“must not include periods”
]
},
“full_messages”: [
“Name must not include periods”
]
}
}
The supplied body to the API request is the following:
{
“host”: {
“name”: “testname”,
“organization_id”: 1,
“environment_id”: 1,
“operatingsystem_id”: 37,
“architecture_id”: 34,
“domain_name”: “domain.com”,
“interfaces_attributes”: [
{
“mac”: “BC:34:FF:9A:00:12”
}
]
}
}
I’m not sure where I’m going wrong as I don’t have any periods in the name of the host.
Expected outcome:
I would expect the API to create a host in Foreman.
Foreman and Proxy versions:
Foreman and Proxy version 3.13
Foreman and Proxy plugin versions:
Foreman_puppet version 8.0
Distribution and version:
Oracle Linux 9.5
Other relevant data: