Link Content Views and LifeCycle Environments via API.

Latest response

Good day,

I'm part of a project looking to automate Linux VM provisioning activities of which RH Satellite is a system we need to integrate into.

I'm trying to automate the registering a host with a subscription. It accepts a hostname as well as IDs for a Content View and a LifeCycle Environment. The request looks as follows:

{
"name": "trhn101zatcrh",
"lifecycle_environment_id ": 2,
"content_view_id ": 2
}

And the response as follows:

{
"displayMessage": "Couldn't find specified Content View and Lifecycle Environment.",
"errors": [
"Couldn't find specified Content View and Lifecycle Environment."
]
}

I can confirm that both the content views and lifecycle environments exists. I've used default ones created new content views and lifecycle environments, yet I still get the same error.

Thanks
Warren

Responses

Hello Warren,

Did you look into the concept of activation keys? In an activation key you can put the required information. The activation key page shows you how to subscribe the host using the key.

Regards,

Jan Gerrit Kootstra

Hello, did you check they exist in the organization you are using? Perhaps try with hammer in debug mode: hammer -d