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

用来查找包含该 rpm 的存储库的软件包 id

Validations:

  • String

library
选填

在 Library 及默认内容视图中显示库

Validations:

  • boolean

content_type
选填

limit to only repositories of this type

Validations:

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

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

库源 url

Validations:

  • String

gpg_key_id
选填

要为新库分配的 gpg 密钥 id

Validations:

  • number.

unprotected
选填

如果可通过 HTTP 发布则为 true

Validations:

  • boolean

content_type
必填

存储库类型(可以是 'puppet'、'docker' 或者 'ostree')

Validations:

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

checksum_type
选填

库的 checksum,目前支持 'sha1' & 'sha256'。

Validations:

  • String

docker_upstream_name
选填

upstream docker 库名称

Validations:

  • String

download_policy
选填

yum 存储库的下载策略(可以是 'immediate'、'on_demand' 或者 'background')

Validations:

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

mirror_on_sync
选填

如果这个存储库同步时必须使用该源作为镜像则为 true,同时删除陈旧的 rpm。

Validations:

  • boolean


GET /katello/api/repositories/repository_types
显示可用存储库类型

参数

参数名字 描述
creatable
选填

设定为 'True' 存储库类型后即可在返回时创建

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

用于同步的临时替代种子 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 发布则为 true

Validations:

  • boolean

checksum_type
选填

库的 checksum,目前支持 'sha1' & 'sha256'。

Validations:

  • String

url
选填

原始库的 feed url

Validations:

  • String

docker_upstream_name
选填

upstream docker 库名称

Validations:

  • String

download_policy
选填

yum 存储库的下载策略(可以是 'immediate'、'on_demand' 或者 'background')

Validations:

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

mirror_on_sync
选填

如果这个存储库同步时必须使用该源作为镜像则为 true,同时删除陈旧的 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
返回由 yum 直接使用的库 gpg 密钥内容

参数

参数名字 描述
id
必填

Validations:

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