GET /api/hosts/host636/puppetclasses 200 { "total": 1, "subtotal": 1, "page": 1, "per_page": 20, "search": null, "sort": { "by": null, "order": null }, "results": { "class19": [ { "id": 1018350797, "name": "class19", "created_at": "2019-11-07T08:39:20.984Z", "updated_at": "2019-11-07T08:39:20.984Z" } ] } }
参数名字 | 描述 |
---|---|
location_id 选填 |
Set the current location context for the request Validations:
|
organization_id 选填 |
Set the current organization context for the request Validations:
|
host_id 选填 |
主机 ID Validations:
|
hostgroup_id 选填 |
主机组 ID Validations:
|
environment_id 选填 |
环境 ID Validations:
|
search 选填 |
过滤结果 Validations:
|
order 选填 |
排序项和顺序,例如 ‘id DESC’ Validations:
|
page 选填 |
页号,从 1 开始 Validations:
|
per_page 选填 |
每页中显示的返回结果数 Validations:
|
字段名 | 类型 | 可能的值 |
---|---|---|
config_group | string | |
environment | string | |
host | string | |
hostgroup | string | |
key | string | |
location | string | |
name | string | |
organization | string |
GET /api/environments/production/puppetclasses/980190962 200 { "created_at": "2019-11-07 08:39:06 UTC", "updated_at": "2019-11-07 08:39:06 UTC", "id": 980190962, "name": "base", "module_name": "base", "environments": [ { "name": "production", "id": 334344675 } ], "hostgroups": [ { "id": 636252244, "name": "Common", "title": "Common", "description": null } ], "smart_variables": [ { "variable": "bool_test", "id": 638205575 }, { "variable": "ssl_port", "id": 298486374 } ], "smart_class_parameters": [ { "parameter": "cluster", "id": 328495940 } ] }
参数名字 | 描述 |
---|---|
location_id 选填 |
Set the current location context for the request Validations:
|
organization_id 选填 |
Set the current organization context for the request Validations:
|
host_id 选填 |
主机 ID Validations:
|
hostgroup_id 选填 |
主机组 ID Validations:
|
environment_id 选填 |
环境 ID Validations:
|
id 必填 |
Puppet 类别 ID Validations:
|
POST /api/puppetclasses { "puppetclass": { "name": "test_puppetclass", "lookup_keys_attributes": [ { "key": "smart_variable1" } ] } } 201 { "created_at": "2019-11-07 08:39:20 UTC", "updated_at": "2019-11-07 08:39:20 UTC", "id": 1018350796, "name": "test_puppetclass", "module_name": "test_puppetclass", "environments": [], "hostgroups": [], "smart_variables": [ { "variable": "smart_variable1", "id": 1018350796 } ], "smart_class_parameters": [] }
参数名字 | 描述 |
---|---|
location_id 选填 |
Set the current location context for the request Validations:
|
organization_id 选填 |
Set the current organization context for the request Validations:
|
puppetclass 必填 |
Validations:
|
puppetclass[name] 必填 |
Validations:
|
PUT /api/puppetclasses/980190962-base { "puppetclass": { "name": "test_puppetclass" } } 200 { "created_at": "2019-11-07 08:39:06 UTC", "updated_at": "2019-11-07 08:39:21 UTC", "id": 980190962, "name": "test_puppetclass", "module_name": "test_puppetclass", "environments": [ { "name": "production", "id": 334344675 } ], "hostgroups": [ { "id": 636252244, "name": "Common", "title": "Common", "description": null } ], "smart_variables": [ { "variable": "bool_test", "id": 638205575 }, { "variable": "ssl_port", "id": 298486374 } ], "smart_class_parameters": [ { "parameter": "cluster", "id": 328495940 } ] }
参数名字 | 描述 |
---|---|
location_id 选填 |
Set the current location context for the request Validations:
|
organization_id 选填 |
Set the current organization context for the request Validations:
|
id 必填 |
Validations:
|
puppetclass 必填 |
Validations:
|
puppetclass[name] 选填 |
Validations:
|
DELETE /api/puppetclasses/980190962-base { "puppetclass": {} } 200 { "id": 980190962, "name": "base", "created_at": "2019-11-07T08:39:06.354Z", "updated_at": "2019-11-07T08:39:06.354Z" }
参数名字 | 描述 |
---|---|
location_id 选填 |
Set the current location context for the request Validations:
|
organization_id 选填 |
Set the current organization context for the request Validations:
|
id 必填 |
Validations:
|