GET /api/settings
List all settings

Examples

GET /api/settings
200
{
  "total": 84,
  "subtotal": 84,
  "page": 1,
  "per_page": 20,
  "search": null,
  "sort": {
    "by": null,
    "order": null
  },
  "results": [
    {
      "description": "Allow access to unattended URLs without build mode being used",
      "category": "Setting::Provisioning",
      "settings_type": "boolean",
      "default": false,
      "updated_at": "2021-05-18 16:18:48 UTC",
      "id": "access_unattended_without_build",
      "name": "access_unattended_without_build",
      "full_name": "Access unattended without build",
      "value": false,
      "category_name": "Provisioning",
      "readonly": false,
      "config_file": null,
      "encrypted": false,
      "select_values": null
    },
    {
      "description": "Default encrypted root password on provisioned hosts",
      "category": "Setting::Provisioning",
      "settings_type": null,
      "default": null,
      "updated_at": "2021-05-18 16:18:48 UTC",
      "id": "root_pass",
      "name": "root_pass",
      "full_name": "Root password",
      "value": "*****",
      "category_name": "Provisioning",
      "readonly": false,
      "config_file": null,
      "encrypted": true,
      "select_values": null
    },
    {
      "description": "Foreman will explicitly set the puppet environment in the ENC yaml output. This will avoid conflicts between the environment in puppet.conf and the environment set in Foreman",
      "category": "Setting::Puppet",
      "settings_type": "boolean",
      "default": true,
      "updated_at": "2021-05-18 16:18:48 UTC",
      "id": "enc_environment",
      "name": "enc_environment",
      "full_name": "ENC environment",
      "value": true,
      "category_name": "Puppet",
      "readonly": false,
      "config_file": null,
      "encrypted": false,
      "select_values": null
    },
    {
      "description": "SSL Certificate path that Foreman would use to communicate with its proxies",
      "category": "Setting::Auth",
      "settings_type": null,
      "default": null,
      "updated_at": "2021-05-18 16:18:48 UTC",
      "id": "ssl_certificate",
      "name": "ssl_certificate",
      "full_name": "SSL certificate",
      "value": "/var/lib/puppet/ssl/certs/some.host.fqdn",
      "category_name": "Authentication",
      "readonly": false,
      "config_file": null,
      "encrypted": false,
      "select_values": null
    },
    {
      "description": "SSL CA file that Foreman will use to communicate with its proxies",
      "category": "Setting::Auth",
      "settings_type": null,
      "default": null,
      "updated_at": "2021-05-18 16:18:48 UTC",
      "id": "ssl_ca_file",
      "name": "ssl_ca_file",
      "full_name": "SSL CA file",
      "value": "/var/lib/puppet/ssl/certs/ca.pem",
      "category_name": "Authentication",
      "readonly": false,
      "config_file": null,
      "encrypted": false,
      "select_values": null
    },
    {
      "description": "SSL Private Key file that Foreman will use to communicate with its proxies",
      "category": "Setting::Auth",
      "settings_type": null,
      "default": null,
      "updated_at": "2021-05-18 16:18:48 UTC",
      "id": "ssl_priv_key",
      "name": "ssl_priv_key",
      "full_name": "SSL private key",
      "value": "/var/lib/puppet/ssl/private_keys/super.some.host.fqdn.pem",
      "category_name": "Authentication",
      "readonly": false,
      "config_file": null,
      "encrypted": false,
      "select_values": null
    },
    {
      "description": "Duration in minutes after servers reporting via Puppet are classed as out of sync.",
      "category": "Setting::Puppet",
      "settings_type": "integer",
      "default": 35,
      "updated_at": "2021-05-18 16:18:48 UTC",
      "id": "puppet_interval",
      "name": "puppet_interval",
      "full_name": "Puppet interval",
      "value": 30,
      "category_name": "Puppet",
      "readonly": false,
      "config_file": null,
      "encrypted": false,
      "select_values": null
    },
    {
      "description": "Foreman will default to this puppet environment if it cannot auto detect one",
      "category": "Setting::Puppet",
      "settings_type": "string",
      "default": "production",
      "updated_at": "2021-05-18 16:18:48 UTC",
      "id": "default_puppet_environment",
      "name": "default_puppet_environment",
      "full_name": "Default Puppet environment",
      "value": "production",
      "category_name": "Puppet",
      "readonly": false,
      "config_file": null,
      "encrypted": false,
      "select_values": {
        "global_puppetmaster": "global_puppetmaster",
        "production": "production",
        "testing": "testing"
      }
    },
    {},
    {
      "description": "Foreman will evaluate host smart class parameters in this order by default",
      "category": "Setting::Puppet",
      "settings_type": "array",
      "default": [
        "fqdn",
        "hostgroup",
        "os",
        "domain"
      ],
      "updated_at": "2021-05-18 16:18:48 UTC",
      "id": "Default_parameters_Lookup_Path",
      "name": "Default_parameters_Lookup_Path",
      "full_name": "Default parameters lookup path",
      "value": [
        "fqdn",
        "hostgroup",
        "os",
        "domain"
      ],
      "category_name": "Puppet",
      "readonly": false,
      "config_file": null,
      "encrypted": false,
      "select_values": null
    },
    {
      "description": "Foreman will automate certificate signing upon provision of new host",
      "category": "Setting::Provisioning",
      "settings_type": "boolean",
      "default": true,
      "updated_at": "2021-05-18 16:18:48 UTC",
      "id": "manage_puppetca",
      "name": "manage_puppetca",
      "full_name": "Manage PuppetCA",
      "value": true,
      "category_name": "Provisioning",
      "readonly": false,
      "config_file": null,
      "encrypted": false,
      "select_values": null
    },
    {
      "description": "Number of records shown per page in Foreman",
      "category": "Setting::General",
      "settings_type": "integer",
      "default": 20,
      "updated_at": "2021-05-18 16:18:48 UTC",
      "id": "entries_per_page",
      "name": "entries_per_page",
      "full_name": "Entries per page",
      "value": 20,
      "category_name": "General",
      "readonly": false,
      "config_file": null,
      "encrypted": false,
      "select_values": null
    },
    {
      "description": "Foreman will update a host's environment from its facts",
      "category": "Setting::Puppet",
      "settings_type": "boolean",
      "default": false,
      "updated_at": "2021-05-18 16:18:48 UTC",
      "id": "update_environment_from_facts",
      "name": "update_environment_from_facts",
      "full_name": "Update environment from facts",
      "value": false,
      "category_name": "Puppet",
      "readonly": false,
      "config_file": null,
      "encrypted": false,
      "select_values": null
    },
    {
      "description": "Log out idle users after a certain number of minutes",
      "category": "Setting::Auth",
      "settings_type": "integer",
      "default": 60,
      "updated_at": "2021-05-18 16:18:48 UTC",
      "id": "idle_timeout",
      "name": "idle_timeout",
      "full_name": "Idle timeout",
      "value": 5,
      "category_name": "Authentication",
      "readonly": false,
      "config_file": null,
      "encrypted": false,
      "select_values": null
    },
    {
      "description": "Enable safe mode config templates rendering (recommended)",
      "category": "Setting::Provisioning",
      "settings_type": "boolean",
      "default": true,
      "updated_at": "2021-05-18 16:18:48 UTC",
      "id": "safemode_render",
      "name": "safemode_render",
      "full_name": "Safemode rendering",
      "value": true,
      "category_name": "Provisioning",
      "readonly": false,
      "config_file": null,
      "encrypted": false,
      "select_values": null
    },
    {
      "description": "Foreman will use random UUIDs for certificate signing instead of hostnames",
      "category": "Setting::Puppet",
      "settings_type": "boolean",
      "default": false,
      "updated_at": "2021-05-18 16:18:48 UTC",
      "id": "use_uuid_for_certificates",
      "name": "use_uuid_for_certificates",
      "full_name": "Use UUID for certificates",
      "value": false,
      "category_name": "Puppet",
      "readonly": false,
      "config_file": null,
      "encrypted": false,
      "select_values": null
    },
    {
      "description": "Foreman will query the locally configured resolver instead of the SOA/NS authorities",
      "category": "Setting::Provisioning",
      "settings_type": "boolean",
      "default": false,
      "updated_at": "2021-05-18 16:18:48 UTC",
      "id": "query_local_nameservers",
      "name": "query_local_nameservers",
      "full_name": "Query local nameservers",
      "value": false,
      "category_name": "Provisioning",
      "readonly": false,
      "config_file": null,
      "encrypted": false,
      "select_values": null
    },
    {
      "description": "Authorize login delegation with REMOTE_USER HTTP header",
      "category": "Setting::Auth",
      "settings_type": "boolean",
      "default": false,
      "updated_at": "2021-05-18 16:18:48 UTC",
      "id": "authorize_login_delegation",
      "name": "authorize_login_delegation",
      "full_name": "Authorize login delegation",
      "value": false,
      "category_name": "Authentication",
      "readonly": false,
      "config_file": null,
      "encrypted": false,
      "select_values": null
    },
    {
      "description": "Authorize login delegation with REMOTE_USER HTTP header for API calls too",
      "category": "Setting::Auth",
      "settings_type": "boolean",
      "default": false,
      "updated_at": "2021-05-18 16:18:48 UTC",
      "id": "authorize_login_delegation_api",
      "name": "authorize_login_delegation_api",
      "full_name": "Authorize login delegation API",
      "value": false,
      "category_name": "Authentication",
      "readonly": false,
      "config_file": null,
      "encrypted": false,
      "select_values": null
    },
    {
      "description": "URL where your Foreman instance is reachable (see also Provisioning > unattended_url)",
      "category": "Setting::General",
      "settings_type": "string",
      "default": "http://test.host.com",
      "updated_at": "2021-05-18 16:18:48 UTC",
      "id": "foreman_url",
      "name": "foreman_url",
      "full_name": "Foreman URL",
      "value": "http://foreman.some.host.fqdn",
      "category_name": "General",
      "readonly": false,
      "config_file": null,
      "encrypted": false,
      "select_values": null
    }
  ]
}

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

search
optional

filter results

Validations:

  • Must be a String

order
optional

Sort field and order, eg. ‘id DESC’

Validations:

  • Must be a String

page
optional

Page number, starting at 1

Validations:

  • Must be a number.

per_page
optional

Number of results per page to return, ‘all’ to return all results

Validations:

  • Must match regular expression /\A([1-9]\d|all)\Z$/.

Search fields

Field name Type Possible values
description text
name string

GET /api/settings/:id
Show a setting

Examples

GET /api/settings/301564180
200
{
  "description": "Allow access to unattended URLs without build mode being used",
  "category": "Setting::Provisioning",
  "settings_type": "boolean",
  "default": false,
  "updated_at": "2021-05-18 16:18:48 UTC",
  "id": "access_unattended_without_build",
  "name": "access_unattended_without_build",
  "full_name": "Access unattended without build",
  "value": false,
  "category_name": "Provisioning",
  "readonly": false,
  "config_file": null,
  "encrypted": false,
  "select_values": null
}

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

id
required

Validations:

  • Must be a String


PUT /api/settings/:id
Update a setting

Examples

PUT /api/settings/22346878
{
  "setting": {
    "value": "['baz','foo']"
  }
}
200
{
  "description": "Exclude pattern for all types of imported facts (puppet, ansible, rhsm). Those facts won't be stored in foreman's database. You can use * wildcard to match names with indexes e.g. ignore* will filter out ignore, ignore123 as well as a::ignore or even a::ignore123::b",
  "category": "Setting::Provisioning",
  "settings_type": "array",
  "default": [
    "lo",
    "en*v*",
    "usb*",
    "vnet*",
    "macvtap*",
    ";vdsmdummy;",
    "veth*",
    "docker*",
    "tap*",
    "qbr*",
    "qvb*",
    "qvo*",
    "qr-*",
    "qg-*",
    "vlinuxbr*",
    "vovsbr*",
    "br-int",
    "load_averages::*",
    "memory::system::capacity",
    "memory::system::used*",
    "memory::system::available*",
    "memory::swap::capacity",
    "memory::swap::used*",
    "memory::swap::available*"
  ],
  "updated_at": "2021-05-18 16:19:09 UTC",
  "id": "excluded_facts",
  "name": "excluded_facts",
  "full_name": "Exclude pattern for facts stored in foreman",
  "value": [
    "baz",
    "foo"
  ],
  "category_name": "Provisioning",
  "readonly": false,
  "config_file": null,
  "encrypted": false,
  "select_values": null
}

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

id
required

Validations:

  • Must be a String

setting
required

Validations:

  • Must be a Hash

setting[value]
optional

Validations:

  • Must be a String