GET /api/puppetclasses
200
{
"total": 1,
"subtotal": 1,
"page": 1,
"per_page": 20,
"search": null,
"sort": {
"by": null,
"order": null
},
"results": {
"class82": [
{
"id": 1018350796,
"name": "class82",
"created_at": "2019-09-11T14:53:24.240Z",
"updated_at": "2019-09-11T14:53:24.240Z"
}
]
}
}
| 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 |
Page number, starting at 1 Validations:
|
|
per_page optional |
Number of results per page to return 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/environments/production/puppetclasses/980190962
200
{
"created_at": "2019-09-11 14:57:07 UTC",
"updated_at": "2019-09-11 14:57:07 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
}
]
}
| 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": "2019-09-11 14:57:13 UTC",
"updated_at": "2019-09-11 14:57:13 UTC",
"id": 1018350800,
"name": "test_puppetclass",
"module_name": "test_puppetclass",
"environments": [],
"hostgroups": [],
"smart_variables": [
{
"variable": "smart_variable1",
"id": 1018350797
}
],
"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/1018350797
{
"smart_class_parameter_ids": [],
"puppetclass": {}
}
200
{
"created_at": "2019-09-11 14:57:13 UTC",
"updated_at": "2019-09-11 14:57:13 UTC",
"id": 1018350797,
"name": "class376",
"module_name": "class376",
"environments": [
{
"name": "environment350",
"id": 687036944
}
],
"hostgroups": [],
"smart_variables": [],
"smart_class_parameters": [
{
"parameter": "param335",
"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": "2019-09-11T14:57:07.101Z",
"updated_at": "2019-09-11T14:57:07.101Z"
}
| Param name | Description |
|---|---|
|
location_id optional |
Scope by locations Validations:
|
|
organization_id optional |
Scope by organizations Validations:
|
|
id required |
Validations:
|