GET /api/smart_class_parameters
모든 스마트 클래스 매개 변수 나열

GET /api/hosts/:host_id/smart_class_parameters
특정 호스트의 스마트 클래스 매개 변수 목록

GET /api/hostgroups/:hostgroup_id/smart_class_parameters
특정 호스트 그룹의 스마트 클래스 매개 변수 목록

GET /api/puppetclasses/:puppetclass_id/smart_class_parameters
특정 Puppet 클래스의 스마트 클래스 매개 변수 목록

GET /api/environments/:environment_id/smart_class_parameters
특정 환경의 스마트 클래스 매개 변수 목록

GET /api/environments/:environment_id/puppetclasses/:puppetclass_id/smart_class_parameters
특정 환경/Puppet 클래스 조합의 스마트 클래스 매개 변수 목록

Examples

GET /api/puppetclasses/980190962/smart_class_parameters
200
{
  "total": 1,
  "subtotal": 1,
  "page": 1,
  "per_page": 20,
  "search": null,
  "sort": {
    "by": null,
    "order": null
  },
  "results": [
    {
      "description": null,
      "override": true,
      "parameter_type": "string",
      "hidden_value?": false,
      "omit": null,
      "required": false,
      "validator_type": null,
      "validator_rule": null,
      "merge_overrides": false,
      "merge_default": false,
      "avoid_duplicates": false,
      "override_value_order": "fqdn\norganization,location\nhostgroup\nos",
      "created_at": "2019-11-07 08:52:01 UTC",
      "updated_at": "2019-11-07 08:52:01 UTC",
      "use_puppet_default": null,
      "parameter": "cluster",
      "id": 328495940,
      "puppetclass_id": 980190962,
      "override_values_count": 2,
      "default_value": "secret",
      "puppetclass_name": "base"
    }
  ]
}

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

host_id
Optional

Validations:

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

hostgroup_id
Optional

Validations:

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

puppetclass_id
Optional

Validations:

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

environment_id
Optional

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
Optional

Display hidden values

Validations:

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

search
Optional

필터 결과

Validations:

  • Must be a String

order
Optional

Sort field and order, eg. ‘id DESC’

Validations:

  • Must be a String

page
Optional

1 부터 페이지 번호

Validations:

  • Must be a number.

per_page
Optional

반환할 페이지 당 결과 수

Validations:

  • Must be a number.

Search fields

Field name 유형 Possible values
avoid_duplicates true, false
environment string
key string
merge_default true, false
merge_overrides true, false
override true, false
parameter string
puppetclass string
puppetclass_name string

GET /api/smart_class_parameters/:id
스마트 클래스 매개 변수 표시

Examples

GET /api/puppetclasses/980190962/smart_class_parameters/1018350796
200
{
  "description": null,
  "override": false,
  "parameter_type": null,
  "hidden_value?": true,
  "omit": null,
  "required": false,
  "validator_type": null,
  "validator_rule": null,
  "merge_overrides": false,
  "merge_default": false,
  "avoid_duplicates": false,
  "override_value_order": "fqdn\nhostgroup\nos\ndomain",
  "created_at": "2019-11-07 08:36:36 UTC",
  "updated_at": "2019-11-07 08:36:36 UTC",
  "use_puppet_default": null,
  "parameter": "param38",
  "id": 1018350796,
  "puppetclass_id": 980190962,
  "override_values_count": 1,
  "default_value": "hidden",
  "puppetclass_name": "base",
  "environments": [],
  "override_values": [
    {
      "created_at": "2019-11-07 08:36:36 UTC",
      "updated_at": "2019-11-07 08:36:36 UTC",
      "id": 1018350796,
      "match": "os=fake",
      "value": "abc",
      "omit": false,
      "use_puppet_default": false
    }
  ]
}

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 an identifier, string from 1 to 128 characters containing only alphanumeric characters, space, underscore(_), hypen(-) with no leading or trailing space.

show_hidden
Optional

Display hidden values

Validations:

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


PUT /api/smart_class_parameters/:id
스마트 클래스 매개 변수 업데이트

Examples

PUT /api/smart_class_parameters/1018350796
{
  "smart_class_parameter": {
    "parameter_type": "boolean",
    "default_value": "bTreQsKkLv"
  }
}
500
{
  "error": {
    "message": "Validation failed: Default value is invalid, Lookup values is invalid"
  }
}

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 an identifier, string from 1 to 128 characters containing only alphanumeric characters, space, underscore(_), hypen(-) with no leading or trailing space.

smart_class_parameter
Required

Validations:

  • Must be a Hash

smart_class_parameter[override]
Optional

스마트 클래스 매개 변수 값을 Foreman에서 관리하는지 여부

Validations:

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

smart_class_parameter[description]
Optional

스마트 클래스 설명

Validations:

  • Must be a String

smart_class_parameter[default_value]
Optional

일치하지 않는 경우 사용할 값

Validations:

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

smart_class_parameter[hidden_value]
Optional

활성화된 경우 매개 변수가 UI에서 숨겨집니다.

Validations:

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

smart_class_parameter[use_puppet_default]
Optional

Deprecated, please use omit

Validations:

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

smart_class_parameter[omit]
Optional

Foreman will not send this parameter in classification output. Puppet will use the value defined in the Puppet manifest for this parameter

Validations:

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

smart_class_parameter[path]
Optional

값이 해결되는 순서

Validations:

  • Must be a String

smart_class_parameter[validator_type]
Optional

검증 값의 유형

Validations:

  • Must be one of: regexp, list.

smart_class_parameter[validator_rule]
Optional

특정 값을 매개 변수 값에 적용하는 데 사용됩니다.

Validations:

  • Must be a String

smart_class_parameter[override_value_order]
Optional

값이 해결되는 순서

Validations:

  • Must be a String

smart_class_parameter[parameter_type]
Optional

변수 값의 유형

Validations:

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

smart_class_parameter[required]
Optional

true인 경우, 기본값이 없고 matcher에서 값이 제공되지 않으면 오류가 발생합니다.

Validations:

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

smart_class_parameter[merge_overrides]
Optional

일치하는 모든 값 병합(배열/해시 유형만)

Validations:

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

smart_class_parameter[merge_default]
Optional

일치하는 모든 값을 병합할 때 기본값 포함

Validations:

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

smart_class_parameter[avoid_duplicates]
Optional

중복 값 삭제(배열 유형만)

Validations:

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