Examples

POST /api/registration_commands
{
  "activation_key": "key1, key2",
  "activation_keys": [
    "key3",
    "key4"
  ],
  "registration_command": {
    "activation_key": "key1, key2",
    "activation_keys": [
      "key3",
      "key4"
    ]
  }
}
200
{
  "registration_command": "curl -sS  'http://test.host/register?activation_keys=key3%2Ckey4%2Ckey1%2Ckey2' -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoxMzUxMzg2ODAsImlhdCI6MTY2NzkzNjIxMCwianRpIjoiODY3OTk1YzBkNTdkYmRiNDY2NDIxZWJmY2I3NTdlZDE0NjYwM2E0NDJmZGUzZDUxYjllNjQ5MTMwMGMxOWY5MSIsImV4cCI6MTY2Nzk1MDYxMCwic2NvcGUiOiJyZWdpc3RyYXRpb24jZ2xvYmFsIHJlZ2lzdHJhdGlvbiNob3N0In0.0FFovmOp8S0zpWjiCxl4xeUYEM2-QLYwdUcbD5TK2ug' | bash"
}

Params

Param name Description
location_id
optional

Set the current location context for the request

Validations:

  • Integer

organization_id
optional

Set the current organization context for the request

Validations:

  • Integer

registration_command
optional , nil allowed

Validations:

  • 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. This Proxy must have enabled both the 'Templates' and 'Registration' features

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:

  • 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 deb.example.com/ buster 1.0', for Red Hat and SUSE OS family: 'yum.theforeman.org/client/latest/el8/x86_64/'

Validations:

  • String

registration_command[repo_gpg_key_url]
optional , nil allowed

URL of the GPG key for the repository

Validations:

  • String

registration_command[activation_key]
optional

Activation key for subscription-manager client, required for CentOS and Red Hat Enterprise Linux. For multiple keys use `activation_keys` param instead.

Validations:

  • String

registration_command[activation_keys]
optional

Activation keys for subscription-manager client, required for CentOS and Red Hat Enterprise Linux. Required only if host group has no activation keys.

Validations:

  • Must be an array of any type

registration_command[lifecycle_environment_id]
optional

Lifecycle environment for the host.

Validations:

  • Must be a number.

registration_command[force]
optional

Clear any previous registration and run subscription-manager with –force.

Validations:

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

registration_command[ignore_subman_errors]
optional

Ignore subscription-manager errors for `subscription-manager register` command

Validations:

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

registration_command[remote_execution_interface]
optional

Identifier of the Host interface for Remote execution

Validations:

  • String

registration_command[setup_remote_execution_pull]
optional

Set 'host_registration_remote_execution_pull' parameter for the host. If it is set to true, pull provider client will be deployed on the host

Validations:

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