GET /api/puppetclasses 200 { "total": 9, "subtotal": 9, "page": 1, "per_page": 20, "search": null, "sort": { "by": null, "order": null }, "results": { "apache": [ { "id": 298486374, "name": "apache", "created_at": "2019-02-20T13:25:46.063Z", "updated_at": "2019-02-20T13:25:46.063Z" } ], "auth": [ { "id": 638205575, "name": "auth", "created_at": "2019-02-20T13:25:46.063Z", "updated_at": "2019-02-20T13:25:46.063Z" } ], "base": [ { "id": 980190962, "name": "base", "created_at": "2019-02-20T13:25:46.063Z", "updated_at": "2019-02-20T13:25:46.063Z" }, { "id": 980190962, "name": "base", "created_at": "2019-02-20T13:25:46.063Z", "updated_at": "2019-02-20T13:25:46.063Z" } ], "chkmk": [ { "id": 51848956, "name": "chkmk", "created_at": "2019-02-20T13:25:46.063Z", "updated_at": "2019-02-20T13:25:46.063Z" } ], "class274": [ { "id": 1018350802, "name": "class274", "created_at": "2019-02-20T13:25:49.546Z", "updated_at": "2019-02-20T13:25:49.546Z" } ], "nagios": [ { "id": 1018350795, "name": "nagios", "created_at": "2019-02-20T13:25:46.063Z", "updated_at": "2019-02-20T13:25:46.063Z" } ], "pam": [ { "id": 374648174, "name": "pam", "created_at": "2019-02-20T13:25:46.063Z", "updated_at": "2019-02-20T13:25:46.063Z" } ], "vim": [ { "id": 281110143, "name": "vim", "created_at": "2019-02-20T13:25:46.063Z", "updated_at": "2019-02-20T13:25:46.063Z" } ] } }
Param name | Description |
---|---|
location_id optional |
Scope by locations Validations:
|
organization_id optional |
Scope by organizations Validations:
|
host_id optional |
ID of host Validations:
|
hostgroup_id optional |
ID of host group Validations:
|
environment_id optional |
ID of environment Validations:
|
search optional |
filter results Validations:
|
order optional |
Sort field and order, eg. ‘id DESC’ Validations:
|
page optional |
paginate results Validations:
|
per_page optional |
number of entries per request Validations:
|
Field name | Type | Possible values |
---|---|---|
config_group | string | |
environment | string | |
host | string | |
hostgroup | string | |
key | string | |
location | string | |
name | string | |
organization | string |
GET /api/hosts/host1769/puppetclasses/1018350796 200 { "created_at": "2019-02-20 13:35:03 UTC", "updated_at": "2019-02-20 13:35:03 UTC", "id": 1018350796, "name": "class343", "module_name": "class343", "environments": [ { "name": "environment284", "id": 687036938 } ], "hostgroups": [], "smart_variables": [], "smart_class_parameters": [] }
Param name | Description |
---|---|
location_id optional |
Scope by locations Validations:
|
organization_id optional |
Scope by organizations Validations:
|
host_id optional |
ID of host Validations:
|
hostgroup_id optional |
ID of host group Validations:
|
environment_id optional |
ID of environment Validations:
|
id required |
ID of Puppet class Validations:
|
POST /api/puppetclasses { "puppetclass": { "name": "test_puppetclass" } } 201 { "created_at": "2019-02-20 13:35:03 UTC", "updated_at": "2019-02-20 13:35:03 UTC", "id": 1018350797, "name": "test_puppetclass", "module_name": "test_puppetclass", "environments": [], "hostgroups": [], "smart_variables": [], "smart_class_parameters": [] }
Param name | Description |
---|---|
location_id optional |
Scope by locations Validations:
|
organization_id optional |
Scope by organizations Validations:
|
puppetclass required |
Validations:
|
puppetclass[name] required |
Validations:
|
PUT /api/puppetclasses/980190962-base { "puppetclass": { "name": "test_puppetclass" } } 200 { "created_at": "2019-02-20 13:35:01 UTC", "updated_at": "2019-02-20 13:35:02 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 } ] }
Param name | Description |
---|---|
location_id optional |
Scope by locations Validations:
|
organization_id optional |
Scope by organizations Validations:
|
id required |
Validations:
|
puppetclass required |
Validations:
|
puppetclass[name] optional |
Validations:
|
DELETE /api/puppetclasses/980190962-base { "puppetclass": {} } 200 { "id": 980190962, "name": "base", "created_at": "2019-02-20T13:35:01.021Z", "updated_at": "2019-02-20T13:35:01.021Z" }
Param name | Description |
---|---|
location_id optional |
Scope by locations Validations:
|
organization_id optional |
Scope by organizations Validations:
|
id required |
Validations:
|