GET /api/media
List all media.

参数

参数名字 描述
search
选填

过滤结果


Value:

Must be String

order
选填

结果排序


Value:

Must be String

page
选填

页数


Value:

Must be String

per_page
选填

每个请求中的条目数


Value:

Must be String


GET /api/media/:id
Show a medium.

参数

参数名字 描述
id
必填

Value:

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
Create a medium.

参数

参数名字 描述
medium
必填

Value:

Must be a Hash

medium[name]
必填

介质名称


Value:

Must be 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.


Value:

Must be String

medium[os_family]
选填

The family that the operating system belongs to.

Available families:

  • AIX

  • Altlinux

  • Archlinux

  • Coreos

  • Debian

  • Freebsd

  • Gentoo

  • Junos

  • NXOS

  • Redhat

  • Solaris

  • Suse

  • Windows


Value:

Must be String

medium[operatingsystem_ids]
选填

Value:

Must be an array of any type


PUT /api/media/:id
Update a medium.

参数

参数名字 描述
id
必填

Value:

Must be String

medium
必填

Value:

Must be a Hash

medium[name]
选填

介质名称


Value:

Must be 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.


Value:

Must be String

medium[os_family]
选填 , 允许空值

The family that the operating system belongs to.

Available families:

  • AIX

  • Altlinux

  • Archlinux

  • Coreos

  • Debian

  • Freebsd

  • Gentoo

  • Junos

  • NXOS

  • Redhat

  • Solaris

  • Suse

  • Windows


Value:

Must be String

medium[operatingsystem_ids]
选填

Value:

Must be an array of any type


DELETE /api/media/:id
Delete a medium.

参数

参数名字 描述
id
必填

Value:

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