# 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

Parametry

Nazwa parametru Opis
organization_id
opcjonalny

organization identifier

Validations:

  • number.

library
opcjonalny

set true if you want to see only library environments

Validations:

  • Must be one of: true, false.

name
opcjonalny

filter only environments containing this name

Validations:

  • String

search
opcjonalny

Search string

Validations:

  • String

page
opcjonalny

Page number, starting at 1

Validations:

  • number.

per_page
opcjonalny

Number of results per page to return

Validations:

  • number.

order
opcjonalny

Sort field and order, eg. 'name DESC'

Validations:

  • String

full_result
opcjonalny

Whether or not to show all results

Validations:

  • boolean

sort
opcjonalny

Hash version of 'order' param

Validations:

  • Hash

sort[by]
opcjonalny

Field to sort the results on

Validations:

  • String

sort[order]
opcjonalny

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

Validations:

  • String


GET /katello/api/environments/:id
Pokaż środowisko

GET /katello/api/organizations/:organization_id/environments/:environment_id
Pokaż środowisko

Parametry

Nazwa parametru Opis
id
wymagany

ID of the environment

Validations:

  • number.

organization_id
opcjonalny

ID of the organization

Validations:

  • number.


POST /katello/api/environments
Utwórz środowisko

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

Parametry

Nazwa parametru Opis
organization_id
wymagany

name of organization

Validations:

  • number.

name
wymagany

name of the environment

Validations:

  • String

label
opcjonalny

label of the environment

Validations:

  • String

description
opcjonalny

description of the environment

Validations:

  • String

prior_id
wymagany

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
Edytuj środowisko

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

Parametry

Nazwa parametru Opis
id
wymagany

ID of the environment

Validations:

  • number.

organization_id
opcjonalny

name of the organization

Validations:

  • number.

new_name
opcjonalny

new name to be given to the environment

Validations:

  • String

description
opcjonalny

description of the environment

Validations:

  • String


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

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

Parametry

Nazwa parametru Opis
id
wymagany

ID of the environment

Validations:

  • number.

organization_id
opcjonalny

organization identifier

Validations:

  • number.


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

Parametry

Nazwa parametru Opis
organization_id
opcjonalny

organization identifier

Validations:

  • number.

permission_type
opcjonalny

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

Validations:

  • String