GET /api/media
列出所有安装介质

GET /api/operatingsystems/:operatingsystem_id/media
列出操作系统的所有介质

GET /api/locations/:location_id/media
列出每个位置的所有介质

GET /api/organizations/:organization_id/media
列出每个机构的所有介质

参数

参数名字 描述
operatingsystem_id
选填

操作系统 ID

Validations:

  • Must be a String

location_id
选填

根据位置界定的范围

Validations:

  • Must be a Integer

organization_id
选填

根据机构界定的范围

Validations:

  • Must be a Integer

search
选填

过滤结果

Validations:

  • Must be a String

order
选填

结果排序

Validations:

  • Must be a String

page
选填

编页结果

Validations:

  • Must be a String

per_page
选填

每个请求中的条目数

Validations:

  • Must be a String


GET /api/media/:id
显示媒体

参数

参数名字 描述
id
必填

Validations:

  • Must be an identifier, string from 1 to 128 characters containing only alphanumeric characters, space, underscore(_), hypen(-) with no leading or trailing space.


POST /api/media
创建媒体

参数

参数名字 描述
medium
必填

Validations:

  • Must be a Hash

medium[name]
必填

介质名称

Validations:

  • Must be a String

medium[path]
必填

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]
选填 , 允许空值

操作系统产品线,可用值为:AIX, Altlinux, Archlinux, Coreos, Debian, Freebsd, Gentoo, Junos, NXOS, Redhat, Solaris, Suse, Windows, Xenserver

Validations:

  • Must be a String

medium[operatingsystem_ids]
选填 , 允许空值

Validations:

  • Must be an array of any type

medium[location_ids]
选填 , 允许空值

使用给定 id 替换位置

Validations:

  • Must be an array of any type

medium[organization_ids]
选填 , 允许空值

使用给定 id 替换机构

Validations:

  • Must be an array of any type


PUT /api/media/:id
更新媒体

参数

参数名字 描述
id
必填

Validations:

  • Must be a String

medium
必填

Validations:

  • Must be a Hash

medium[name]
选填

介质名称

Validations:

  • Must be a String

medium[path]
选填

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]
选填 , 允许空值

操作系统产品线,可用值为:AIX, Altlinux, Archlinux, Coreos, Debian, Freebsd, Gentoo, Junos, NXOS, Redhat, Solaris, Suse, Windows, Xenserver

Validations:

  • Must be a String

medium[operatingsystem_ids]
选填 , 允许空值

Validations:

  • Must be an array of any type

medium[location_ids]
选填 , 允许空值

使用给定 id 替换位置

Validations:

  • Must be an array of any type

medium[organization_ids]
选填 , 允许空值

使用给定 id 替换机构

Validations:

  • Must be an array of any type


DELETE /api/media/:id
删除媒体

参数

参数名字 描述
id
必填

Validations:

  • Must be an identifier, string from 1 to 128 characters containing only alphanumeric characters, space, underscore(_), hypen(-) with no leading or trailing space.