GET /api/hosts/:host_id/puppetclass_ids
列出主機的所有 Puppet 類別 ID

示例

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