These API calls are related to nested parameters for a host, domain, subnet, host group, operating system. If you are looking for global parameters, go to this link.


GET /api/hosts/:host_id/parameters
列出主機的所有參數

GET /api/hostgroups/:hostgroup_id/parameters
列出主機群組的所有參數

GET /api/domains/:domain_id/parameters
列出區域的所有參數

GET /api/operatingsystems/:operatingsystem_id/parameters
列出作業系統的所有參數

GET /api/locations/:location_id/parameters
列出位置上的所有參數

GET /api/organizations/:organization_id/parameters
列出組織的所有參數

GET /api/subnets/:subnet_id/parameters
List all parameters for a subnet

示例

GET /api/domains/22495316-mydomain-net/parameters
200
{
  "total": 2,
  "subtotal": 1,
  "page": 1,
  "per_page": 20,
  "search": "name = parameter2",
  "sort": {
    "by": null,
    "order": null
  },
  "results": [
    {
      "priority": 30,
      "created_at": "2019-11-07 08:37:11 UTC",
      "updated_at": "2019-11-07 08:37:11 UTC",
      "id": 767575490,
      "name": "parameter2",
      "parameter_type": "string",
      "value": "X"
    }
  ]
}

參數

參數名字 描述
host_id
選填

主機的 ID

Validations:

  • Must be a String

hostgroup_id
選填

主機群組的 ID

Validations:

  • Must be a String

domain_id
選填

區域的 ID

Validations:

  • Must be a String

operatingsystem_id
選填

作業系統 ID

Validations:

  • Must be a String

location_id
選填

位置 ID

Validations:

  • Must be a String

organization_id
選填

組織 ID

Validations:

  • Must be a String

subnet_id
選填

子網路 ID

Validations:

  • Must be a String

show_hidden
選填

Display hidden values

Validations:

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

search
選填

篩選結果

Validations:

  • Must be a String

order
選填

Sort field and order, eg. ‘id DESC’

Validations:

  • Must be a String

page
選填

頁數,從 1 開始

Validations:

  • Must be a number.

per_page
選填

每頁要傳回的結果數量

Validations:

  • Must be a number.

Search fields

Field name 類型 Possible values
domain_name string
host_group_name string
host_name string
key_type string
location_name string
name string
organization_name string
os_name string
parameter_type string
subnet_name text
type string
value text

GET /api/hosts/:host_id/parameters/:id
顯示主機的巢狀參數

GET /api/hostgroups/:hostgroup_id/parameters/:id
顯示主機群組的巢狀參數

GET /api/domains/:domain_id/parameters/:id
顯示區域的巢狀參數

GET /api/operatingsystems/:operatingsystem_id/parameters/:id
顯示作業系統的巢狀參數

GET /api/locations/:location_id/parameters/:id
顯示位置的巢狀參數

GET /api/organizations/:organization_id/parameters/:id
顯示組織的巢狀參數

GET /api/subnets/:subnet_id/parameters/:id
Show a nested parameter for a subnet

示例

GET /api/hosts/host343/parameters/767575241-parameter7
200
{
  "priority": 70,
  "created_at": "2019-11-07 08:37:01 UTC",
  "updated_at": "2019-11-07 08:37:01 UTC",
  "id": 767575241,
  "name": "parameter7",
  "parameter_type": "string",
  "value": "parameter value 21"
}

參數

參數名字 描述
host_id
選填

主機的 ID

Validations:

  • Must be a String

hostgroup_id
選填

主機群組的 ID

Validations:

  • Must be a String

domain_id
選填

區域的 ID

Validations:

  • Must be a String

operatingsystem_id
選填

作業系統 ID

Validations:

  • Must be a String

location_id
選填

位置 ID

Validations:

  • Must be a String

organization_id
選填

組織 ID

Validations:

  • Must be a String

subnet_id
選填

子網路 ID

Validations:

  • Must be a String

id
必填

參數 ID

Validations:

  • Must be a String

show_hidden
選填

Display hidden values

Validations:

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


POST /api/hosts/:host_id/parameters
為主機建立巢式參數

POST /api/hostgroups/:hostgroup_id/parameters
為主機群組建立巢式參數

POST /api/domains/:domain_id/parameters
為網域建立巢式參數

POST /api/operatingsystems/:operatingsystem_id/parameters
為作業系統建立巢式參數。

POST /api/locations/:location_id/parameters
為地點建立巢式參數

POST /api/organizations/:organization_id/parameters
為組織建立巢式參數。

POST /api/subnets/:subnet_id/parameters
Create a nested parameter for a subnet

示例

POST /api/domains/22495316-mydomain-net/parameters
{
  "parameter": {
    "name": "parameter2",
    "value": "X"
  }
}
201
{
  "priority": 30,
  "created_at": "2019-11-07 08:37:11 UTC",
  "updated_at": "2019-11-07 08:37:11 UTC",
  "id": 767575490,
  "name": "parameter2",
  "parameter_type": "string",
  "value": "X"
}

參數

參數名字 描述
host_id
選填

主機的 ID

Validations:

  • Must be a String

hostgroup_id
選填

主機群組的 ID

Validations:

  • Must be a String

domain_id
選填

區域的 ID

Validations:

  • Must be a String

operatingsystem_id
選填

作業系統 ID

Validations:

  • Must be a String

location_id
選填

位置 ID

Validations:

  • Must be a String

organization_id
選填

組織 ID

Validations:

  • Must be a String

subnet_id
選填

子網路 ID

Validations:

  • Must be a String

parameter
必填

Validations:

  • Must be a Hash

parameter[name]
必填

Validations:

  • Must be a String

parameter[value]
必填

Validations:

  • Must be a String

parameter[parameter_type]
必填

Type of value

Validations:

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


PUT /api/hosts/:host_id/parameters/:id
更新主機的巢狀參數

PUT /api/hostgroups/:hostgroup_id/parameters/:id
更新主機群組的巢狀參數

PUT /api/domains/:domain_id/parameters/:id
更新區域的巢狀參數

PUT /api/operatingsystems/:operatingsystem_id/parameters/:id
更新作業系統的巢狀參數

PUT /api/locations/:location_id/parameters/:id
更新位置的巢狀參數

PUT /api/organizations/:organization_id/parameters/:id
更新組織的巢狀參數

PUT /api/subnets/:subnet_id/parameters/:id
Update a nested parameter for a subnet

示例

PUT /api/subnets/1018350795-five/parameters/297943576-parameter
{
  "parameter": {
    "name": "special_key",
    "value": "123"
  }
}
200
{
  "priority": null,
  "created_at": "2019-11-07 09:09:56 UTC",
  "updated_at": "2019-11-07 09:09:59 UTC",
  "id": 297943576,
  "name": "special_key",
  "parameter_type": "string",
  "value": "123"
}

參數

參數名字 描述
host_id
選填

主機的 ID

Validations:

  • Must be a String

hostgroup_id
選填

主機群組的 ID

Validations:

  • Must be a String

domain_id
選填

區域的 ID

Validations:

  • Must be a String

operatingsystem_id
選填

作業系統 ID

Validations:

  • Must be a String

location_id
選填

位置 ID

Validations:

  • Must be a String

organization_id
選填

組織 ID

Validations:

  • Must be a String

id
必填

參數 ID

Validations:

  • Must be a String

subnet_id
選填

子網路 ID

Validations:

  • Must be a String

parameter
必填

Validations:

  • Must be a Hash

parameter[name]
選填

Validations:

  • Must be a String

parameter[value]
選填

Validations:

  • Must be a String

parameter[parameter_type]
選填

Type of value

Validations:

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


DELETE /api/hosts/:host_id/parameters/:id
刪除主機的巢狀參數

DELETE /api/hostgroups/:hostgroup_id/parameters/:id
刪除主機群組的巢狀參數

DELETE /api/domains/:domain_id/parameters/:id
刪除區域的巢狀參數

DELETE /api/operatingsystems/:operatingsystem_id/parameters/:id
刪除作業系統的巢狀參數

DELETE /api/locations/:location_id/parameters/:id
刪除位置的巢狀參數

DELETE /api/organizations/:organization_id/parameters/:id
刪除組織的巢狀參數

DELETE /api/subnets/:subnet_id/parameters/:id
Delete a nested parameter for a subnet

示例

DELETE /api/hostgroups/636252244-Common/parameters/767575238-group1
{
  "parameter": {}
}
200
{
  "id": 767575238,
  "name": "group1",
  "value": "group1",
  "reference_id": 636252244,
  "created_at": "2019-11-07T09:09:56.749Z",
  "updated_at": "2019-11-07T09:09:56.749Z",
  "priority": null,
  "hidden_value": "*****",
  "key_type": "string",
  "searchable_value": "group1"
}

參數

參數名字 描述
host_id
選填

主機的 ID

Validations:

  • Must be a String

hostgroup_id
選填

主機群組的 ID

Validations:

  • Must be a String

domain_id
選填

區域的 ID

Validations:

  • Must be a String

operatingsystem_id
選填

作業系統 ID

Validations:

  • Must be a String

location_id
選填

位置 ID

Validations:

  • Must be a String

organization_id
選填

組織 ID

Validations:

  • Must be a String

id
必填

參數 ID

Validations:

  • Must be a String

subnet_id
選填

子網路 ID

Validations:

  • Must be a String


DELETE /api/hosts/:host_id/parameters
刪除一個主機上的所有巢狀參數

DELETE /api/hostgroups/:hostgroup_id/parameters
刪除一個主機群組中的所有巢狀參數

DELETE /api/domains/:domain_id/parameters
刪除一個區域中的所有巢狀參數

DELETE /api/operatingsystems/:operatingsystem_id/parameters
刪除作業系統上的所有巢狀參數

DELETE /api/locations/:location_id/parameters
刪除一個位置上的所有巢狀參數

DELETE /api/organizations/:organization_id/parameters
刪除一個組織中的所有巢狀參數

DELETE /api/subnets/:subnet_id/parameters
Delete all nested parameters for a subnet

示例

DELETE /api/hosts/host2698/parameters
{
  "parameter": {}
}
200
[

]

參數

參數名字 描述
host_id
選填

主機的 ID

Validations:

  • Must be a String

hostgroup_id
選填

主機群組的 ID

Validations:

  • Must be a String

domain_id
選填

區域的 ID

Validations:

  • Must be a String

operatingsystem_id
選填

作業系統 ID

Validations:

  • Must be a String

location_id
選填

位置 ID

Validations:

  • Must be a String

organization_id
選填

組織 ID

Validations:

  • Must be a String

subnet_id
選填

子網路 ID

Validations:

  • Must be a String