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

參數

參數名字 描述
operatingsystem_id
選填

ID of operating system

Validations:

  • Must be String

location_id
選填

Scope by locations

Validations:

  • Must be Integer

organization_id
選填

Scope by organizations

Validations:

  • Must be Integer

search
選填

篩選結果

Validations:

  • Must be String

order
選填

排序結果

Validations:

  • Must be String

page
選填

編頁結果

Validations:

  • Must be String

per_page
選填

每個請求的項目數量

Validations:

  • Must be String


GET /api/media/:id
Show a medium

參數

參數名字 描述
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
Create a medium

參數

參數名字 描述
medium
必填

Validations:

  • Must be a Hash

medium[name]
必填

Name of media

Validations:

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

Validations:

  • Must be String

medium[os_family]
選填 , 允許空值

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

Validations:

  • Must be String

medium[operatingsystem_ids]
選填 , 允許空值

Validations:

  • Must be an array of any type

medium[location_ids]
選填 , 允許空值

REPLACE locations with given ids

Validations:

  • Must be an array of any type

medium[organization_ids]
選填 , 允許空值

REPLACE organizations with given ids.

Validations:

  • Must be an array of any type


PUT /api/media/:id
Update a medium

參數

參數名字 描述
id
必填

Validations:

  • Must be String

medium
必填

Validations:

  • Must be a Hash

medium[name]
選填

Name of media

Validations:

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

Validations:

  • Must be String

medium[os_family]
選填 , 允許空值

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

Validations:

  • Must be String

medium[operatingsystem_ids]
選填 , 允許空值

Validations:

  • Must be an array of any type

medium[location_ids]
選填 , 允許空值

REPLACE locations with given ids

Validations:

  • Must be an array of any type

medium[organization_ids]
選填 , 允許空值

REPLACE organizations with given ids.

Validations:

  • Must be an array of any type


DELETE /api/media/:id
Delete a medium

參數

參數名字 描述
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.