GET /api/smart_variables
모든 스마트 매개 변수 나열

GET /api/hosts/:host_id/smart_variables
특정 호스트의 스마트 변수 목록

GET /api/hostgroups/:hostgroup_id/smart_variables
특정 호스트 그룹의 스마트 변수 목록

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

Examples

GET /api/puppetclasses/298486374/smart_variables
200
{
  "total": 1,
  "subtotal": 1,
  "page": 1,
  "per_page": 20,
  "search": null,
  "sort": {
    "by": null,
    "order": null
  },
  "results": [
    {
      "description": null,
      "parameter_type": "string",
      "variable_type": "string",
      "hidden_value?": false,
      "validator_type": null,
      "validator_rule": null,
      "override_value_order": "organization,location\nxyz\nhostgroup",
      "merge_overrides": false,
      "merge_default": false,
      "avoid_duplicates": false,
      "puppetclass_id": 298486374,
      "puppetclass_name": "apache",
      "created_at": "2019-09-11 14:58:01 UTC",
      "updated_at": "2019-09-11 14:58:01 UTC",
      "variable": "special_info",
      "id": 281110143,
      "default_value": "secret",
      "override_values_count": 2
    }
  ]
}

Params

Param Name Description
location_id
Optional

위치 별 범위

Validations:

  • Must be a Integer

organization_id
Optional

조직 별 범위

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.

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
key string
merge_default true, false
merge_overrides true, false
override true, false
parameter string
puppetclass string

GET /api/smart_variables/:id
스마트 변수 표시

Examples

GET /api/puppetclasses/980190962/smart_variables/1018350796
200
{
  "description": null,
  "parameter_type": null,
  "variable_type": null,
  "hidden_value?": true,
  "validator_type": null,
  "validator_rule": null,
  "override_value_order": "fqdn\nhostgroup\nos\ndomain",
  "merge_overrides": false,
  "merge_default": false,
  "avoid_duplicates": false,
  "puppetclass_id": 980190962,
  "puppetclass_name": "base",
  "created_at": "2019-09-11 14:34:10 UTC",
  "updated_at": "2019-09-11 14:34:10 UTC",
  "variable": "param8",
  "id": 1018350796,
  "default_value": "hidden",
  "override_values_count": 0,
  "override_values": []
}

Params

Param Name Description
location_id
Optional

위치 별 범위

Validations:

  • Must be a Integer

organization_id
Optional

조직 별 범위

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.


POST /api/smart_variables
스마트 변수 생성

Examples

POST /api/smart_variables
{
  "smart_variable": {
    "variable": "QSFxqjVjdV",
    "puppetclass_id": 298486374,
    "hidden_value": true
  }
}
201
{
  "description": null,
  "parameter_type": null,
  "variable_type": null,
  "hidden_value?": true,
  "validator_type": null,
  "validator_rule": null,
  "override_value_order": "fqdn\nhostgroup\nos\ndomain",
  "merge_overrides": false,
  "merge_default": false,
  "avoid_duplicates": false,
  "puppetclass_id": 298486374,
  "puppetclass_name": "apache",
  "created_at": "2019-09-11 14:34:11 UTC",
  "updated_at": "2019-09-11 14:34:11 UTC",
  "variable": "QSFxqjVjdV",
  "id": 1018350798,
  "default_value": "*****",
  "override_values_count": 0,
  "override_values": []
}

Params

Param Name Description
location_id
Optional

위치 별 범위

Validations:

  • Must be a Integer

organization_id
Optional

조직 별 범위

Validations:

  • Must be a Integer

smart_variable
Required

Validations:

  • Must be a Hash

smart_variable[variable]
Required

변수 이름

Validations:

  • Must be a String

smart_variable[puppetclass_id]
Optional , <span class="translation_missing" title="translation missing: ko.apipie.nil_allowed">Nil Allowed</span>

Puppet 클래스 ID

Validations:

  • Must be a number.

smart_variable[default_value]
Optional , <span class="translation_missing" title="translation missing: ko.apipie.nil_allowed">Nil Allowed</span>

변수의 기본값

Validations:

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

smart_variable[hidden_value]
Optional , <span class="translation_missing" title="translation missing: ko.apipie.nil_allowed">Nil Allowed</span>

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

Validations:

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

smart_variable[override_value_order]
Optional , <span class="translation_missing" title="translation missing: ko.apipie.nil_allowed">Nil Allowed</span>

값이 해결되는 순서

Validations:

  • Must be a String

smart_variable[description]
Optional , <span class="translation_missing" title="translation missing: ko.apipie.nil_allowed">Nil Allowed</span>

변수 설명

Validations:

  • Must be a String

smart_variable[validator_type]
Optional , <span class="translation_missing" title="translation missing: ko.apipie.nil_allowed">Nil Allowed</span>

검증 값의 유형

Validations:

  • Must be one of: regexp, list.

smart_variable[validator_rule]
Optional , <span class="translation_missing" title="translation missing: ko.apipie.nil_allowed">Nil Allowed</span>

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

Validations:

  • Must be a String

smart_variable[variable_type]
Optional , <span class="translation_missing" title="translation missing: ko.apipie.nil_allowed">Nil Allowed</span>

변수 값의 유형

Validations:

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

smart_variable[merge_overrides]
Optional , <span class="translation_missing" title="translation missing: ko.apipie.nil_allowed">Nil Allowed</span>

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

Validations:

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

smart_variable[merge_default]
Optional , <span class="translation_missing" title="translation missing: ko.apipie.nil_allowed">Nil Allowed</span>

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

Validations:

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

smart_variable[avoid_duplicates]
Optional , <span class="translation_missing" title="translation missing: ko.apipie.nil_allowed">Nil Allowed</span>

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

Validations:

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


PUT /api/smart_variables/:id
스마트 변수 업데이트

Examples

PUT /api/smart_variables/1018350799-IJcocqAlPP
{
  "smart_variable": {
    "hidden_value": false
  }
}
200
{
  "description": null,
  "parameter_type": null,
  "variable_type": null,
  "hidden_value?": false,
  "validator_type": null,
  "validator_rule": null,
  "override_value_order": "fqdn\nhostgroup\nos\ndomain",
  "merge_overrides": false,
  "merge_default": false,
  "avoid_duplicates": false,
  "puppetclass_id": 980190962,
  "puppetclass_name": "base",
  "created_at": "2019-09-11 14:34:11 UTC",
  "updated_at": "2019-09-11 14:34:11 UTC",
  "variable": "IJcocqAlPP",
  "id": 1018350799,
  "default_value": null,
  "override_values_count": 0,
  "override_values": []
}

Params

Param Name Description
location_id
Optional

위치 별 범위

Validations:

  • Must be a Integer

organization_id
Optional

조직 별 범위

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_variable
Required

Validations:

  • Must be a Hash

smart_variable[variable]
Optional

변수 이름

Validations:

  • Must be a String

smart_variable[puppetclass_id]
Optional , <span class="translation_missing" title="translation missing: ko.apipie.nil_allowed">Nil Allowed</span>

Puppet 클래스 ID

Validations:

  • Must be a number.

smart_variable[default_value]
Optional , <span class="translation_missing" title="translation missing: ko.apipie.nil_allowed">Nil Allowed</span>

변수의 기본값

Validations:

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

smart_variable[hidden_value]
Optional , <span class="translation_missing" title="translation missing: ko.apipie.nil_allowed">Nil Allowed</span>

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

Validations:

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

smart_variable[override_value_order]
Optional , <span class="translation_missing" title="translation missing: ko.apipie.nil_allowed">Nil Allowed</span>

값이 해결되는 순서

Validations:

  • Must be a String

smart_variable[description]
Optional , <span class="translation_missing" title="translation missing: ko.apipie.nil_allowed">Nil Allowed</span>

변수 설명

Validations:

  • Must be a String

smart_variable[validator_type]
Optional , <span class="translation_missing" title="translation missing: ko.apipie.nil_allowed">Nil Allowed</span>

검증 값의 유형

Validations:

  • Must be one of: regexp, list.

smart_variable[validator_rule]
Optional , <span class="translation_missing" title="translation missing: ko.apipie.nil_allowed">Nil Allowed</span>

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

Validations:

  • Must be a String

smart_variable[variable_type]
Optional , <span class="translation_missing" title="translation missing: ko.apipie.nil_allowed">Nil Allowed</span>

변수 값의 유형

Validations:

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

smart_variable[merge_overrides]
Optional , <span class="translation_missing" title="translation missing: ko.apipie.nil_allowed">Nil Allowed</span>

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

Validations:

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

smart_variable[merge_default]
Optional , <span class="translation_missing" title="translation missing: ko.apipie.nil_allowed">Nil Allowed</span>

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

Validations:

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

smart_variable[avoid_duplicates]
Optional , <span class="translation_missing" title="translation missing: ko.apipie.nil_allowed">Nil Allowed</span>

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

Validations:

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


DELETE /api/smart_variables/:id
스마트 변수 삭제

Examples

DELETE /api/smart_variables/281110143-special_info
{
  "smart_variable": {}
}
200
{
  "description": null,
  "parameter_type": "string",
  "variable_type": "string",
  "hidden_value?": false,
  "validator_type": null,
  "validator_rule": null,
  "override_value_order": "organization,location\nxyz\nhostgroup",
  "merge_overrides": false,
  "merge_default": false,
  "avoid_duplicates": false,
  "puppetclass_id": 298486374,
  "puppetclass_name": "apache",
  "created_at": "2019-09-11 14:58:01 UTC",
  "updated_at": "2019-09-11 14:58:01 UTC",
  "variable": "special_info",
  "id": 281110143,
  "default_value": "secret",
  "override_values_count": 0,
  "override_values": []
}

Params

Param Name Description
location_id
Optional

위치 별 범위

Validations:

  • Must be a Integer

organization_id
Optional

조직 별 범위

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.