GET /api/settings
List all settings

Examples

GET /api/settings
200
{
  "total": 76,
  "subtotal": 76,
  "page": 1,
  "per_page": 20,
  "search": null,
  "sort": {
    "by": null,
    "order": null
  },
  "results": [
    {
      "value": true,
      "description": "Client SSL certificates are used to identify Smart Proxies (:require_ssl should also be enabled)",
      "category": "Setting::Auth",
      "settings_type": null,
      "default": true,
      "created_at": "2018-11-15 19:01:27 UTC",
      "updated_at": "2018-11-15 19:01:27 UTC",
      "id": 56017910,
      "name": "require_ssl_smart_proxies",
      "full_name": null,
      "category_name": "Authentication"
    },
    {
      "value": "oauth_secret",
      "description": "OAuth consumer secret",
      "category": "Setting::Auth",
      "settings_type": null,
      "default": "oauth_secret",
      "created_at": "2018-11-15 19:01:27 UTC",
      "updated_at": "2018-11-15 19:01:27 UTC",
      "id": 180233823,
      "name": "oauth_consumer_secret",
      "full_name": null,
      "category_name": "Authentication"
    },
    {
      "value": true,
      "description": "Foreman will map users by username in request-header. If this is set to false, OAuth requests will have admin rights.",
      "category": "Setting::Auth",
      "settings_type": null,
      "default": true,
      "created_at": "2018-11-15 19:01:27 UTC",
      "updated_at": "2018-11-15 19:01:27 UTC",
      "id": 330790887,
      "name": "oauth_map_users",
      "full_name": null,
      "category_name": "Authentication"
    },
    {
      "value": true,
      "description": "Only known Smart Proxies may access features that use Smart Proxy authentication",
      "category": "Setting::Auth",
      "settings_type": null,
      "default": true,
      "created_at": "2018-11-15 19:01:27 UTC",
      "updated_at": "2018-11-15 19:01:27 UTC",
      "id": 334093927,
      "name": "restrict_registered_smart_proxies",
      "full_name": null,
      "category_name": "Authentication"
    },
    {
      "value": "SSL_CLIENT_VERIFY",
      "description": "Environment variable containing the verification status of a client SSL certificate",
      "category": "Setting::Auth",
      "settings_type": null,
      "default": "SSL_CLIENT_VERIFY",
      "created_at": "2018-11-15 19:01:27 UTC",
      "updated_at": "2018-11-15 19:01:27 UTC",
      "id": 345406087,
      "name": "ssl_client_verify_env",
      "full_name": null,
      "category_name": "Authentication"
    },
    {
      "value": false,
      "description": "Foreman will use OAuth for API authorization",
      "category": "Setting::Auth",
      "settings_type": null,
      "default": false,
      "created_at": "2018-11-15 19:01:27 UTC",
      "updated_at": "2018-11-15 19:01:27 UTC",
      "id": 494837552,
      "name": "oauth_active",
      "full_name": null,
      "category_name": "Authentication"
    },
    {
      "value": "SSL_CLIENT_CERT",
      "description": "Environment variable containing a client SSL certificate",
      "category": "Setting::Auth",
      "settings_type": null,
      "default": "SSL_CLIENT_CERT",
      "created_at": "2018-11-15 19:01:27 UTC",
      "updated_at": "2018-11-15 19:01:27 UTC",
      "id": 596724240,
      "name": "ssl_client_cert_env",
      "full_name": null,
      "category_name": "Authentication"
    },
    {
      "value": "SSL_CLIENT_S_DN",
      "description": "Environment variable containing the subject DN from a client SSL certificate",
      "category": "Setting::Auth",
      "settings_type": null,
      "default": "SSL_CLIENT_S_DN",
      "created_at": "2018-11-15 19:01:27 UTC",
      "updated_at": "2018-11-15 19:01:27 UTC",
      "id": 877785955,
      "name": "ssl_client_dn_env",
      "full_name": null,
      "category_name": "Authentication"
    },
    {
      "value": 30,
      "description": "Foreman will block user login after this number of failed login attempts for 5 minutes from offending IP address. Set to 0 to disable bruteforce protection",
      "category": "Setting::Auth",
      "settings_type": null,
      "default": 30,
      "created_at": "2018-11-15 19:01:27 UTC",
      "updated_at": "2018-11-15 19:01:27 UTC",
      "id": 929211215,
      "name": "failed_login_attempts_limit",
      "full_name": null,
      "category_name": "Authentication"
    },
    {
      "value": true,
      "description": "Permits access to BMC interface passwords through ENC YAML output and in templates",
      "category": "Setting::Auth",
      "settings_type": null,
      "default": true,
      "created_at": "2018-11-15 19:01:27 UTC",
      "updated_at": "2018-11-15 19:01:27 UTC",
      "id": 949625892,
      "name": "bmc_credentials_accessible",
      "full_name": null,
      "category_name": "Authentication"
    },
    {
      "value": [],
      "description": "Hosts that will be trusted in addition to Smart Proxies for access to fact/report importers and ENC output",
      "category": "Setting::Auth",
      "settings_type": null,
      "default": [],
      "created_at": "2018-11-15 19:01:27 UTC",
      "updated_at": "2018-11-15 19:01:27 UTC",
      "id": 983047084,
      "name": "trusted_hosts",
      "full_name": null,
      "category_name": "Authentication"
    },
    {
      "value": "oauth_key",
      "description": "OAuth consumer key",
      "category": "Setting::Auth",
      "settings_type": null,
      "default": "oauth_key",
      "created_at": "2018-11-15 19:01:27 UTC",
      "updated_at": "2018-11-15 19:01:27 UTC",
      "id": 1035540174,
      "name": "oauth_consumer_key",
      "full_name": null,
      "category_name": "Authentication"
    },
    {
      "value": "smtp@example.com",
      "description": "Method used to deliver email'",
      "category": "Setting::Email",
      "settings_type": null,
      "default": "smtp@example.com",
      "created_at": "2018-11-15 19:01:27 UTC",
      "updated_at": "2018-11-15 19:01:27 UTC",
      "id": 149999788,
      "name": "smtp_address",
      "full_name": null,
      "category_name": "Email"
    },
    {
      "value": "foreman-noreply@#{SETTINGS[:domain]}",
      "description": "Email reply address for emails that Foreman is sending",
      "category": "Setting::Email",
      "settings_type": null,
      "default": "foreman-noreply@#{SETTINGS[:domain]}",
      "created_at": "2018-11-15 19:01:27 UTC",
      "updated_at": "2018-11-15 19:01:27 UTC",
      "id": 349877246,
      "name": "email_reply_address",
      "full_name": null,
      "category_name": "Email"
    },
    {
      "value": "none",
      "description": "Specify authentication type, if required",
      "category": "Setting::Email",
      "settings_type": null,
      "default": "none",
      "created_at": "2018-11-15 19:01:27 UTC",
      "updated_at": "2018-11-15 19:01:27 UTC",
      "id": 407883069,
      "name": "smtp_authentication",
      "full_name": null,
      "category_name": "Email"
    },
    {
      "value": false,
      "description": "Send a welcome email including initial username and password to new users",
      "category": "Setting::Email",
      "settings_type": null,
      "default": false,
      "created_at": "2018-11-15 19:01:27 UTC",
      "updated_at": "2018-11-15 19:01:27 UTC",
      "id": 615532402,
      "name": "send_welcome_email",
      "full_name": null,
      "category_name": "Email"
    },
    {
      "value": "args",
      "description": "Specify additional options to sendmail",
      "category": "Setting::Email",
      "settings_type": null,
      "default": "args",
      "created_at": "2018-11-15 19:01:27 UTC",
      "updated_at": "2018-11-15 19:01:27 UTC",
      "id": 793312686,
      "name": "sendmail_arguments",
      "full_name": null,
      "category_name": "Email"
    },
    {
      "value": [
        "foreman"
      ],
      "description": "Prefix to add to all outgoing email",
      "category": "Setting::Email",
      "settings_type": null,
      "default": [
        "foreman"
      ],
      "created_at": "2018-11-15 19:01:27 UTC",
      "updated_at": "2018-11-15 19:01:27 UTC",
      "id": 987026133,
      "name": "email_subject_prefix",
      "full_name": null,
      "category_name": "Email"
    },
    {
      "value": "test",
      "description": "Method used to deliver e-mail",
      "category": "Setting::Email",
      "settings_type": null,
      "default": "test",
      "created_at": "2018-11-15 19:01:27 UTC",
      "updated_at": "2018-11-15 19:01:27 UTC",
      "id": 1073209405,
      "name": "delivery_method",
      "full_name": null,
      "category_name": "Email"
    },
    {
      "value": null,
      "description": "Text to be shown in the login-page footer",
      "category": "Setting::General",
      "settings_type": null,
      "default": null,
      "created_at": "2018-11-15 19:01:27 UTC",
      "updated_at": "2018-11-15 19:01:27 UTC",
      "id": 6656990,
      "name": "login_text",
      "full_name": null,
      "category_name": "General"
    }
  ]
}

Params

Param name Description
location_id
optional

Scope by locations

Validations:

  • Must be a Integer

organization_id
optional

Scope by organizations

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

paginate results

Validations:

  • Must be a String

per_page
optional

number of entries per request

Validations:

  • Must be a String

Search fields

Field name Type Possible values
description text
name string

GET /api/settings/:id
Show a setting

Examples

GET /api/settings/administrator
200
{
  "value": "root@some.host.fqdn",
  "description": "The Default administrator email address",
  "category": "Setting::General",
  "settings_type": "string",
  "default": "root@some.host.fqdn",
  "created_at": "2018-11-15 19:01:27 UTC",
  "updated_at": "2018-11-15 19:01:27 UTC",
  "id": 333972760,
  "name": "administrator",
  "full_name": null,
  "category_name": "General"
}

Params

Param name Description
location_id
optional

Scope by locations

Validations:

  • Must be a Integer

organization_id
optional

Scope by organizations

Validations:

  • Must be a Integer

id
required

Validations:

  • Must be a String


PUT /api/settings/:id
Update a setting

Examples

PUT /api/settings/6656990
{
  "setting": {
    "value": "qfdwveWrskzQCCivrvRaVoeYQfTzzjyDWtdeoPGFtCSNvDmogpapPsldfkALazFfyGOptMKmHFGVTDqrqTEinVMlTkLLEuLDLSQxvWuBWctcWUPAqoQahsdjnqKWipwBfxHsrgVWwtwjVJlsjnwgiHzjyEqHwutprUIavrPbjjbaRTbABlQmArwoDxCIXdNSyNWFvPOQKCuyDQGbotcylAvFaVhqVGWApXpMKYalSUOsnzGLfWKEoYiyCLUWPVefHxOakotYxavUFqlyoGfaoVnCRqXNwDbTnocMyCtuRbaAwTweMSHMMkBpaGiNYgoxXqbgIiiyyDqnvvqnsljtMqEjmLpFbxUgvahSPeGGxDhHOjpgfjMemvNVPLvlioKjKDzntEClLGpXfNnEcKHwwBfIXzCdpJmykwrPxcqfvlmRwapgJbLHuDyOsoYKTAmIceUWIQnfcINnIbEKyRiQfRCOCpUsxLSQPNrKCkfRMBXUfiFqyCDxJuaVhecUGNrcYWbUcoyPaAgHfBnGfnOYOFWkQtCXghAHTqpBnSdBzRVPfKaCoVHSXTNWkFzvawCwqwhUQATDfRCqXSFAYDSxORgiHdNteMChYejcbtvhYgCtVflcWJKeMHkNcGogbjeglhKdJDNqHtIpNItlpUMAuNevFPpvSyRaWzhashRbmEOqkJiLbzYbjNXCtWYQaURjUupSQCmqjQHOQClCoqhnogtTRGkRKFiRFlbeUDCFjtnqzFOlBkoMaUmlUnUwlysYBqiuMsxUQrSpkORtdQTanJLULbUDFWzXYPpfOIPxGXIYRzrYNRoyAyNGnrWqkMeyeIeofNMdYtngnHUhFNpUESQvMsHRVpHyeiArrMnwuFqEirXjoUGxJEUGWveknevBkRXxmkbfUulejdnOfESxQmIUwSggnGjtHpfrKOiLmOWebEFnnRiKqjddxrsXiQiWNvdzhFrSPVuIjrPepcjLFqwzQRjtPvgOJFcFNGlr"
  }
}
200
{
  "value": "qfdwveWrskzQCCivrvRaVoeYQfTzzjyDWtdeoPGFtCSNvDmogpapPsldfkALazFfyGOptMKmHFGVTDqrqTEinVMlTkLLEuLDLSQxvWuBWctcWUPAqoQahsdjnqKWipwBfxHsrgVWwtwjVJlsjnwgiHzjyEqHwutprUIavrPbjjbaRTbABlQmArwoDxCIXdNSyNWFvPOQKCuyDQGbotcylAvFaVhqVGWApXpMKYalSUOsnzGLfWKEoYiyCLUWPVefHxOakotYxavUFqlyoGfaoVnCRqXNwDbTnocMyCtuRbaAwTweMSHMMkBpaGiNYgoxXqbgIiiyyDqnvvqnsljtMqEjmLpFbxUgvahSPeGGxDhHOjpgfjMemvNVPLvlioKjKDzntEClLGpXfNnEcKHwwBfIXzCdpJmykwrPxcqfvlmRwapgJbLHuDyOsoYKTAmIceUWIQnfcINnIbEKyRiQfRCOCpUsxLSQPNrKCkfRMBXUfiFqyCDxJuaVhecUGNrcYWbUcoyPaAgHfBnGfnOYOFWkQtCXghAHTqpBnSdBzRVPfKaCoVHSXTNWkFzvawCwqwhUQATDfRCqXSFAYDSxORgiHdNteMChYejcbtvhYgCtVflcWJKeMHkNcGogbjeglhKdJDNqHtIpNItlpUMAuNevFPpvSyRaWzhashRbmEOqkJiLbzYbjNXCtWYQaURjUupSQCmqjQHOQClCoqhnogtTRGkRKFiRFlbeUDCFjtnqzFOlBkoMaUmlUnUwlysYBqiuMsxUQrSpkORtdQTanJLULbUDFWzXYPpfOIPxGXIYRzrYNRoyAyNGnrWqkMeyeIeofNMdYtngnHUhFNpUESQvMsHRVpHyeiArrMnwuFqEirXjoUGxJEUGWveknevBkRXxmkbfUulejdnOfESxQmIUwSggnGjtHpfrKOiLmOWebEFnnRiKqjddxrsXiQiWNvdzhFrSPVuIjrPepcjLFqwzQRjtPvgOJFcFNGlr",
  "description": "Text to be shown in the login-page footer",
  "category": "Setting::General",
  "settings_type": null,
  "default": null,
  "created_at": "2018-11-15 19:01:27 UTC",
  "updated_at": "2018-11-15 19:02:13 UTC",
  "id": 6656990,
  "name": "login_text",
  "full_name": null,
  "category_name": "General"
}

Params

Param name Description
location_id
optional

Scope by locations

Validations:

  • Must be a Integer

organization_id
optional

Scope by organizations

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