GET /api/puppetclasses 200 { "total": 8, "subtotal": 8, "page": 1, "per_page": 20, "search": null, "sort": { "by": null, "order": null }, "results": [ { "created_at": "2018-11-15 19:01:27 UTC", "updated_at": "2018-11-15 19:01:27 UTC", "id": 298486374, "name": "apache", "module_name": "apache" }, { "created_at": "2018-11-15 19:01:27 UTC", "updated_at": "2018-11-15 19:01:27 UTC", "id": 638205575, "name": "auth", "module_name": "auth" }, { "created_at": "2018-11-15 19:01:27 UTC", "updated_at": "2018-11-15 19:01:27 UTC", "id": 980190962, "name": "base", "module_name": "base" }, { "created_at": "2018-11-15 19:01:27 UTC", "updated_at": "2018-11-15 19:01:27 UTC", "id": 51848956, "name": "chkmk", "module_name": "chkmk" }, { "created_at": "2018-11-15 19:01:27 UTC", "updated_at": "2018-11-15 19:01:27 UTC", "id": 113629430, "name": "git", "module_name": "git" }, { "created_at": "2018-11-15 19:01:27 UTC", "updated_at": "2018-11-15 19:01:27 UTC", "id": 1018350795, "name": "nagios", "module_name": "nagios" }, { "created_at": "2018-11-15 19:01:27 UTC", "updated_at": "2018-11-15 19:01:27 UTC", "id": 374648174, "name": "pam", "module_name": "pam" }, { "created_at": "2018-11-15 19:01:27 UTC", "updated_at": "2018-11-15 19:01:27 UTC", "id": 281110143, "name": "vim", "module_name": "vim" } ] }
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 | |
name | string |
GET /api/hosts/host318/puppetclasses/1018350796 200 { "created_at": "2018-11-15 19:02:55 UTC", "updated_at": "2018-11-15 19:02:55 UTC", "id": 1018350796, "name": "class9", "module_name": "class9", "environments": [ { "name": "environment11", "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", "lookup_keys_attributes": [ { "key": "smart_variable1" } ] } } 201 { "created_at": "2018-11-15 19:02:55 UTC", "updated_at": "2018-11-15 19:02:55 UTC", "id": 1018350796, "name": "test_puppetclass", "module_name": "test_puppetclass", "environments": [], "hostgroups": [], "smart_variables": [ { "variable": "smart_variable1", "id": 1018350796 } ], "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/1018350796 { "smart_class_parameter_ids": [], "puppetclass": {} } 200 { "created_at": "2018-11-15 19:02:55 UTC", "updated_at": "2018-11-15 19:02:55 UTC", "id": 1018350796, "name": "class12", "module_name": "class12", "environments": [ { "name": "environment14", "id": 687036938 } ], "hostgroups": [], "smart_variables": [], "smart_class_parameters": [ { "parameter": "param50", "id": 1018350796 } ] }
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": "2018-11-15T19:01:27.674Z", "updated_at": "2018-11-15T19:01:27.674Z" }
Param name | Description |
---|---|
location_id optional |
Scope by locations Validations:
|
organization_id optional |
Scope by organizations Validations:
|
id required |
Validations:
|