GET /katello/api/repositories
一列已啟用的軟體庫

GET /katello/api/content_views/:id/repositories
內容視域的軟體庫清單

GET /katello/api/organizations/:organization_id/environments/:environment_id/repositories
List repositories in the environment

GET /katello/api/products/:product_id/repositories
List of repositories for a product

GET /katello/api/environments/:environment_id/products/:product_id/repositories
List of repositories belonging to a product in an environment

參數

參數名字 描述
organization_id
必填

欲顯示其軟體庫的組織之 ID

Validations:

  • number.

product_id
選填

欲顯示其軟體庫的產品之 ID

Validations:

  • number.

environment_id
選填

欲顯示其軟體庫的環境之 ID

Validations:

  • number.

content_view_id
選填

欲顯示其內部軟體庫的內容視域之 ID

Validations:

  • number.

content_view_version_id
選填

欲顯示其內部軟體庫的內容視域版本之 ID

Validations:

  • number.

erratum_id
選填

勘誤 ID,用來尋找包含勘誤的軟體庫

Validations:

  • String

rpm_id
選填

套件 ID,用來尋找包含 RPM 的軟體庫

Validations:

  • String

library
選填

在函示庫與預設內容視域中顯示軟體庫

Validations:

  • boolean

content_type
選填

limit to only repositories of this type

Validations:

  • Must be one of: puppet, yum, ostree, file, docker.

name
選填

軟體庫名稱

Validations:

  • String

available_for
選填

解譯特定物件,以只傳回可與特定物件相關連的軟體庫。支援「content_view」值。

Validations:

  • String

search
選填

搜尋字串

Validations:

  • String

page
選填

頁數,從 1 開始

Validations:

  • number.

per_page
選填

每頁要傳回的結果數量

Validations:

  • number.

order
選填

排序欄位與次序,例如「name DESC」

Validations:

  • String

full_results
選填

是否顯示所有結果

Validations:

  • boolean

sort
選填

「order」參數的雜湊版本

Validations:

  • Hash

sort[by]
選填

用來排序結果的欄位

Validations:

  • String

sort[order]
選填

如何排序結果的順序(比方說 ASC 從下到上)

Validations:

  • String


POST /katello/api/repositories
建立自訂軟體庫

參數

參數名字 描述
name
必填

Validations:

  • String

label
選填

Validations:

  • String

product_id
必填

產品的軟體庫屬於

Validations:

  • number.

url
選填

軟體庫來源的網址

Validations:

  • String

gpg_key_id
選填

要指定給新軟體庫的GPG 金鑰之 ID

Validations:

  • number.

unprotected
選填

如果此軟體庫可以透過 HTTP 出版,設為真

Validations:

  • boolean

content_type
必填

軟體庫類型('yum'、'puppet'、'docker' 或是 'ostree')

Validations:

  • Must be one of: puppet, yum, ostree, file, docker.

checksum_type
選填

軟體庫的 checksum,目前支援 'sha1' 和 'sha256'。

Validations:

  • String

docker_upstream_name
選填

上游 docker 軟體庫的名稱

Validations:

  • String

download_policy
選填

從 yum 軟體庫下載政策(可能是 'immediate'、'on_demand' 或 'background')

Validations:

  • Must be one of: immediate, on_demand, background.

mirror_on_sync
選填

如果此軟體庫同步時必須從來源做鏡射,且舊的 RPM 已經被移除,那麼為真。

Validations:

  • boolean


GET /katello/api/repositories/repository_types
顯示可用軟體庫類型

參數

參數名字 描述
creatable
選填

設置為「真」的時候,會傳回可建立的軟體庫類型

Validations:

  • boolean


PUT /katello/api/repositories/:id/republish
Forces a republish of the specified repository, regenerating metadata and symlinks on the filesystem.

參數

參數名字 描述
id
必填

軟體庫識別子

Validations:

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


GET /katello/api/repositories/:id
Show a repository

參數

參數名字 描述
id
必填

軟體庫 ID

Validations:

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


POST /katello/api/repositories/:id/sync
同步軟體庫

參數

參數名字 描述
id
必填

軟體庫 ID

Validations:

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

source_url
選填

暫時覆寫同步的 feed URL

Validations:

  • String

incremental
選填

進行累進匯入

Validations:

  • boolean

skip_metadata_check
選填

Force sync even if no upstream changes are detected. Only used with yum repositories.

Validations:

  • boolean

validate_contents
選填

Force a sync and validate the checksums of all content. Only used with yum repositories.

Validations:

  • boolean


POST /katello/api/repositories/:id/export
匯出軟體庫

參數

參數名字 描述
id
必填

軟體庫識別子

Validations:

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

export_to_iso
選填

匯出至 ISO 格式

Validations:

  • boolean

iso_mb_size
選填

每個 ISO 的最大大小(MB)

Validations:

  • number.

since
選填

最後匯出的選用日期(例如:2010-01-01T12:00:00Z)

Validations:

  • Date


PUT /katello/api/repositories/:id
更新軟體庫

參數

參數名字 描述
name
選填

軟體庫的新名稱

Validations:

  • String

id
必填

軟體庫 ID

Validations:

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

gpg_key_id
選填

將會指定給這個軟體庫的 gpg 金鑰 ID

Validations:

  • number.

unprotected
選填

如果此軟體庫可以透過 HTTP 出版,設為真

Validations:

  • boolean

checksum_type
選填

軟體庫的 checksum,目前支援 'sha1' 和 'sha256'。

Validations:

  • String

url
選填

原始軟體庫的發送網址

Validations:

  • String

docker_upstream_name
選填

上游 docker 軟體庫的名稱

Validations:

  • String

download_policy
選填

從 yum 軟體庫下載政策(可能是 'immediate'、'on_demand' 或 'background')

Validations:

  • Must be one of: immediate, on_demand, background.

mirror_on_sync
選填

如果此軟體庫同步時必須從來源做鏡射,且舊的 RPM 已經被移除,那麼為真。

Validations:

  • boolean


DELETE /katello/api/repositories/:id
銷毀自訂軟體庫

參數

參數名字 描述
id
必填

Validations:

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


POST /katello/api/repositories/sync_complete

URL for post sync notification from pulp

參數

參數名字 描述
token
必填

共享的秘密 token

Validations:

  • String

payload
必填

Validations:

  • Hash

payload[repo_id]
必填

Validations:

  • String

call_report
必填

Validations:

  • Hash

call_report[task_id]
必填

Validations:

  • String


PUT /katello/api/repositories/:id/remove_packages

PUT /katello/api/repositories/:id/remove_docker_manifests

PUT /katello/api/repositories/:id/remove_puppet_modules

PUT /katello/api/repositories/:id/remove_content

Remove content from a repository

參數

參數名字 描述
id
必填

軟體庫 ID

Validations:

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

ids
必填

Array of content ids to remove

Validations:

  • Must be an array of any type


POST /katello/api/repositories/:id/upload_content
上傳內容至軟體庫

參數

參數名字 描述
id
必填

軟體庫 ID

Validations:

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

content
必填

欲上傳的內容檔案。能夠是單一檔案或檔案集。

Validations:

  • File


PUT /katello/api/repositories/:id/import_uploads
將上傳內容匯入軟體庫中

參數

參數名字 描述
id
必填

軟體庫 ID

Validations:

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

upload_ids
必填

欲匯入的上傳 ID

Validations:

  • Must be an array of any type

publish_repository
選填

Whether or not to regenerate the repository on disk. Default: true

Validations:

  • boolean


GET /katello/api/repositories/:id/gpg_key_content
回傳軟體庫 GPG 金鑰的內容,直接由 yum 所使用

參數

參數名字 描述
id
必填

Validations:

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