Bad request when trying to add/create Ansible Tower Providers via API

Hi everyone,

I’m trying to add/create an Ansible Tower providers via the Rest API of ManageIQ, but no matter which attributes I put inside my request I always get this error :

{“error”:{“kind”:“bad_request”,“message”:“Unsupported request class ManageIQ::Providers::AnsibleTower::AutomationManager”,“klass”:“Api::BadRequestError”}}

Even, when I try the most basic request from the documentation : ManageIQ , I still get the same error.

My request look like this if you use curl :

curl --user admin:admin -i -v -k POST -H “Accept: application/json” -H “Content-Type: application/json” -d ’
{“type”: “ManageIQ::Providers::AnsibleTower::AutomationManager”,
“name” : “TestTower”,
“url” : “”,
“credentials” : {
“userid” : “admin”,
“password” : “password”},
“verify_ssl” : “false”}’

Can anybody help me please ?

@agrare Have you tried creating one through the API?

It looks like the “old” provider create API (aka non-ddf) doesn’t support creating AutomationManager type providers. There is a list of allowed provider base classes in the config/api.yml that is what is causing this failure.