# 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
Elenca gli ambienti in una organizzazione

GET /katello/api/organizations/:organization_id/environments
Elenca gli ambienti in una organizzazione

Parametri

Nome parametro Descrizione
organization_id
opzionale

identificatore organizzazione

Validations:

  • number.

library
opzionale

imposta su vero se desideri visualizzare solo gli ambienti libreria

Validations:

  • Must be one of: true, false.

name
opzionale

filtra solo gli ambienti con questo nome

Validations:

  • String

search
opzionale

Cerca stringa

Validations:

  • String

page
opzionale

Numero pagina, iniziando da 1

Validations:

  • number.

per_page
opzionale

Numero di risultati per pagina da ritornare

Validations:

  • number.

order
opzionale

Campo e ordine per la ricerca, es. 'nome DISC'

Validations:

  • String

full_result
opzionale

Indica se mostrare tutti i risultati

Validations:

  • boolean

sort
opzionale

Versione hash del parametro 'order'

Validations:

  • Hash

sort[by]
opzionale

Campo nel quale ordinare i risultati

Validations:

  • String

sort[order]
opzionale

Come ordinare i risultati (es. ASC per ascendente)

Validations:

  • String


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

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

Parametri

Nome parametro Descrizione
id
richiesto

ID dell'ambiente

Validations:

  • number.

organization_id
opzionale

ID dell'organizzazione

Validations:

  • number.


POST /katello/api/environments
Crea un ambiente

POST /katello/api/organizations/:organization_id/environments
Crea un ambiente in una organizzazione

Parametri

Nome parametro Descrizione
organization_id
richiesto

nome organizzazione

Validations:

  • number.

name
richiesto

nome dell'ambiente

Validations:

  • String

label
opzionale

etichetta dell'ambiente

Validations:

  • String

description
opzionale

descrizione dell'ambiente

Validations:

  • String

prior_id
richiesto

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
Aggiorna un ambiente

PUT /katello/api/organizations/:organization_id/environments/:id
Aggiorna ambiente in una organizzazione

Parametri

Nome parametro Descrizione
id
richiesto

ID dell'ambiente

Validations:

  • number.

organization_id
opzionale

nome dell'organizzazione

Validations:

  • number.

new_name
opzionale

nuovo nome da conferire all'ambiente

Validations:

  • String

description
opzionale

descrizione dell'ambiente

Validations:

  • String


DELETE /katello/api/environments/:id
Elimina un ambiente

DELETE /katello/api/organizations/:organization_id/environments/:id
Elimina ambiente in una organizzazione

Parametri

Nome parametro Descrizione
id
richiesto

ID dell'ambiente

Validations:

  • number.

organization_id
opzionale

identificatore organizzazione

Validations:

  • number.


GET /katello/api/organizations/:organization_id/environments/paths
Elenca i percorsi dell'ambiente

Parametri

Nome parametro Descrizione
organization_id
opzionale

identificatore organizzazione

Validations:

  • number.

permission_type
opzionale

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

Validations:

  • String