GET /api/media
List all installation media

GET /api/operatingsystems/:operatingsystem_id/media
List all media for an operating system

GET /api/locations/:location_id/media
List all media per location

GET /api/organizations/:organization_id/media
List all media per organization

Params

Param name Description
operatingsystem_id
optional

ID of operating system

Validations:

  • Must be a number.

location_id
optional

Scope by locations

Validations:

  • Integer

organization_id
optional

Scope by organizations

Validations:

  • Integer

search
optional

filter results

Validations:

  • String

order
optional

Sort and order by a searchable field, e.g. ‘

Maruku could not parse this XML/HTML: 
<field> DESC'

Validations:

  • String

page
optional

Page number, starting at 1

Validations:

  • Must be a number.

per_page
optional

Number of results per page to return, ‘all’ to return all results

Validations:

  • Must match regular expression /\A([1-9]\d|all)\Z$/.

Search fields

Field name Type Possible values
family string
id integer
location string
location_id integer
name string
organization string
organization_id integer
path string

GET /api/media/:id
Show a medium

Params

Param name Description
location_id
optional

Set the current location context for the request

Validations:

  • Integer

organization_id
optional

Set the current organization context for the request

Validations:

  • Integer

id
required

Validations:

  • string from 2 to 128 characters containing only alphanumeric characters, space, ‘‘, ‘-’ with no leading or trailing space..


POST /api/media
Create a medium

Params

Param name Description
location_id
optional

Set the current location context for the request

Validations:

  • Integer

organization_id
optional

Set the current organization context for the request

Validations:

  • Integer

medium
required

Validations:

  • Hash

medium[name]
required

Name of media

Validations:

  • String

medium[path]
required

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

for example http://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:

  • 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:

  • 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


PUT /api/media/:id
Update a medium

Params

Param name Description
location_id
optional

Set the current location context for the request

Validations:

  • Integer

organization_id
optional

Set the current organization context for the request

Validations:

  • Integer

id
required

Validations:

  • String

medium
required

Validations:

  • Hash

medium[name]
optional

Name of media

Validations:

  • String

medium[path]
optional

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

for example http://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:

  • 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:

  • 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


DELETE /api/media/:id
Delete a medium

Params

Param name Description
location_id
optional

Set the current location context for the request

Validations:

  • Integer

organization_id
optional

Set the current organization context for the request

Validations:

  • Integer

id
required

Validations:

  • string from 2 to 128 characters containing only alphanumeric characters, space, ‘‘, ‘-’ with no leading or trailing space..