# Description

An environment is a basic organization structure that groups systems, products, repositories, etc. Every system 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
Required

organization identifier

Validations:

  • 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


GET /katello/api/environments/:id
Mostra un entorn

GET /katello/api/organizations/:organization_id/environments/:environment_id
Mostra un entorn

Params

Param Name Description
id
Required

ID of the environment

Validations:

  • number.

organization_id
Optional

ID of the organization

Validations:

  • number.


POST /katello/api/environments
Crea un entorn

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

Params

Param Name Description
organization_id
Required

name of organization

Validations:

  • 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

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
Actualitza un entorn

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:

  • number.

organization_id
Optional

name of the organization

Validations:

  • number.

new_name
Optional

new name to be given to the environment

Validations:

  • String

description
Optional

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

Params

Param Name Description
id
Required

ID of the environment

Validations:

  • number.

organization_id
Optional

organization identifier

Validations:

  • number.


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

Params

Param Name Description
organization_id
Optional

organization identifier

Validations:

  • number.

permission_type
Optional

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

Validations:

  • String


GET /katello/api/organizations/:organization_id/environments/:id/repositories
List repositories available in the environment

Params

Param Name Description
id
Optional

environment identifier

Validations:

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

organization_id
Optional

organization identifier

Validations:

  • String

content_view_id
Optional

content view identifier

Validations:

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