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]
選填 , 允許空值

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]
選填 , 允許空值

Deprecated, please use omit

Validations:

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

override_value[omit]
選填 , 允許空值

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]
選填 , 允許空值

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]
選填 , 允許空值

Deprecated, please use omit

Validations:

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

override_value[omit]
選填 , 允許空值

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.