Examples

POST /katello/api/organizations/114267492/environments
{
  "environment": {
    "name": "dev env",
    "label": "dev_env",
    "description": "This environment is for development.",
    "prior": 562075838,
    "registry_name_pattern": "<%= repository.label %>"
  }
}
201
{
  "library": false,
  "registry_name_pattern": "<%= repository.label %>",
  "registry_unauthenticated_pull": false,
  "id": 1028819242,
  "name": "dev env",
  "label": "dev_env",
  "description": "This environment is for development.",
  "organization_id": 114267492,
  "organization": {
    "name": "Empty Organization",
    "label": "Empty_Organization",
    "id": 114267492
  },
  "created_at": "2024-02-22 18:27:31 UTC",
  "updated_at": "2024-02-22 18:27:31 UTC",
  "prior": {
    "name": "Library",
    "id": 562075838
  },
  "successor": null,
  "counts": {
    "content_hosts": 0,
    "content_views": 0
  },
  "permissions": {
    "create_lifecycle_environments": true,
    "view_lifecycle_environments": true,
    "edit_lifecycle_environments": true,
    "destroy_lifecycle_environments": true,
    "promote_or_remove_content_views_to_environments": true
  },
  "content_views": []
}

Params

Param name Description
organization_id
required

name of organization

Validations:

  • Must be a 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

registry_name_pattern
optional

pattern for container image names

Validations:

  • String

registry_unauthenticated_pull
optional

allow unauthenticed pull of container images

Validations:

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

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