Examples

POST /katello/api/organizations/114267492-Empty%20Organization/host_collections
{
  "name": "Collection A",
  "description": "Collection A, World Cup 2014",
  "max_hosts": 1,
  "unlimited_hosts": false,
  "host_ids": [
    980191148,
    298486374
  ],
  "host_collection": {
    "name": "Collection A",
    "description": "Collection A, World Cup 2014",
    "max_hosts": 1,
    "unlimited_hosts": false,
    "host_ids": [
      980191148,
      298486374
    ]
  }
}
422
{
  "message": "Validation failed: Hosts is invalid, Max host may not be less than the number of hosts associated with the host collection., You cannot have more than 1 host(s) associated with host collection Collection A.",
  "errors": {
    "hosts": [
      "is invalid"
    ],
    "max_host": [
      "may not be less than the number of hosts associated with the host collection."
    ],
    "base": [
      "You cannot have more than 1 host(s) associated with host collection Collection A."
    ]
  }
}

Params

Param name Description
organization_id
required

organization identifier

Validations:

  • Must be a number.

name
required

Host Collection name

Validations:

  • String

description
optional

Validations:

  • String

host_ids
optional

List of host ids to replace the hosts in host collection

Validations:

  • Must be an array of any type

max_hosts
optional

Maximum number of hosts in the host collection

Validations:

  • Integer

unlimited_hosts
optional

Whether or not the host collection may have unlimited hosts

Validations:

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