本仓库使用openapi-generator-cli生成,对cnb的API进行了openapi V3的适配,详见swagger.json
如需其他SDK(如java)可自行下载swagger.json进行生成
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
This Python package is automatically generated by the OpenAPI Generator project:
Python 3.8+
If the python package is hosted on a repository, you can install directly using:
pip install git+https://cnb.cool/root/cnb_api_client.git
(you may need to run pip with root permission: sudo pip install git+https://cnb.cool/root/cnb_api_client.git)
Then import the package:
import cnb_api_client
Install via Setuptools.
python setup.py install --user
(or sudo python setup.py install to install the package for all users)
Then import the package:
import cnb_api_client
Execute pytest to run the tests.
Please follow the installation procedure and then run the following:
import cnb_api_client
from cnb_api_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.cnb.cool
# See configuration.py for a list of all supported configuration parameters.
configuration = cnb_api_client.Configuration(
host = "https://api.cnb.cool"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: BearerAuth
configuration.api_key['BearerAuth'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['BearerAuth'] = 'Bearer'
# Enter a context with an instance of the API client
with cnb_api_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = cnb_api_client.ArtifactoryApi(api_client)
slug = 'slug_example' # str | 仓库 slug
type = 'type_example' # str | 制品类型
name = 'name_example' # str | 制品名称
tag = 'tag_example' # str | 制品标签
try:
# Delete the specific tag under specific package
api_instance.delete_package_tag(slug, type, name, tag)
except ApiException as e:
print("Exception when calling ArtifactoryApi->delete_package_tag: %s\n" % e)
All URIs are relative to https://api.cnb.cool
| Class | Method | HTTP request | Description |
|---|---|---|---|
| ArtifactoryApi | delete_package_tag | DELETE /{slug}/-/packages/{type}/{name}/-/tag/{tag} | Delete the specific tag under specific package |
| ArtifactoryApi | delete_registry | DELETE /{registry} | 删除制品仓库 |
| ArtifactoryApi | download_quotas_by_project_name | GET /{slug}/-/packages/{type}/-/quotas/download | Download registry quota details |
| ArtifactoryApi | get_package | GET /{slug}/-/packages/{type}/{name} | Get the specific package |
| ArtifactoryApi | get_package_tag_detail | GET /{slug}/-/packages/{type}/{name}/-/tag/{tag} | Get the specific tag under specific package |
| ArtifactoryApi | get_quota_by_project_name | GET /{slug}/-/packages/{type}/-/quota | Get quota of specific registry |
| ArtifactoryApi | get_quotas_by_project_name | GET /{slug}/-/packages/{type}/-/quotas | Get quotas of packages under one registry |
| ArtifactoryApi | head_packages | HEAD /{slug}/-/packages | Head all packages |
| ArtifactoryApi | list_package_tags | GET /{slug}/-/packages/{type}/{pkgname}/-/tags | List all tags under specific package |
| ArtifactoryApi | list_packages | GET /{slug}/-/packages | List all packages |
| AssetsApi | get_commit_assets | GET /{repo}/-/commit-assets/download/{fileName} | 发起一个获取 commits 附件的请求,返回内容或者 302 到某个地址 |
| AssetsApi | get_files | GET /{repo}/-/files/{userIdKey}/{randomUUID}/{fileName} | 发起一个获取 files 的请求,返回内容或者 302 到某个地址 |
| AssetsApi | get_imgs | GET /{repo}/-/imgs/{userIdKey}/{fileName} | 发起一个获取 imgs 的请求,返回内容或者 302 到某个地址 |
| AssetsApi | get_logos | GET /{group}/-/logos/{size} | 发起一个获取 logo 的请求,返回内容或者 302 到某个地址 |
| AssetsApi | get_releases_asset | GET /{repo}/-/releases/download/{fileName} | 发起一个获取 release 附件的请求,返回内容或者 302 到某个地址 |
| AssetsApi | get_user_avatar | GET /users/{username}/avatar/{size} | 获取指定用户的用户头像 |
| AssetsApi | put_files | PUT /{repo}/-/files/{userIdKey}/{randomUUID}/{fileName} | 发起一个确认 files 的请求,上传的图片要调用此接口才能生效 |
| AssetsApi | put_imgs | PUT /{repo}/-/imgs/{userIdKey}/{fileName} | 发起一个确认 imgs 的请求,上传的图片要调用此接口才能生效 |
| AssetsApi | put_logos | PUT /{group}/-/logos | 确认上传的logo |
| AssetsApi | upload_files | POST /{repo}/-/upload/files | 发起一个上传 files(issue,pr 及其评论中文档,压缩包等)的请求,返回上传 cos 的 url 和 form 内容 |
| AssetsApi | upload_imgs | POST /{repo}/-/upload/imgs | 发起一个上传 imgs 的请求,返回上传 cos 的 url 和 form 内容 |
| AssetsApi | upload_logos | POST /{group}/-/upload/logos | 发起一个上传 logo 的请求,返回上传 cos 的 url 和 form 内容 |
| AssetsApi | upload_releases | POST /{repo}/-/upload/releases/{tagName} | 发起一个上传 release 附件的请求,返回上传 cos 的 url 和 form 内容 |
| BuildApi | get_build_logs | GET /{repo}/-/build/logs | 查询流水线构建列表 |
| BuildApi | get_build_status | GET /{repo}/-/build/status/{sn} | 查询流水线构建状态 |
| BuildApi | start_build | POST /{repo}/-/build/start | 开始一个构建 |
| BuildApi | stop_build | POST /{repo}/-/build/stop/{sn} | 停止一个构建 |
| CollaboratorsApi | add_members_of_group | POST /{group}/-/members/{username} | 添加成员 |
| CollaboratorsApi | add_members_of_mission | POST /{mission}/-/members/{username} | 添加成员 |
| CollaboratorsApi | add_members_of_registry | POST /{registry}/-/members/{username} | 添加成员 |
| CollaboratorsApi | add_members_of_repo | POST /{repo}/-/members/{username} | 添加成员 |
| CollaboratorsApi | delete_members_of_group | DELETE /{group}/-/members/{username} | 删除指定组织或仓库的直接成员, 包含两种场景: 1. 作为直接成员的用户自己退出 2. 由管理者移除指定的直接成员 |
| CollaboratorsApi | delete_members_of_repo | DELETE /{repo}/-/members/{username} | 删除指定组织或仓库的直接成员, 包含两种场景: 1. 作为直接成员的用户自己退出 2. 由管理者移除指定的直接成员 |
| CollaboratorsApi | delete_outside_collaborators | DELETE /{repo}/-/outside-collaborators/{username} | 删除指定仓库的外部贡献者, 包含两种场景: 1. 作为外部贡献者的用户自己退出仓库 2. 由仓库管理者移除指定的外部贡献者 |
| CollaboratorsApi | list_all_members | GET /{repo}/-/list-members | 获取指定仓库内的有效成员列表,包含继承成员 |
| CollaboratorsApi | list_inherit_members_of_group | GET /{group}/-/inherit-members | 获取指定组织或仓库内的继承成员 |
| CollaboratorsApi | list_inherit_members_of_repo | GET /{repo}/-/inherit-members | 获取指定组织或仓库内的继承成员 |
| CollaboratorsApi | list_members_of_group | GET /{group}/-/members | 获取指定组织或仓库内的所有直接成员 |
| CollaboratorsApi | list_members_of_repo | GET /{repo}/-/members | 获取指定组织或仓库内的所有直接成员 |
| CollaboratorsApi | list_outside_collaborators | GET /{repo}/-/outside-collaborators | 获取指定仓库内的外部贡献者 |
| CollaboratorsApi | top_contributors | GET /{repo}/-/top-activity-users | 获取 top 贡献用户 |
| CollaboratorsApi | update_members_of_group | PUT /{group}/-/members/{username} | 更新指定组织或仓库内的直接成员权限信息 |
| CollaboratorsApi | update_members_of_repo | PUT /{repo}/-/members/{username} | 更新指定组织或仓库内的直接成员权限信息 |
| CollaboratorsApi | update_outside_collaborators | PUT /{repo}/-/outside-collaborators/{username} | 更新指定仓库的外部贡献者权限信息 |
| ContributorsApi | get_member_access_level_of_group | GET /{group}/-/members/access-level | 获取指定组织或仓库内, 访问成员在当前层级内的权限信息 |
| ContributorsApi | get_member_access_level_of_repo | GET /{repo}/-/members/access-level | 获取指定组织或仓库内, 访问成员在当前层级内的权限信息 |
| ContributorsApi | list_member_access_level_of_group | GET /{group}/-/members/{username}/access-level | 获取指定组织或仓库内指定成员的权限信息, 结果按组织层级来展示, 包含上层组织的权限继承信息 |
| ContributorsApi | list_member_access_level_of_repo | GET /{repo}/-/members/{username}/access-level | 获取指定组织或仓库内指定成员的权限信息, 结果按组织层级来展示, 包含上层组织的权限继承信息 |
| FollowersApi | get_followers_by_user_id | GET /users/{username}/followers | 获取指定用户的粉丝列表 |
| FollowersApi | get_following_by_user_id | GET /users/{username}/following | 获取指定用户的关注人列表 |
| GitApi | create_blob | POST /{repo}/-/git/blobs | 创建一个 blob |
| GitApi | create_branch | POST /{repo}/-/git/branches | 创建新分支 |
| GitApi | create_tag | POST /{repo}/-/git/tags | 创建一个 tag |
| GitApi | delete_branch | DELETE /{repo}/-/git/branches/{branch} | 删除指定分支 |
| GitApi | delete_commit_annotation | DELETE /{repo}/-/git/commit-annotations/{sha}/{key} | 删除指定 commit 的元数据 |
| GitApi | delete_commit_asset | DELETE /{repo}/-/git/commit-assets/{sha1}/{asset_id} | 删除指定 commit 的附件 |
| GitApi | delete_tag | DELETE /{repo}/-/git/tags/{tag} | 删除指定标签 |
| GitApi | delete_tag_annotation | DELETE /{repo}/-/git/tag-annotations/{tag_with_key} | 删除指定 tag 的元数据 |
| GitApi | get_archive_commit_changed_files | GET /{repo}/-/git/archive-commit-changed-files/{sha1} | 打包下载 commit 变更文件 |
| GitApi | get_archive_compare_changed_files | GET /{repo}/-/git/archive-compare-changed-files/{base_head} | 打包下载两次 ref 之间的变更文件 |
| GitApi | get_branch | GET /{repo}/-/git/branches/{branch} | 查询指定分支 |
| GitApi | get_commit | GET /{repo}/-/git/commits/{ref} | 查询指定 commit |
| GitApi | get_commit_annotations | GET /{repo}/-/git/commit-annotations/{sha} | 查询指定 commit 的元数据 |
| GitApi | get_commit_annotations_in_batch | POST /{repo}/-/git/commit-annotations-in-batch | 查询指定 commit 的元数据 |
| GitApi | get_commit_assets_by_sha | GET /{repo}/-/git/commit-assets/{sha1} | 查询指定 commit 的附件 |
| GitApi | get_commit_statuses | GET /{repo}/-/git/commit-statuses/{commitish} | 查询指定 commit 的 check statuses |
| GitApi | get_compare_commits | GET /{repo}/-/git/compare/{base_head} | 对比 base...head |
| GitApi | get_content | GET /{repo}/-/git/contents/{file_path} | 查询仓库文件列表或文件 |
| GitApi | get_head | GET /{repo}/-/git/head | 获取仓库默认分支 |
| GitApi | get_tag | GET /{repo}/-/git/tags/{tag} | 查询指定 Tag |
| GitApi | get_tag_annotations | GET /{repo}/-/git/tag-annotations/{tag} | 查询指定 tag 的元数据 |
| GitApi | list_branches | GET /{repo}/-/git/branches | 查询分支列表 |
| GitApi | list_commits | GET /{repo}/-/git/commits | 查询 commit 列表 |
| GitApi | list_tags | GET /{repo}/-/git/tags | 查询标签列表 |
| GitApi | post_commit_asset_upload_confirmation | POST /{repo}/-/git/commit-assets/{sha1}/asset-upload-confirmation/{token}/{asset_path} | 确认 Commit asset 上传完成 |
| GitApi | post_commit_asset_upload_url | POST /{repo}/-/git/commit-assets/{sha1}/asset-upload-url | 新增一个 Commit asset |
| GitApi | put_commit_annotations | PUT /{repo}/-/git/commit-annotations/{sha} | 设定指定 commit 的元数据 |
| GitApi | put_tag_annotations | PUT /{repo}/-/git/tag-annotations/{tag} | 设定指定 tag 的元数据 |
| GitSettingsApi | delete_branch_protection | DELETE /{repo}/-/settings/branch-protections/{id} | 删除仓库保护分支规则(openapi) |
| GitSettingsApi | get_branch_protection | GET /{repo}/-/settings/branch-protections/{id} | 查询仓库保护分支规则(openapi) |
| GitSettingsApi | get_pipeline_settings | GET /{repo}/-/settings/cloud-native-build | 查询仓库云原生构建设置(openapi) |
| GitSettingsApi | get_pull_request_settings | GET /{repo}/-/settings/pull-request | 查询仓库合并请求设置(openapi) |
| GitSettingsApi | get_push_limit_settings | GET /{repo}/-/settings/push-limit | 查询仓库推送设置(openapi) |
| GitSettingsApi | list_branch_protections | GET /{repo}/-/settings/branch-protections | 查询仓库保护分支规则列表(openapi) |
| GitSettingsApi | patch_branch_protection | PATCH /{repo}/-/settings/branch-protections/{id} | 更新仓库保护分支规则(openapi) |
| GitSettingsApi | post_branch_protection | POST /{repo}/-/settings/branch-protections | 新增仓库保护分支规则(openapi) |
| GitSettingsApi | put_pipeline_settings | PUT /{repo}/-/settings/cloud-native-build | 更新仓库云原生构建设置(openapi) |
| GitSettingsApi | put_pull_request_settings | PUT /{repo}/-/settings/pull-request | 设置仓库推送设置(openapi) |
| GitSettingsApi | put_push_limit_settings | PUT /{repo}/-/settings/push-limit | 设置仓库推送设置(openapi) |
| IssuesApi | create_issue | POST /{repo}/-/issues | 创建一个 Issue |
| IssuesApi | delete_issue_label | DELETE /{repo}/-/issues/{number}/labels/{name} | 删除 Issue 标签 |
| IssuesApi | delete_issue_labels | DELETE /{repo}/-/issues/{number}/labels | 清空 Issue 标签 |
| IssuesApi | get_issue | GET /{repo}/-/issues/{number} | 查询指定的 Issues |
| IssuesApi | get_issue_comment | GET /{repo}/-/issues/{number}/comments/{comment_id} | 获取一个 Issue Comment |
| IssuesApi | list_issue_comments | GET /{repo}/-/issues/{number}/comments | 查询仓库的 Issue 评论列表 |
| IssuesApi | list_issue_labels | GET /{repo}/-/issues/{number}/labels | 查询 Issue 的标签(label) 列表 |
| IssuesApi | list_issues | GET /{repo}/-/issues | 查询仓库的 Issues |
| IssuesApi | patch_issue_comment | PATCH /{repo}/-/issues/{number}/comments/{comment_id} | 修改一个 Issue Comment |
| IssuesApi | post_issue_comment | POST /{repo}/-/issues/{number}/comments | 创建一个 Issue Comment |
| IssuesApi | post_issue_labels | POST /{repo}/-/issues/{number}/labels | 新增 Issue 标签 |
| IssuesApi | put_issue_labels | PUT /{repo}/-/issues/{number}/labels | 设置 Issue 标签 |
| IssuesApi | update_issue | PATCH /{repo}/-/issues/{number} | 更新一个 Issue |
| MissionsApi | delete_mission | DELETE /{mission} | 删除指定任务集 |
| OrganizationsApi | create_organization | POST /groups | 创建新组织 |
| OrganizationsApi | delete_organization | DELETE /{group} | 删除指定组织 |
| OrganizationsApi | get_group | GET /{group} | 获取指定组织信息 |
| OrganizationsApi | get_group_setting | GET /{group}/-/settings | 获取指定组织的配置详情 |
| OrganizationsApi | get_groups_by_user_id | GET /users/{username}/groups | 获取指定用户拥有权限的顶层组织列表 |
| OrganizationsApi | list_groups | GET /user/groups/{group} | 查询当前用户在指定组织下拥有指定权限的子组织列表 |
| OrganizationsApi | list_subgroups | GET /{group}/-/sub-groups | 获取指定组织下的子组织列表 |
| OrganizationsApi | list_top_groups | GET /user/groups | 获取当前用户拥有权限的顶层组织列表 |
| OrganizationsApi | update_group_avatar | PUT /{group}/-/avatar | 更新组织头像 URL 地址 |
| OrganizationsApi | update_group_setting | PUT /{group}/-/settings | 更新指定组织的配置, 可更新内容为: 是否对外隐藏组织成员 |
| OrganizationsApi | update_organization | PUT /{group} | 更新组织信息, 可更新的内容为: 组织描述, 组织展示名称, 组织网站, 组织联系邮箱 |
| PullsApi | delete_pull_label | DELETE /{repo}/-/pulls/{number}/labels/{name} | 删除 Pull 标签 |
| PullsApi | delete_pull_labels | DELETE /{repo}/-/pulls/{number}/labels | 清空 Pull 标签 |
| PullsApi | get_pull | GET /{repo}/-/pulls/{number} | [openapi] 查询指定 Pull |
| PullsApi | list_pull_comments | GET /{repo}/-/pulls/{number}/comments | [openapi] 查询 Pull Comments 列表 |
| PullsApi | list_pull_labels | GET /{repo}/-/pulls/{number}/labels | 查询 Pull 的标签(label) 列表 |
| PullsApi | list_pulls | GET /{repo}/-/pulls | [openapi] 查询 Pull 列表 |
| PullsApi | list_pulls_by_numbers | GET /{repo}/-/pull-in-batch | [openapi] 根据numbers查询 Pull 列表 |
| PullsApi | merge_pull | PUT /{repo}/-/pulls/{number}/merge | [openapi] 合并一个 Pull Request |
| PullsApi | patch_pull | PATCH /{repo}/-/pulls/{number} | [openapi] 更新一个 Pull Request |
| PullsApi | post_pull | POST /{repo}/-/pulls | [openapi] 新增一个 Pull |
| PullsApi | post_pull_comment | POST /{repo}/-/pulls/{number}/comments | [openapi] 新增一个 Pull Comment |
| PullsApi | post_pull_labels | POST /{repo}/-/pulls/{number}/labels | 新增 Pull 标签 |
| PullsApi | post_pull_review | POST /{repo}/-/pulls/{number}/reviews | 新增一次 pull request 评审 |
| PullsApi | put_pull_labels | PUT /{repo}/-/pulls/{number}/labels | 设置 Pull 标签 |
| ReleasesApi | delete_release | DELETE /{repo}/-/releases/{release_id} | [openapi] 删除指定的 release |
| ReleasesApi | delete_release_asset | DELETE /{repo}/-/releases/{release_id}/assets/{asset_id} | [openapi] 删除指定的 release asset |
| ReleasesApi | get_release_asset | GET /{repo}/-/releases/{release_id}/assets/{asset_id} | [openapi] 查询指定的 release asset |
| ReleasesApi | get_release_by_id | GET /{repo}/-/releases/{release_id} | [openapi] 根据 id 查询指定 release |
| ReleasesApi | get_release_by_tag | GET /{repo}/-/releases/tags/{tag} | [openapi] 通过 tag 查询指定 release |
| ReleasesApi | list_releases | GET /{repo}/-/releases | [openapi] 查询 release 列表 |
| ReleasesApi | patch_release | PATCH /{repo}/-/releases/{release_id} | [openapi] 更新 release |
| ReleasesApi | post_release | POST /{repo}/-/releases | [openapi] 新增一个 Release |
| ReleasesApi | post_release_asset_upload_confirmation | POST /{repo}/-/releases/{release_id}/asset-upload-confirmation/{token}/{asset_path} | [openapi] 确认 Release asset 上传完成 |
| ReleasesApi | post_release_asset_upload_url | POST /{repo}/-/releases/{release_id}/asset-upload-url | [openapi] 新增一个 Release asset |
| RepoContributorApi | get_repo_contributor_trend | GET /{repo}/-/contributor/trend | 查询仓库贡献者前 100 名的详细趋势数据 |
| RepoLabelsApi | delete_label | DELETE /{repo}/-/labels/{name} | 删除指定的仓库标签 label |
| RepoLabelsApi | list_labels | GET /{repo}/-/labels | 查询仓库的标签(label) 列表 |
| RepoLabelsApi | patch_label | PATCH /{repo}/-/labels/{name} | 更新标签信息 |
| RepoLabelsApi | post_label | POST /{repo}/-/labels | 创建一个 标签 |
| RepositoriesApi | create_a_fork | POST /{repo}/-/forks | fork 仓库 |
| RepositoriesApi | create_repo | POST /{group}/-/repos | 创建仓库 |
| RepositoriesApi | delete_repo | DELETE /{repo} | 删除指定仓库 |
| RepositoriesApi | get_group_sub_repos | GET /{group}/-/repos | 查询组织下访问用户有权限查看到仓库 |
| RepositoriesApi | get_pinned_repo_by_group | GET /{group}/-/pinned-repos | 获取指定组织的仓库墙列表 |
| RepositoriesApi | get_pinned_repo_by_id | GET /users/{username}/pinned-repos | 获取指定用户的用户仓库墙 |
| RepositoriesApi | get_repo | GET /{repo} | 获取指定仓库信息 |
| RepositoriesApi | get_repos | GET /user/repos | 获取当前用户拥有指定权限及其以上权限的仓库 |
| RepositoriesApi | get_repos_by_user_name | GET /users/{username}/repos | 获取指定用户有指定以上权限并且客人态可见的仓库 |
| RepositoriesApi | get_user_all_stared_repos | GET /user/stared-repos | 获取当前用户 star 的仓库列表 |
| RepositoriesApi | list_forks_repos | GET /{repo}/-/forks | 获取指定仓库的 fork 列表 |
| RepositoriesApi | set_pinned_repo_by_group | PUT /{group}/-/pinned-repos | 更新指定组织仓库墙 |
| RepositoriesApi | update_repo | PATCH /{repo} | 更新仓库信息, 可更新的内容为: 仓库简介, 仓库站点, 仓库主题, 开源许可证 |
| StarringApi | get_user_stared_repos | GET /users/{username}/stared-repos | 获取指定用户的 star 仓库列表 |
| StarringApi | list_star_users | GET /{repo}/-/stars | 获取指定仓库的star用户列表 |
| UsersApi | auto_complete_source | GET /user/autocomplete_source | 查询当前用户用户拥有指定权限的所有资源列表 |
| UsersApi | get_user_info | GET /user | 获取指定用户的详情信息 |
| UsersApi | get_user_info_by_name | GET /users/{username} | 获取指定用户的详情信息 |
| UsersApi | update_user_info | POST /user | 更新指定用户的详情信息, 可更新内容为: 昵称, 个人签名, 微信公众号名称, 微信公众号二维码链接, 个人网站, 个人地址, 公司名称 |
| WorkspaceApi | delete_workspace | POST /workspace/delete | 删除我的云原生开发环境 |
| WorkspaceApi | get_workspace_detail | GET /{repo}/-/workspace/detail/{sn} | 根据流水线sn查询云原生开发访问地址 |
| WorkspaceApi | list_workspaces | GET /workspace/list | 获取我的云原生开发环境列表 |
Authentication schemes defined for the API: