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
列出子网的所有参数

示例

GET /api/hosts/host2324/parameters
200
{
  "total": 1,
  "subtotal": 1,
  "page": 1,
  "per_page": 20,
  "search": null,
  "sort": {
    "by": null,
    "order": null
  },
  "results": [
    {
      "priority": 70,
      "created_at": "2019-09-11 14:55:09 UTC",
      "updated_at": "2019-09-11 14:55:09 UTC",
      "id": 767575239,
      "name": "parameter332",
      "parameter_type": null,
      "value": "parameter value 359"
    }
  ]
}

参数

参数名字 描述
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
选填

显示隐藏值

Validations:

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

search
选填

过滤结果

Validations:

  • Must be a String

order
选填

排序项和顺序,例如 ‘id DESC’

Validations:

  • Must be a String

page
选填

页号,从 1 开始

Validations:

  • Must be a number.

per_page
选填

每页中显示的返回结果数

Validations:

  • Must be a number.

搜索字段

字段名 类型 可能的值
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
显示子网的嵌入参数

示例

GET /api/hosts/host470/parameters/767575240-parameter10
200
{
  "priority": 70,
  "created_at": "2019-09-11 14:35:47 UTC",
  "updated_at": "2019-09-11 14:35:47 UTC",
  "id": 767575240,
  "name": "parameter10",
  "parameter_type": null,
  "value": "parameter value 10"
}

参数

参数名字 描述
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
选填

显示隐藏值

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
为子网创建嵌入参数

示例

POST /api/domains/22495316-mydomain-net/parameters
{
  "parameter": {
    "name": "parameter2",
    "value": "X"
  }
}
201
{
  "priority": 30,
  "created_at": "2019-09-11 14:57:35 UTC",
  "updated_at": "2019-09-11 14:57:35 UTC",
  "id": 767575246,
  "name": "parameter2",
  "parameter_type": null,
  "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
更新子网的嵌入参数

示例

PUT /api/domains/22495316-mydomain-net/parameters/665394701-parameter
{
  "parameter": {
    "name": "special_key",
    "value": "123"
  }
}
200
{
  "priority": null,
  "created_at": "2019-09-11 14:58:27 UTC",
  "updated_at": "2019-09-11 14:58:41 UTC",
  "id": 665394701,
  "name": "special_key",
  "parameter_type": null,
  "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 /api/subnets/1018350795-five/parameters/297943576-parameter
{
  "parameter": {}
}
200
{
  "id": 297943576,
  "name": "parameter",
  "value": "subnet1",
  "reference_id": 1018350795,
  "created_at": "2019-09-11T14:58:27.166Z",
  "updated_at": "2019-09-11T14:58:27.166Z",
  "priority": null,
  "hidden_value": "*****",
  "key_type": null
}

参数

参数名字 描述
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 /api/operatingsystems/1073012828/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