Description

An environment is a basic organization structure that groups hosts, products, repositories, etc. Every host belongs to one environment and it’s isolated inside so that it can see only content that is in its environment.

Chains

Environments are ordered into chains and their content (propducts, repositories, tempaltes, packages) can be moved to an environment only from its prior environment. You can have for example chain like:

Library -> Development -> Testing -> Production

Each change in an environment is done through a changeset in an action called promotion.

Library

Library is a special environment that has no ascendant: All the content starts in this environment. More chains can start from the library environment but no further branching of a chain is enabled.


GET /katello/api/environments
List environments in an organization

GET /katello/api/organizations/:organization_id/environments
List environments in an organization

Params

Param name Description
organization_id
optional

organization identifier

Validations:

  • Must be a number.

library
optional

set true if you want to see only library environments

Validations:

  • Must be one of: true, false.

name
optional

filter only environments containing this name

Validations:

  • String

search
optional

Search string

Validations:

  • String

page
optional

Page number, starting at 1

Validations:

  • Must be a number.

per_page
optional

Number of results per page to return

Validations:

  • Must be a number.

order
optional

Sort field and order, eg. ‘name DESC’

Validations:

  • String

full_result
optional

Whether or not to show all results

Validations:

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

sort
optional

Hash version of ‘order’ param

Validations:

  • Hash

sort[by]
optional

Field to sort the results on

Validations:

  • String

sort[order]
optional

How to order the sorted results (e.g. ASC for ascending)

Validations:

  • String


GET /katello/api/environments/:id
Show an environment

GET /katello/api/organizations/:organization_id/environments/:environment_id
Show an environment

Params

Param name Description
id
required

ID of the environment

Validations:

  • Must be a number.

organization_id
optional

ID of the organization

Validations:

  • Must be a number.


POST /katello/api/environments
Create an environment

POST /katello/api/organizations/:organization_id/environments
Create an environment in an organization

Params

Param name Description
organization_id
required

name of organization

Validations:

  • Must be a number.

name
required

name of the environment

Validations:

  • String

label
optional

label of the environment

Validations:

  • String

description
optional

description of the environment

Validations:

  • String

registry_name_pattern
optional

pattern for container image names

Validations:

  • String

prior_id
required

ID of an environment that is prior to the new environment in the chain. It has to be either the ID of Library or the ID of an environment at the end of a chain.

Validations:

  • Integer


PUT /katello/api/environments/:id
Update an environment

PUT /katello/api/organizations/:organization_id/environments/:id
Update an environment in an organization

Params

Param name Description
id
required

ID of the environment

Validations:

  • Must be a number.

organization_id
optional

name of the organization

Validations:

  • Must be a number.

new_name
optional

new name to be given to the environment

Validations:

  • String

description
optional

description of the environment

Validations:

  • String

registry_name_pattern
optional

pattern for container image names

Validations:

  • String

async
optional

Do not wait for the update action to finish. Default: true

Validations:

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


DELETE /katello/api/environments/:id
Destroy an environment

DELETE /katello/api/organizations/:organization_id/environments/:id
Destroy an environment in an organization

Params

Param name Description
id
required

ID of the environment

Validations:

  • Must be a number.

organization_id
optional

organization identifier

Validations:

  • Must be a number.


GET /katello/api/organizations/:organization_id/environments/paths
List environment paths

Params

Param name Description
organization_id
optional

organization identifier

Validations:

  • Must be a number.

permission_type
optional

The associated permission type. One of (readable | promotable) Default: readable

Validations:

  • String