# 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
Listar ambientes em uma organização

GET /katello/api/organizations/:organization_id/environments
Listar ambientes em uma organização

Parâmentros

Nome parâmetro Descrição
organization_id
opcional

identificador da organização

Validations:

  • number.

library
opcional

definir verdadediro se você desejar ver somente os ambientes de biblioteca

Validations:

  • Must be one of: true, false.

name
opcional

filstrar somente ambientes contendo este nome

Validations:

  • String

search
opcional

Buscar faixa

Validations:

  • String

page
opcional

Número de página, iniciando em 1

Validations:

  • number.

per_page
opcional

Número de resultados por página para retornar

Validations:

  • number.

order
opcional

Classificar campo e ordem, ex. 'name DESC'

Validations:

  • String

full_result
opcional

Se deve ou não exibir todos os resultados

Validations:

  • boolean

sort
opcional

Versão Hash de param de “ordem”

Validations:

  • Hash

sort[by]
opcional

Campo para classificar os resultados

Validations:

  • String

sort[order]
opcional

Como encomendar os resultados classificados (por exemplo ASC para ascendente)

Validations:

  • String


GET /katello/api/environments/:id
Mostrar um ambiente

GET /katello/api/organizations/:organization_id/environments/:environment_id
Mostrar um ambiente

Parâmentros

Nome parâmetro Descrição
id
requerido

ID de ambiente

Validations:

  • number.

organization_id
opcional

ID da organização

Validations:

  • number.


POST /katello/api/environments
Criar um ambiente

POST /katello/api/organizations/:organization_id/environments
Criar um ambiente em uma organização

Parâmentros

Nome parâmetro Descrição
organization_id
requerido

nome da organização

Validations:

  • number.

name
requerido

nome do ambiente

Validations:

  • String

label
opcional

rotular o ambiente

Validations:

  • String

description
opcional

descrição do ambiente

Validations:

  • String

prior_id
requerido

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
Atualizar um ambiente

PUT /katello/api/organizations/:organization_id/environments/:id
Atualizar um ambiente em uma organização

Parâmentros

Nome parâmetro Descrição
id
requerido

ID de ambiente

Validations:

  • number.

organization_id
opcional

nome da organização

Validations:

  • number.

new_name
opcional

novo nome a ser fornecido ao ambiente

Validations:

  • String

description
opcional

descrição do ambiente

Validations:

  • String


DELETE /katello/api/environments/:id
Destruir um ambiente

DELETE /katello/api/organizations/:organization_id/environments/:id
Destruir um ambiente em uma organização

Parâmentros

Nome parâmetro Descrição
id
requerido

ID de ambiente

Validations:

  • number.

organization_id
opcional

identificador da organização

Validations:

  • number.


GET /katello/api/organizations/:organization_id/environments/paths
Listar caminhos de ambiente

Parâmentros

Nome parâmetro Descrição
organization_id
opcional

identificador da organização

Validations:

  • number.

permission_type
opcional

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

Validations:

  • String