Adding Container Provider Through REST API

Hi ,

I want to add a OpenShift Cluster to CloudForms I have the SA token and all the necessary information and I was successful in adding the Cluster through CloudForms Web UI but I would to to do a curl command to CloudForms and add the OpenShift Cluster.

I can see the REST API docs but not able to find the endpoint to add a container provider.

Can anyone let me know is it not being documented or it does not exists at this moment.


@abonas do you know anyone who can help me with this?

Hi, does example help ?

This API syntax works on current ManageIQ version:
( Note: you will have to adjust the urls and ports in the example )

curl --user admin:smartvm \
      -i -X POST -H "Accept: application/json" \
      -d '{
            "type"      : "ManageIQ::Providers::Openshift::ContainerManager",
            "name"      : "TestEndpoints",
            "connection_configurations": [
                    "endpoint": {
                        "role":     "default",
                        "hostname": "",
                        "port":     "8443"
                    "authentication": {
                        "authtype": "bearer",
                        "auth_key": "SecretAuthToken"
                    "endpoint": {
                        "role":     "hawkular",
                        "hostname": "",
                        "port":     "443"
                    "authentication": {
                        "authtype": "hawkular",
                        "auth_key": "SecretAuthToken"
      }' \ -k

If you use Ansible, you can also use the ansible module for that:

for example:

- name: Create a new provider in ManageIQ ('Hawkular' metrics)
    name: 'EngLab'
    type: 'OpenShift'
      auth_key: 'topSecret'
      hostname: ''
      port: 8443
      role: 'hawkular'
      hostname: ''
      port: 443
      url: ''
      username: 'admin'
      password: 'smartvm'

@Yaacov_Zamir Thanks for the reply I tried the curl command and its works for me.