GET /api/smart_variables/:smart_variable_id/override_values
Список заменяемых значений для определенной смарт-переменной

GET /api/smart_class_parameters/:smart_class_parameter_id/override_values
Список заменяемых значений для определенного смарт-параметра

Примеры

GET /api/smart_class_parameters/328495940-cluster/override_values
200
{
  "total": 2,
  "subtotal": 2,
  "page": 1,
  "per_page": 20,
  "search": null,
  "sort": {
    "by": null,
    "order": null
  },
  "results": [
    {
      "created_at": "2019-11-07 08:39:06 UTC",
      "updated_at": "2019-11-07 08:39:06 UTC",
      "id": 674471636,
      "match": "fqdn=temp.yourdomain.net",
      "value": "8080",
      "omit": false,
      "use_puppet_default": false
    },
    {
      "created_at": "2019-11-07 08:39:06 UTC",
      "updated_at": "2019-11-07 08:39:06 UTC",
      "id": 874520030,
      "match": "hostgroup=Common",
      "value": "8080",
      "omit": false,
      "use_puppet_default": false
    }
  ]
}

Параметры

Имя параметра Описание
location_id
необязательно

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
необязательно

Set the current organization context for the request

Validations:

  • Must be a Integer

smart_variable_id
необязательно

Validations:

  • Must be an identifier, string from 1 to 128 characters containing only alphanumeric characters, space, underscore(_), hypen(-) with no leading or trailing space.

smart_class_parameter_id
необязательно

Validations:

  • Must be an identifier, string from 1 to 128 characters containing only alphanumeric characters, space, underscore(_), hypen(-) with no leading or trailing space.

show_hidden
необязательно

Display hidden values

Validations:

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

page
необязательно

Номер страницы, начиная с 1

Validations:

  • Must be a number.

per_page
необязательно

Число элементов на странице

Validations:

  • Must be a number.


GET /api/smart_variables/:smart_variable_id/override_values/:id
Показать значение переопределения смарт-переменной

GET /api/smart_class_parameters/:smart_class_parameter_id/override_values/:id
Показать значение переопределения для смарт-параметра

Примеры

GET /api/smart_class_parameters/328495940-cluster/override_values/hostgroup=Common
200
{
  "created_at": "2019-11-07 08:39:06 UTC",
  "updated_at": "2019-11-07 08:39:06 UTC",
  "id": 874520030,
  "match": "hostgroup=Common",
  "value": "8080",
  "omit": false,
  "use_puppet_default": false
}

Параметры

Имя параметра Описание
location_id
необязательно

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
необязательно

Set the current organization context for the request

Validations:

  • Must be a Integer

smart_variable_id
необязательно

Validations:

  • Must be an identifier, string from 1 to 128 characters containing only alphanumeric characters, space, underscore(_), hypen(-) with no leading or trailing space.

smart_class_parameter_id
необязательно

Validations:

  • Must be an identifier, string from 1 to 128 characters containing only alphanumeric characters, space, underscore(_), hypen(-) with no leading or trailing space.

id
обязательно

Validations:

  • Must be an identifier, string from 1 to 128 characters containing only alphanumeric characters, space, underscore(_), hypen(-) with no leading or trailing space.

show_hidden
необязательно

Display hidden values

Validations:

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


POST /api/smart_variables/:smart_variable_id/override_values
Создать переопределение для смарт-переменной

POST /api/smart_class_parameters/:smart_class_parameter_id/override_values
Создать переопределение смарт-параметра

Примеры

POST /api/smart_variables/1018350798/override_values
{
  "override_value": {
    "match": "os=string"
  }
}
201
{
  "created_at": "2019-11-07 08:39:22 UTC",
  "updated_at": "2019-11-07 08:39:22 UTC",
  "id": 1018350797,
  "match": "os=string",
  "value": null,
  "omit": false,
  "use_puppet_default": false
}

Параметры

Имя параметра Описание
location_id
необязательно

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
необязательно

Set the current organization context for the request

Validations:

  • Must be a Integer

smart_variable_id
необязательно

Validations:

  • Must be an identifier, string from 1 to 128 characters containing only alphanumeric characters, space, underscore(_), hypen(-) with no leading or trailing space.

smart_class_parameter_id
необязательно

Validations:

  • Must be an identifier, string from 1 to 128 characters containing only alphanumeric characters, space, underscore(_), hypen(-) with no leading or trailing space.

override_value
обязательно

Validations:

  • Must be a Hash

override_value[match]
обязательно

Условие переопределения

Validations:

  • Must be a String

override_value[value]
необязательно , nil разрешен

Override value, required if omit is false

Validations:

  • Must be one of types: string, boolean, integer, real, array, hash, yaml, json

override_value[use_puppet_default]
необязательно , nil разрешен

Deprecated, please use omit

Validations:

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

override_value[omit]
необязательно , nil разрешен

Foreman will not send this parameter in classification output, replaces use_puppet_default

Validations:

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


PUT /api/smart_variables/:smart_variable_id/override_values/:id
Обновить переопределение смарт-переменной

PUT /api/smart_class_parameters/:smart_class_parameter_id/override_values/:id
Обновить значение переопределения смарт-параметра

Примеры

PUT /api/smart_class_parameters/328495940-cluster/override_values/874520030
{
  "override_value": {
    "match": "os=abc"
  }
}
200
{
  "created_at": "2019-11-07 08:39:06 UTC",
  "updated_at": "2019-11-07 08:39:23 UTC",
  "id": 874520030,
  "match": "os=abc",
  "value": "8080",
  "omit": false,
  "use_puppet_default": false
}

Параметры

Имя параметра Описание
location_id
необязательно

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
необязательно

Set the current organization context for the request

Validations:

  • Must be a Integer

smart_variable_id
необязательно

Validations:

  • Must be an identifier, string from 1 to 128 characters containing only alphanumeric characters, space, underscore(_), hypen(-) with no leading or trailing space.

smart_class_parameter_id
необязательно

Validations:

  • Must be an identifier, string from 1 to 128 characters containing only alphanumeric characters, space, underscore(_), hypen(-) with no leading or trailing space.

override_value
обязательно

Validations:

  • Must be a Hash

override_value[match]
необязательно

Условие переопределения

Validations:

  • Must be a String

override_value[value]
необязательно , nil разрешен

Override value, required if omit is false

Validations:

  • Must be one of types: string, boolean, integer, real, array, hash, yaml, json

override_value[use_puppet_default]
необязательно , nil разрешен

Deprecated, please use omit

Validations:

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

override_value[omit]
необязательно , nil разрешен

Foreman will not send this parameter in classification output, replaces use_puppet_default

Validations:

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


DELETE /api/smart_variables/:smart_variable_id/override_values/:id
Удалить значение переопределения смарт-переменной

DELETE /api/smart_class_parameters/:smart_class_parameter_id/override_values/:id
Удалить значение переопределения смарт-параметра

Примеры

DELETE /api/smart_class_parameters/328495940-cluster/override_values/874520030
{
  "override_value": {}
}
200
{
  "created_at": "2019-11-07 08:39:06 UTC",
  "updated_at": "2019-11-07 08:39:06 UTC",
  "id": 874520030,
  "match": "hostgroup=Common",
  "value": "8080",
  "omit": false,
  "use_puppet_default": false
}

Параметры

Имя параметра Описание
location_id
необязательно

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
необязательно

Set the current organization context for the request

Validations:

  • Must be a Integer

smart_variable_id
необязательно

Validations:

  • Must be an identifier, string from 1 to 128 characters containing only alphanumeric characters, space, underscore(_), hypen(-) with no leading or trailing space.

smart_class_parameter_id
необязательно

Validations:

  • Must be an identifier, string from 1 to 128 characters containing only alphanumeric characters, space, underscore(_), hypen(-) with no leading or trailing space.

id
обязательно

Validations:

  • Must be an identifier, string from 1 to 128 characters containing only alphanumeric characters, space, underscore(_), hypen(-) with no leading or trailing space.