GET /api/hosts/:host_id/puppetclass_ids
列出主机的所有 Puppet 类别

示例

GET /api/hosts/host2666/puppetclass_ids
200
{
  "results": [
    1018350797
  ]
}

参数

参数名字 描述
location_id
选填

根据位置界定的范围

Validations:

  • Must be a Integer

organization_id
选填

根据机构界定的范围

Validations:

  • Must be a Integer


POST /api/hosts/:host_id/puppetclass_ids
在主机中添加 Puppet 类别

示例

POST /api/hosts/host2667/puppetclass_ids
{
  "puppetclass_id": "invalid_id",
  "host_class": {
    "puppetclass_id": "invalid_id"
  }
}
404
{
  "error": {
    "message": "Resource host_class not found by id ''"
  }
}

参数

参数名字 描述
location_id
选填

根据位置界定的范围

Validations:

  • Must be a Integer

organization_id
选填

根据机构界定的范围

Validations:

  • Must be a Integer

host_id
必填

主机 ID

Validations:

  • Must be a String

puppetclass_id
必填

Puppet 类别 ID

Validations:

  • Must be a String


DELETE /api/hosts/:host_id/puppetclass_ids/:id
删除主机的 Puppet 类别

示例

DELETE /api/hosts/host2669/puppetclass_ids/1018350800
{
  "host_class": {}
}
200
[

]

参数

参数名字 描述
location_id
选填

根据位置界定的范围

Validations:

  • Must be a Integer

organization_id
选填

根据机构界定的范围

Validations:

  • Must be a Integer

host_id
必填

主机 ID

Validations:

  • Must be a String

id
必填

Puppet 类别 ID

Validations:

  • Must be a String