Param name | Description |
---|---|
location_id optional |
Set the current location context for the request Validations:
|
organization_id optional |
Set the current organization context for the request Validations:
|
id required |
Validations:
|
smart_proxy_id optional |
Validations:
|
environment_id optional |
Validations:
|
dryrun optional |
Validations:
|
except optional |
Optional comma-delimited string containing either ‘new’, ‘updated’, or ‘obsolete’ that is used to limit the imported Puppet classes Validations:
|
GET /api/environments 200 { "total": 3, "subtotal": 3, "page": 1, "per_page": 20, "search": null, "sort": { "by": null, "order": null }, "results": [ { "created_at": "2020-05-20 13:41:04 UTC", "updated_at": "2020-05-20 13:41:04 UTC", "name": "global_puppetmaster", "id": 153855663 }, { "created_at": "2020-05-20 13:41:04 UTC", "updated_at": "2020-05-20 13:41:04 UTC", "name": "production", "id": 334344675 }, { "created_at": "2020-05-20 13:41:04 UTC", "updated_at": "2020-05-20 13:41:04 UTC", "name": "testing", "id": 687036937 } ] }
Param name | Description |
---|---|
puppetclass_id optional |
ID of Puppet class Validations:
|
location_id optional |
Scope by locations Validations:
|
organization_id optional |
Scope by organizations 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 |
---|---|---|
location | string | |
location_id | integer | |
name | string | |
organization | string | |
organization_id | integer |
GET /api/environments/production 200 { "created_at": "2020-05-20 13:41:04 UTC", "updated_at": "2020-05-20 13:41:04 UTC", "name": "production", "id": 334344675, "template_combinations": [ { "id": 980190962, "provisioning_template_id": 943779058, "provisioning_template_name": "MyString", "hostgroup_id": 636252244, "hostgroup_name": "Common", "environment_id": 334344675, "environment_name": "production" }, { "id": 113629430, "provisioning_template_id": 104314179, "provisioning_template_name": "MyFinish", "hostgroup_id": null, "hostgroup_name": null, "environment_id": 334344675, "environment_name": "production" }, { "id": 281110143, "provisioning_template_id": 269958254, "provisioning_template_name": "MyString2", "hostgroup_id": 636252244, "hostgroup_name": "Common", "environment_id": 334344675, "environment_name": "production" }, { "id": 1018350795, "provisioning_template_id": 981457253, "provisioning_template_name": "MyScript", "hostgroup_id": 636252244, "hostgroup_name": "Common", "environment_id": 334344675, "environment_name": "production" } ], "puppetclasses": [ { "id": 298486374, "name": "apache", "module_name": "apache" }, { "id": 638205575, "name": "auth", "module_name": "auth" }, { "id": 980190962, "name": "base", "module_name": "base" }, { "id": 51848956, "name": "chkmk", "module_name": "chkmk" }, { "id": 1018350795, "name": "nagios", "module_name": "nagios" }, { "id": 374648174, "name": "pam", "module_name": "pam" }, { "id": 281110143, "name": "vim", "module_name": "vim" } ], "locations": [ { "id": 255093256, "name": "Location 1", "title": "Location 1", "description": null } ], "organizations": [ { "id": 447626438, "name": "Organization 1", "title": "Organization 1", "description": null } ] }
Param name | Description |
---|---|
location_id optional |
Set the current location context for the request Validations:
|
organization_id optional |
Set the current organization context for the request Validations:
|
id required |
Validations:
|
POST /api/environments { "environment": { "name": "some_environment", "location_ids": [ 255093256 ] } } 201 { "created_at": "2020-05-20 13:41:14 UTC", "updated_at": "2020-05-20 13:41:14 UTC", "name": "some_environment", "id": 687036943, "template_combinations": [], "puppetclasses": [], "locations": [ { "id": 255093256, "name": "Location 1", "title": "Location 1", "description": null } ], "organizations": [] }
Param name | Description |
---|---|
location_id optional |
Set the current location context for the request Validations:
|
organization_id optional |
Set the current organization context for the request Validations:
|
environment required |
Validations:
|
environment[name] required |
Validations:
|
environment[location_ids] optional , nil allowed |
REPLACE locations with given ids Validations:
|
environment[organization_ids] optional , nil allowed |
REPLACE organizations with given ids. Validations:
|
PUT /api/environments/687036942 { "environment": { "organization_ids": [ 114267492 ] } } 200 { "created_at": "2020-05-20 13:41:13 UTC", "updated_at": "2020-05-20 13:41:13 UTC", "name": "environment310", "id": 687036942, "template_combinations": [], "puppetclasses": [], "locations": [ { "id": 255093256, "name": "Location 1", "title": "Location 1", "description": null } ], "organizations": [ { "id": 114267492, "name": "Empty Organization", "title": "Empty Organization", "description": null } ] }
Param name | Description |
---|---|
location_id optional |
Set the current location context for the request Validations:
|
organization_id optional |
Set the current organization context for the request Validations:
|
id required |
Validations:
|
environment required |
Validations:
|
environment[name] optional |
Validations:
|
environment[location_ids] optional , nil allowed |
REPLACE locations with given ids Validations:
|
environment[organization_ids] optional , nil allowed |
REPLACE organizations with given ids. Validations:
|
DELETE /api/environments/testing { "environment": {} } 200 { "id": 687036937, "name": "testing", "created_at": "2020-05-20T13:41:04.645Z", "updated_at": "2020-05-20T13:41:04.645Z" }
Param name | Description |
---|---|
location_id optional |
Set the current location context for the request Validations:
|
organization_id optional |
Set the current organization context for the request Validations:
|
id required |
Validations:
|