executing awx api for job template with out inventory

We have one application which will call the awx api to triger the job template

curl -X POST -d ‘{“inventory”: “4”,“limit”:“<hostname”}’ -H “Content-Type: application/json” --user : http://localhost/api/v2/job_templates/7/launch/

In the limit attribute we can specify the host name, limit option restrict to execute the playbook for the all the host in the inventory excluding the host specify in the limit attribute.

Is there any option to execute the playbook for a particular host (host name i can pass in url params or by using extra variables) with out adding the host name it to inventory

Hi,

I’m pretty sure you need to have the destination host in the inventory prior to executing the job template.
Maybe take a look at dynamic inventories if you don’t want to maintain a static inventory in AWX.

Did you ever find a way to do this, I too am trying to have on demand template runs with the inventory being passed to the API. So far have not found a way to do this.

Thanks for your time.