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
選填

Sort field and order, eg. ‘id DESC’

Validations:

  • Must be a String

page
選填

頁數,從 1 開始

Validations:

  • Must be a number.

per_page
選填

每頁要傳回的結果數量

Validations:

  • Must be a number.

Search fields

Field name 類型 Possible values
family
location
location_id
name
organization
organization_id
path

GET /api/media/:id
顯示媒介

參數

參數名字 描述
location_id
選填

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
選填

Set the current organization context for the request

Validations:

  • Must be a Integer

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
建立媒介

參數

參數名字 描述
location_id
選填

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
選填

Set the current organization context for the request

Validations:

  • Must be a Integer

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, Rancheros, Redhat, Solaris, Suse, VRP, 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
更新媒介

參數

參數名字 描述
location_id
選填

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
選填

Set the current organization context for the request

Validations:

  • Must be a Integer

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, Rancheros, Redhat, Solaris, Suse, VRP, 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
刪除媒介

參數

參數名字 描述
location_id
選填

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
選填

Set the current organization context for the request

Validations:

  • Must be a Integer

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.