Foreman Api - Auto Provision Host

Problem:
Hello there,
I need an Api call which Auto Provisions a host. But as far as I have seen there is no Api Call in the Api Documentation which can do something like this.
The current state of things is:
Getting all discovered host:
GET foreman.ntuity.io/api/v2/discovered_hosts (with Basic Auth Header)
Get detailed information for host:
GET foreman.ntuity.io/api/v2/discovered_hosts/:id (with Basic Auth Header)

Expected outcome:

An Api Call which causes that a discovered host will be Auto Provisioned. Like when you click on Aktions > Auto Provision

I hope someone can help me, because I literally don’t know where to search.

The API endpoints seems to be implemented

Try navigating to https://$your_foreman/apidoc and search for “auto”, that should give you detailed description for both endpoints.

2 Likes

Thanks. I’m so happy know that this works.