# 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 (products, 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
列出机构中的发行商

GET /katello/api/organizations/:organization_id/environments
列出机构中的发行商

参数

参数名字 描述
organization_id
选填

机构识别符

Validations:

  • Must be a number.

library
选填

如果只看到库环境则设定为 true

Validations:

  • Must be one of: true, false.

name
选填

只过滤包含这个名称的环境

Validations:

  • String

search
选填

搜索字符串

Validations:

  • String

page
选填

页号,从 1 开始

Validations:

  • Must be a number.

per_page
选填

每页中显示的返回结果数

Validations:

  • Must be a number.

order
选填

Sort field and order, eg. 'id DESC'

Validations:

  • String

full_result
选填

无论如何显示所有结果

Validations:

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

sort
选填

'order' 参数的哈希版本

Validations:

  • Hash

sort[by]
选填

结果排序字段

Validations:

  • String

sort[order]
选填

如何对分类结果进行排序(例如:ASC 代表升序)

Validations:

  • String


GET /katello/api/environments/:id
显示环境

GET /katello/api/organizations/:organization_id/environments/:environment_id
显示环境

参数

参数名字 描述
id
必填

环境 ID

Validations:

  • Must be a number.

organization_id
选填

机构 ID

Validations:

  • Must be a number.


POST /katello/api/environments
创建环境

POST /katello/api/organizations/:organization_id/environments
在机构中创建环境

参数

参数名字 描述
organization_id
必填

机构名称

Validations:

  • Must be a number.

name
必填

环境名称

Validations:

  • String

label
选填

环境标签

Validations:

  • String

description
选填

环境描述

Validations:

  • String

registry_name_pattern
选填

pattern for container image names

Validations:

  • String

registry_unauthenticated_pull
选填

allow unauthenticed pull of container images

Validations:

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

prior_id
必填

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
更新环境

PUT /katello/api/organizations/:organization_id/environments/:id
更新机构中的环境

参数

参数名字 描述
id
必填

环境 ID

Validations:

  • Must be a number.

organization_id
选填

机构名称

Validations:

  • Must be a number.

new_name
选填

要分配给这个环境的新名称

Validations:

  • String

description
选填

环境描述

Validations:

  • String

registry_name_pattern
选填

pattern for container image names

Validations:

  • String

registry_unauthenticated_pull
选填

allow unauthenticed pull of container images

Validations:

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

async
选填

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
消除环境

DELETE /katello/api/organizations/:organization_id/environments/:id
消除机构中的环境

参数

参数名字 描述
id
必填

环境 ID

Validations:

  • Must be a number.

organization_id
选填

机构识别符

Validations:

  • Must be a number.


GET /katello/api/organizations/:organization_id/environments/paths
列出环境路径

参数

参数名字 描述
organization_id
选填

机构识别符

Validations:

  • Must be a number.

permission_type
选填

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

Validations:

  • String