Examples

PUT /api/media/980190962
{
  "os_family": "Archlinux",
  "medium": {
    "os_family": "Archlinux"
  }
}
200
{
  "path": "http://mirror.centos.org/centos/6.0/os/$arch",
  "os_family": "Archlinux",
  "created_at": "2022-03-29 08:51:12 UTC",
  "updated_at": "2022-03-29 08:52:14 UTC",
  "id": 980190962,
  "name": "CentOS 5.4",
  "operatingsystems": [
    {
      "id": 309172073,
      "name": "centos",
      "title": "centos 5.3"
    },
    {
      "id": 1073012828,
      "name": "Redhat",
      "title": "RHEL 6.1"
    }
  ],
  "locations": [
    {
      "id": 255093256,
      "name": "Location 1",
      "title": "Location 1",
      "description": null
    }
  ],
  "organizations": [
    {
      "id": 447626438,
      "name": "Organization 1",
      "title": "Organization 1",
      "description": null
    }
  ]
}

Params

Param name Description
location_id
optional

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
optional

Set the current organization context for the request

Validations:

  • Must be a Integer

id
required

Validations:

  • Must be a String

medium
required

Validations:

  • Must be a Hash

medium[name]
optional

Name of media

Validations:

  • Must be a String

medium[path]
optional

The path to the medium, can be a URL or a valid NFS server (exclusive of the architecture).

for example mirror.centos.org/centos/$version/os/$arch where $arch will be substituted for the host's actual OS architecture and $version, $major and $minor will be substituted for the version of the operating system.

Solaris and Debian media may also use $release.

Validations:

  • Must be a String

medium[os_family]
optional , nil allowed

Operating system family, available values: AIX, Altlinux, Archlinux, Coreos, Debian, Fcos, Freebsd, Gentoo, Junos, NXOS, Rancheros, Redhat, Rhcos, Solaris, Suse, VRP, Windows, Xenserver

Validations:

  • Must be a String

medium[operatingsystem_ids]
optional , nil allowed

Validations:

  • Must be an array of any type

medium[location_ids]
optional , nil allowed

REPLACE locations with given ids

Validations:

  • Must be an array of any type

medium[organization_ids]
optional , nil allowed

REPLACE organizations with given ids.

Validations:

  • Must be an array of any type