POST /api/registration_commands
Generate global registration command

Examples

POST /api/registration_commands
{
  "registration_command": {}
}
200
{
  "registration_command": "curl -sS  'http://test.host/register' -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoxMzUxMzg2ODAsImlhdCI6MTYzMDUwMDk2MywianRpIjoiYzQxOGRlODE2ZjA2MTExYTUyZTFjODJiNmNjNWM3YmM1M2Y0Y2Q1Y2I4NWIyMjQ5YWI3MWJhYTA3MGE1ZWRmZCIsImV4cCI6MTYzMDUxNTM2Mywic2NvcGUiOiJyZWdpc3RyYXRpb24jZ2xvYmFsIHJlZ2lzdHJhdGlvbiNob3N0In0.xYKBMnJ-V1ot-HHL28iGEDY7594SvgeK3wm-LA_b97k' | bash"
}

Params

Param name Description
location_id
optional

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
optional

Set the current organization context for the request

Validations:

  • Must be a Integer

registration_command
optional , nil allowed

Validations:

  • Must be a Hash

registration_command[organization_id]
optional , nil allowed

ID of the Organization to register the host in

Validations:

  • Must be a number.

registration_command[location_id]
optional , nil allowed

ID of the Location to register the host in

Validations:

  • Must be a number.

registration_command[hostgroup_id]
optional , nil allowed

ID of the Host group to register the host in

Validations:

  • Must be a number.

registration_command[operatingsystem_id]
optional , nil allowed

ID of the Operating System to register the host in. Operating system must have a host_init_config template assigned

Validations:

  • Must be a number.

registration_command[smart_proxy_id]
optional , nil allowed

ID of the Smart Proxy

Validations:

  • Must be a number.

registration_command[setup_insights]
optional , nil allowed

Set ‘host_registration_insights’ parameter for the host. If it is set to true, insights client will be installed and registered on Red Hat family operating systems

Validations:

  • Must be one of: true, false, 1, 0.

registration_command[setup_remote_execution]
optional , nil allowed

Set ‘host_registration_remote_execution’ parameter for the host. If it is set to true, SSH keys will be installed on the host

Validations:

  • Must be one of: true, false, 1, 0.

registration_command[jwt_expiration]
optional , nil allowed

Expiration of the authorization token (in hours)

Validations:

  • Must be a number.

registration_command[insecure]
optional , nil allowed

Enable insecure argument for the initial curl

Validations:

  • Must be one of: true, false, 1, 0.

registration_command[packages]
optional , nil allowed

Packages to install on the host when registered. Can be set by host_packages parameter. Example: pkg1 pkg2

Validations:

  • Must be a String

registration_command[update_packages]
optional , nil allowed

Update all packages on the host

Validations:

  • Must be one of: true, false, 1, 0.

registration_command[repo]
optional , nil allowed

Repository URL / details, for example for Debian OS family: ‘deb http://deb.example.com/ buster 1.0’, for Red Hat OS family: ‘http://yum.theforeman.org/client/latest/el8/x86_64/’

Validations:

  • Must be a String

registration_command[repo_gpg_key_url]
optional , nil allowed

URL of the GPG key for the repository

Validations:

  • Must be a String