Unable to create host with Foreman API

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:

When you try to create a host with the API, what does the incoming api call + traceback look like in `/var/log/foreman/production.log

Here’s the actual logs from the API request

That is really odd, I don’t see any thing that looks odd in what the server received. Do you get the same error from hammer or from the UI?

I do get the same error in the UI.

I haven’t tried any hammer commands yet. I’d have to lookup what the command would be and attempt it.
I’ll give that a go shortly and see if I get the same results.