POST /api/smart_proxies/:id/import_puppetclasses
Import puppet classes from puppet proxy

POST /api/smart_proxies/:smart_proxy_id/environments/:id/import_puppetclasses
Import puppet classes from puppet proxy for an environment

POST /api/environments/:environment_id/smart_proxies/:id/import_puppetclasses
Import puppet classes from puppet proxy for an environment

Params

Param name Description
location_id
optional

Set the current location context for the request

Validations:

  • Integer

organization_id
optional

Set the current organization context for the request

Validations:

  • Integer

id
required

Validations:

  • string from 2 to 128 characters containing only alphanumeric characters, space, '_', '-' with no leading or trailing space..

smart_proxy_id
optional

Validations:

  • String

environment_id
optional

Validations:

  • String

dryrun
optional

Validations:

  • Must be one of: true, false, 1, 0.

except
optional

Optional comma-delimited string containing either 'new', 'updated', or 'obsolete' that is used to limit the imported Puppet classes

Validations:

  • String


GET /api/environments
List all environments

GET /api/puppetclasses/:puppetclass_id/environments
List environments of Puppet class

GET /api/locations/:location_id/environments
List environments per location

GET /api/organizations/:organization_id/environments
List environments per organization

Params

Param name Description
puppetclass_id
optional

ID of Puppet class

Validations:

  • String

location_id
optional

Scope by locations

Validations:

  • Integer

organization_id
optional

Scope by organizations

Validations:

  • Integer

search
optional

filter results

Validations:

  • String

order
optional

Sort field and order, eg. ‘id DESC’

Validations:

  • String

page
optional

Page number, starting at 1

Validations:

  • Must be a number.

per_page
optional

Number of results per page to return, 'all' to return all results

Validations:

  • Must match regular expression /\A([1-9]\d*|all)\Z$/.

Search fields

Field name Type Possible values
content_view string
lifecycle_environment string
location string
location_id integer
name string
organization string
organization_id integer

GET /api/environments/:id
Show an environment

Params

Param name Description
location_id
optional

Set the current location context for the request

Validations:

  • Integer

organization_id
optional

Set the current organization context for the request

Validations:

  • Integer

id
required

Validations:

  • string from 2 to 128 characters containing only alphanumeric characters, space, '_', '-' with no leading or trailing space..


POST /api/environments
Create an environment

Params

Param name Description
location_id
optional

Set the current location context for the request

Validations:

  • Integer

organization_id
optional

Set the current organization context for the request

Validations:

  • Integer

environment
required

Validations:

  • Hash

environment[name]
required

Validations:

  • String

environment[location_ids]
optional , nil allowed

REPLACE locations with given ids

Validations:

  • Must be an array of any type

environment[organization_ids]
optional , nil allowed

REPLACE organizations with given ids.

Validations:

  • Must be an array of any type


PUT /api/environments/:id
Update an environment

Params

Param name Description
location_id
optional

Set the current location context for the request

Validations:

  • Integer

organization_id
optional

Set the current organization context for the request

Validations:

  • Integer

id
required

Validations:

  • string from 2 to 128 characters containing only alphanumeric characters, space, '_', '-' with no leading or trailing space..

environment
required

Validations:

  • Hash

environment[name]
optional

Validations:

  • String

environment[location_ids]
optional , nil allowed

REPLACE locations with given ids

Validations:

  • Must be an array of any type

environment[organization_ids]
optional , nil allowed

REPLACE organizations with given ids.

Validations:

  • Must be an array of any type


DELETE /api/environments/:id
Delete an environment

Params

Param name Description
location_id
optional

Set the current location context for the request

Validations:

  • Integer

organization_id
optional

Set the current organization context for the request

Validations:

  • Integer

id
required

Validations:

  • string from 2 to 128 characters containing only alphanumeric characters, space, '_', '-' with no leading or trailing space..