UNPKG

node-cnb

Version:

node sdk for cnb open api

2,012 lines (2,011 loc) 224 kB
{ "groups.post": { "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \ngroup-manage:rw", "operationId": "CreateOrganization", "tags": [ "Organizations" ], "summary": "创建新组织。Create new organization.", "parameters": [ { "description": "group information", "in": "body", "name": "request", "required": true, "schema": { "$ref": "#/definitions/dto.CreateGroupReq" } } ], "responses": { "201": { "description": "Created" } }, "path": "/groups", "method": "post" }, "user.get": { "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \naccount-profile:r", "operationId": "GetUserInfo", "tags": [ "Users" ], "summary": "获取指定用户的详情信息。Get detailed information for a specified user.", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/dto.UsersResultForSelf" } } }, "path": "/user", "method": "get" }, "user.post": { "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \naccount-profile:rw", "operationId": "UpdateUserInfo", "tags": [ "Users" ], "summary": "更新指定用户的详情信息。Updates the specified user's profile information.", "parameters": [ { "description": "user info", "in": "body", "name": "request", "required": true, "schema": { "$ref": "#/definitions/http.UpdateUserInfoPayload" } } ], "responses": { "200": { "description": "OK" } }, "path": "/user", "method": "post" }, "user.autocompleteSource.list": { "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \naccount-engage:r", "operationId": "AutoCompleteSource", "tags": [ "Users" ], "summary": "查询当前用户用户拥有指定权限的所有资源列表。List resources that the current user has specified permissions for.", "parameters": [ { "default": "group", "description": "Source type, default(group)", "enum": [ "Group", "Repo" ], "in": "query", "name": "source_type", "type": "string" }, { "default": 1, "description": "Pagination page number", "in": "query", "name": "page", "type": "integer" }, { "default": 10, "description": "Pagination page size", "in": "query", "name": "page_size", "type": "integer" }, { "default": "", "description": "Filter by resources.", "in": "query", "name": "search", "type": "string" }, { "default": "owner", "description": "最小仓库权限,默认owner。Minima repository permissions, default(owner)", "enum": [ "Reporter", "Developer", "Master", "Owner" ], "in": "query", "name": "access", "type": "string" } ], "responses": { "200": { "description": "OK", "schema": { "items": { "type": "string" }, "type": "array" } } }, "path": "/user/autocomplete_source", "method": "get" }, "user.groups.list": { "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \naccount-engage:r", "operationId": "ListTopGroups", "tags": [ "Organizations" ], "summary": "获取当前用户拥有权限的顶层组织列表。Get top-level organizations list that the current user has access to.", "parameters": [ { "default": 1, "description": "Pagination page number", "in": "query", "name": "page", "type": "integer" }, { "default": 10, "description": "Pagination page size", "in": "query", "name": "page_size", "type": "integer" }, { "default": "", "description": "Filter by organizations.", "in": "query", "name": "search", "type": "string" }, { "description": "Filter by role.", "enum": [ "Guest", "Reporter", "Developer", "Master", "Owner" ], "in": "query", "name": "role", "type": "string" } ], "responses": { "200": { "description": "OK", "schema": { "items": { "$ref": "#/definitions/dto.OrganizationAccess" }, "type": "array" } } }, "path": "/user/groups", "method": "get" }, "user.groups.listByGroup": { "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \naccount-engage:r", "operationId": "ListGroups", "tags": [ "Organizations" ], "summary": "查询当前用户在指定组织下拥有指定权限的子组织列表。Get the list of sub-organizations that the current user has access to in the specified organization.", "parameters": [ { "default": "hello", "description": "Group slug", "in": "path", "name": "group", "required": true, "type": "string" }, { "default": 1, "description": "Pagination page number", "in": "query", "name": "page", "type": "integer" }, { "default": 10, "description": "Pagination page size", "in": "query", "name": "page_size", "type": "integer" }, { "description": "access level", "in": "query", "name": "access", "type": "integer" } ], "responses": { "200": { "description": "OK", "schema": { "items": { "$ref": "#/definitions/dto.OrganizationAccess" }, "type": "array" } } }, "path": "/user/groups/{group}", "method": "get" }, "user.repos.list": { "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \naccount-engage:r", "operationId": "GetRepos", "tags": [ "Repositories" ], "summary": "获取当前用户拥有指定权限及其以上权限的仓库。List repositories owned by the current user with the specified permissions or higher.", "parameters": [ { "default": 1, "description": "Pagination page number", "in": "query", "name": "page", "type": "integer" }, { "default": 10, "description": "Pagination page size", "in": "query", "name": "page_size", "type": "integer" }, { "default": "", "description": "Filter by repositories", "in": "query", "name": "search", "type": "string" }, { "description": "RType", "enum": [ "private", "public", "encrypted" ], "in": "query", "name": "filter_type", "type": "string" }, { "default": "owner", "description": "最小仓库权限,默认owner。Minima repository permissions, default(owner)", "enum": [ "Reporter", "Developer", "Master", "Owner" ], "in": "query", "name": "role", "type": "string" }, { "description": "Order field,default(last_updated_at)", "enum": [ "created_at", "last_updated_at", "stars", "slug_path", "forks" ], "in": "query", "name": "order_by", "type": "string" }, { "default": false, "description": "排序顺序。Ordering.", "in": "query", "name": "desc", "type": "boolean" } ], "responses": { "200": { "description": "OK", "schema": { "items": { "$ref": "#/definitions/dto.Repos4User" }, "type": "array" } } }, "path": "/user/repos", "method": "get" }, "user.staredRepos.list": { "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \naccount-engage:r", "operationId": "GetUserAllStaredRepos", "tags": [ "Repositories" ], "summary": "获取当前用户 star 的仓库列表。List all stared repositories.", "parameters": [ { "default": 1, "description": "Pagination page number", "in": "query", "name": "page", "type": "integer" }, { "default": 10, "description": "Pagination page size", "in": "query", "name": "page_size", "type": "integer" }, { "default": "", "description": "Filter by repositories", "in": "query", "name": "search", "type": "string" }, { "default": false, "description": "排序顺序。Ordering.", "in": "query", "name": "desc", "type": "boolean" }, { "description": "Order field,default(last_updated_at)", "enum": [ "created_at", "last_updated_at", "stars", "forks" ], "in": "query", "name": "order_by", "type": "string" } ], "responses": { "200": { "description": "OK", "schema": { "items": { "$ref": "#/definitions/dto.Repos4User" }, "type": "array" } } }, "path": "/user/stared-repos", "method": "get" }, "users.get": { "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \naccount-profile:r", "operationId": "GetUserInfoByName", "tags": [ "Users" ], "summary": "获取指定用户的详情信息。Get detailed information for a specified user.", "parameters": [ { "default": "someone", "description": "User Name", "in": "path", "name": "username", "required": true, "type": "string" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/dto.UsersResult" } } }, "path": "/users/{username}", "method": "get" }, "users.activities.get": { "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \naccount-engage:r", "operationId": "GetUserActivitiesByDate", "tags": [ "Activities" ], "summary": "获取个人动态活跃详情汇总", "parameters": [ { "default": "someone", "description": "UserName", "in": "path", "name": "username", "required": true, "type": "string" }, { "default": "", "description": "查询日期,格式 yyyyMM,或者 yyyyMMdd", "in": "query", "name": "date", "type": "string" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/dto.ActivityDate" } } }, "path": "/users/{username}/activities", "method": "get" }, "users.avatar.get": { "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \naccount-profile:r", "operationId": "GetUserAvatar", "tags": [ "Assets" ], "summary": "获取指定用户的用户头像。Get the user's avatar.", "parameters": [ { "default": "someone", "description": "User Name", "in": "path", "name": "username", "required": true, "type": "string" }, { "description": "Size of the avatar. s or l", "in": "path", "name": "size", "required": true, "type": "string" } ], "responses": {}, "path": "/users/{username}/avatar/{size}", "method": "get" }, "users.followers.list": { "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \naccount-engage:r", "operationId": "GetFollowersByUserID", "tags": [ "Followers" ], "summary": "获取指定用户的粉丝列表。Get the followers list of specified user.", "parameters": [ { "default": "someone", "description": "User Name", "in": "path", "name": "username", "required": true, "type": "string" }, { "default": 1, "description": "Pagination page number", "in": "query", "name": "page", "type": "integer" }, { "default": 10, "description": "Pagination page size", "in": "query", "name": "page_size", "type": "integer" } ], "responses": { "200": { "description": "OK", "schema": { "items": { "$ref": "#/definitions/dto.UserFollowResult" }, "type": "array" } } }, "path": "/users/{username}/followers", "method": "get" }, "users.following.list": { "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \naccount-engage:r", "operationId": "GetFollowingByUserID", "tags": [ "Followers" ], "summary": "获取指定用户的关注人列表。Get the list of users that the specified user is following.", "parameters": [ { "default": "someone", "description": "User Name", "in": "path", "name": "username", "required": true, "type": "string" }, { "default": 1, "description": "Pagination page number", "in": "query", "name": "page", "type": "integer" }, { "default": 10, "description": "Pagination page size", "in": "query", "name": "page_size", "type": "integer" } ], "responses": { "200": { "description": "OK", "schema": { "items": { "$ref": "#/definitions/dto.UserFollowResult" }, "type": "array" } } }, "path": "/users/{username}/following", "method": "get" }, "users.groups.get": { "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \naccount-engage:r", "operationId": "GetGroupsByUserID", "tags": [ "Organizations" ], "summary": "获取指定用户拥有权限的顶层组织列表。 Get a list of top-level organizations that the specified user has permissions to access.", "parameters": [ { "default": "someone", "description": "UserName", "in": "path", "name": "username", "required": true, "type": "string" }, { "default": "", "description": "Filter organizations.", "in": "query", "name": "search", "type": "string" }, { "default": 1, "description": "Pagination page number", "in": "query", "name": "page", "type": "integer" }, { "default": 10, "description": "Pagination page size", "in": "query", "name": "page_size", "type": "integer" }, { "default": false, "description": "Sort order.", "in": "query", "name": "desc", "type": "boolean" }, { "description": "Sort type, defaults to created_at", "enum": [ "join_time", "created_at" ], "in": "query", "name": "order_by", "type": "string" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/dto.OrganizationUnion" } } }, "path": "/users/{username}/groups", "method": "get" }, "users.pinnedRepos.list": { "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \naccount-engage:r", "operationId": "GetPinnedRepoByID", "tags": [ "Repositories" ], "summary": "获取指定用户的用户仓库墙。 Get a list of repositories that the specified user has pinned.", "parameters": [ { "default": "someone", "description": "User Name", "in": "path", "name": "username", "required": true, "type": "string" } ], "responses": { "200": { "description": "OK", "schema": { "items": { "$ref": "#/definitions/dto.Repos4User" }, "type": "array" } } }, "path": "/users/{username}/pinned-repos", "method": "get" }, "users.repoActivities.list": { "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \naccount-engage:r", "operationId": "GetUserRepoActivityDetails", "tags": [ "Activities" ], "summary": "个人仓库动态详情列表", "parameters": [ { "default": "someone", "description": "UserName", "in": "path", "name": "username", "required": true, "type": "string" }, { "description": "activity type", "enum": [ "issue", "pull_request", "code_review" ], "in": "path", "name": "activityType", "required": true, "type": "string" }, { "default": "", "description": "仓库路径", "in": "query", "name": "slug", "required": true, "type": "string" }, { "default": "", "description": "查询日期,格式 yyyyMM,或者 yyyyMMdd", "in": "query", "name": "date", "required": true, "type": "string" } ], "responses": { "200": { "description": "返回 []dto.ActivityPullRequestDetail|[]dto.ActivityIssueDetail", "schema": { "items": {}, "type": "array" } } }, "path": "/users/{username}/repo-activities/{activityType}", "method": "get" }, "users.repos.list": { "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \naccount-engage:r", "operationId": "GetReposByUserName", "tags": [ "Repositories" ], "summary": "获取指定用户有指定以上权限并且客人态可见的仓库。List repositories where the specified user has the specified permission level or higher and are visible to guests.", "parameters": [ { "default": "someone", "description": "UserName", "in": "path", "name": "username", "required": true, "type": "string" }, { "default": "", "description": "Filter by repositories", "in": "query", "name": "search", "type": "string" }, { "default": "owner", "description": "最小仓库权限,默认owner。Minima repository permissions, default(owner).", "enum": [ "Reporter", "Developer", "Master", "Owner" ], "in": "query", "name": "role", "type": "string" }, { "default": 1, "description": "Pagination page number", "in": "query", "name": "page", "type": "integer" }, { "default": 10, "description": "Pagination page size", "in": "query", "name": "page_size", "type": "integer" }, { "default": false, "description": "排序顺序。Ordering.", "in": "query", "name": "desc", "type": "boolean" }, { "description": "Order field,default(last_updated_at)", "enum": [ "created_at", "last_updated_at", "stars", "slug_path", "forks" ], "in": "query", "name": "order_by", "type": "string" } ], "responses": { "200": { "description": "OK", "schema": { "items": { "$ref": "#/definitions/dto.Repos4User" }, "type": "array" } } }, "path": "/users/{username}/repos", "method": "get" }, "users.staredRepos.list": { "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \naccount-engage:r", "operationId": "GetUserStaredRepos", "tags": [ "Starring" ], "summary": "获取指定用户的 star 仓库列表。Get the list of repositories starred by the specified user.", "parameters": [ { "default": "someone", "description": "UserName", "in": "path", "name": "username", "required": true, "type": "string" }, { "default": "", "description": "过滤仓库。Filter by repositories", "in": "query", "name": "search", "type": "string" }, { "default": 1, "description": "Pagination page number", "in": "query", "name": "page", "type": "integer" }, { "default": 10, "description": "Pagination page size", "in": "query", "name": "page_size", "type": "integer" }, { "default": false, "description": "Ordering", "in": "query", "name": "desc", "type": "boolean" }, { "description": "Order field,default(last_updated_at)", "enum": [ "created_at", "last_updated_at", "stars", "forks" ], "in": "query", "name": "order_by", "type": "string" } ], "responses": { "200": { "description": "OK", "schema": { "items": { "$ref": "#/definitions/dto.Repos4User" }, "type": "array" } } }, "path": "/users/{username}/stared-repos", "method": "get" }, "workspace.delete.post": { "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \naccount-engage:rw", "operationId": "DeleteWorkspace", "tags": [ "Workspace" ], "summary": "删除我的云原生开发环境。Delete my workspace.", "parameters": [ { "description": "params", "in": "body", "name": "request", "required": true, "schema": { "$ref": "#/definitions/dto.WorkspaceDeleteReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/dto.WorkspaceDeleteResult" } } }, "path": "/workspace/delete", "method": "post" }, "workspace.list.get": { "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \naccount-engage:r", "operationId": "ListWorkspaces", "tags": [ "Workspace" ], "summary": "获取我的云原生开发环境列表。List my workspaces.", "parameters": [ { "description": "Git branch name, e.g. \"main\"", "in": "query", "name": "branch", "type": "string" }, { "description": "查询结束时间。Query end time. format YYYY-MM-DD HH:mm:ssZZ, e.g. 2024-12-01 00:00:00+0800", "in": "query", "name": "end", "type": "string" }, { "description": "Pagination page number, default(1)", "in": "query", "name": "page", "type": "integer" }, { "description": "Pagination page size, default(20), max(100)", "in": "query", "name": "pageSize", "type": "integer" }, { "description": "Repository path, e.g. \"groupname/reponame\"", "in": "query", "name": "slug", "type": "string" }, { "description": "查询开始时间。Query start time. format YYYY-MM-DD HH:mm:ssZZ, e.g. 2024-12-01 00:00:00+0800", "in": "query", "name": "start", "type": "string" }, { "description": "开发环境状态,running: 开发环境已启动,closed:开发环境已关闭。Workspace status: \"running\" for started, \"closed\" for stopped.", "in": "query", "name": "status", "type": "string" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/dto.WorkspaceListResult" } } }, "path": "/workspace/list", "method": "get" }, "group.delete": { "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \ngroup-delete:rw", "operationId": "DeleteOrganization", "tags": [ "Organizations" ], "summary": "删除指定组织。Delete the specified organization.", "parameters": [ { "description": "group path", "in": "path", "name": "group", "required": true, "type": "string" }, { "description": "微信身份验证票据,首次请求不传会返回新票据。WeChat auth ticket, will return new ticket if not provided in first request.", "in": "header", "name": "x-cnb-identity-ticket", "type": "string" } ], "responses": { "200": { "description": "OK" } }, "path": "/{group}", "method": "delete" }, "group.get": { "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \ngroup-resource:r", "operationId": "GetGroup", "tags": [ "Organizations" ], "summary": "获取指定组织信息。Get information for the specified organization.", "parameters": [ { "description": "group path", "in": "path", "name": "group", "required": true, "type": "string" } ], "responses": { "200": { "description": "group", "schema": { "$ref": "#/definitions/dto.OrganizationAccess" } } }, "path": "/{group}", "method": "get" }, "group.put": { "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \ngroup-manage:rw", "operationId": "UpdateOrganization", "tags": [ "Organizations" ], "summary": "更新组织信息, 可更新的内容为: 组织描述, 组织展示名称, 组织网站, 组织联系邮箱。Updates organization information including: description, display name, website URL and contact email.", "parameters": [ { "description": "slug", "in": "path", "name": "group", "required": true, "type": "string" }, { "description": "group information to update", "in": "body", "name": "request", "required": true, "schema": { "$ref": "#/definitions/dto.UpdateGroupReq" } } ], "responses": { "200": { "description": "OK" } }, "path": "/{group}", "method": "put" }, "group.avatar.put": { "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \ngroup-manage:rw", "operationId": "UpdateGroupAvatar", "tags": [ "Organizations" ], "summary": "更新组织头像 URL 地址。Updates the organization avatar URL.", "parameters": [ { "description": "slug", "in": "path", "name": "group", "required": true, "type": "string" }, { "description": "group avatar url to update", "in": "body", "name": "request", "required": true, "schema": { "$ref": "#/definitions/dto.UpdateGroupAvatarReq" } } ], "responses": { "200": { "description": "OK" } }, "path": "/{group}/-/avatar", "method": "put" }, "group.inheritMembers.list": { "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \ngroup-manage:r", "operationId": "ListInheritMembersOfGroup", "tags": [ "Collaborators" ], "summary": "获取指定组织或仓库内的继承成员。List inherited members within specified organization or repository。", "parameters": [ { "description": "slug", "in": "path", "name": "group", "required": true, "type": "string" }, { "default": "", "description": "过滤成员。Filter by member", "in": "query", "name": "search", "type": "string" }, { "description": "Role", "enum": [ "Guest", "Reporter", "Developer", "Master", "Owner" ], "in": "query", "name": "role", "type": "string" }, { "default": 1, "description": "Pagination page number", "in": "query", "name": "page", "type": "integer" }, { "default": 10, "description": "Pagination page size", "in": "query", "name": "page_size", "type": "integer" } ], "responses": { "200": { "description": "OK", "schema": { "items": { "$ref": "#/definitions/dto.ListInheritMembers" }, "type": "array" } } }, "path": "/{group}/-/inherit-members", "method": "get" }, "group.logos.put": { "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \ngroup-manage:rw", "operationId": "PutLogos", "tags": [ "Assets" ], "summary": "确认上传的logo。Confirms the uploaded logo.", "parameters": [ { "default": "test-group/test-repo", "description": "group", "in": "path", "name": "group", "required": true, "type": "string" }, { "description": "获取 uploadurl 时返回的token。The token returned when getting the uploadurl.", "in": "query", "name": "token", "required": true, "type": "string" } ], "responses": { "200": { "description": "OK" } }, "path": "/{group}/-/logos", "method": "put" }, "group.logos.get": { "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \ngroup-resource:r", "operationId": "GetLogos", "tags": [ "Assets" ], "summary": "发起一个获取 logo 的请求,返回内容或者 302 到某个地址。Post a request to fetch a logo and returns the content directly or a 302 redirect to the logo URL.", "parameters": [ { "default": "test-group", "description": "group", "in": "path", "name": "group", "required": true, "type": "string" }, { "description": "size", "in": "path", "name": "size", "type": "string" } ], "responses": { "302": { "description": "Found" } }, "path": "/{group}/-/logos/{size}", "method": "get" }, "group.members.list": { "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \ngroup-manage:r", "operationId": "ListMembersOfGroup", "tags": [ "Collaborators" ], "summary": "获取指定组织或仓库内的所有直接成员。List all direct members within specified organization or repository.", "parameters": [ { "description": "slug", "in": "path", "name": "group", "required": true, "type": "string" }, { "default": 1, "description": "Pagination page number", "in": "query", "name": "page", "type": "integer" }, { "default": 10, "description": "Pagination page size", "in": "query", "name": "page_size", "type": "integer" }, { "description": "Role", "enum": [ "Guest", "Reporter", "Developer", "Master", "Owner" ], "in": "query", "name": "role", "type": "string" }, { "default": "", "description": "过滤成员。Filter by member.", "in": "query", "name": "search", "type": "string" } ], "responses": { "200": { "description": "OK", "schema": { "items": { "$ref": "#/definitions/dto.UsersWithAccessLevelInSlug" }, "type": "array" } } }, "path": "/{group}/-/members", "method": "get" }, "group.members.accessLevel.get": { "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \ngroup-manage:r", "operationId": "GetMemberAccessLevelOfGroup", "tags": [ "Contributors" ], "summary": "获取指定组织或仓库内, 访问成员在当前层级内的权限信息。Get permission information for accessing members at current level.", "parameters": [ { "description": "slug", "in": "path", "name": "group", "required": true, "type": "string" }, { "default": true, "description": "是否包含继承的权限。If inherited permissions are included.", "in": "query", "name": "include_inherit", "type": "boolean" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/dto.MemberAccessLevelInSlugUnion" } } }, "path": "/{group}/-/members/access-level", "method": "get" }, "group.members.delete": { "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \ngroup-manage:rw", "operationId": "DeleteMembersOfGroup", "tags": [ "Collaborators" ], "summary": "删除指定组织或仓库的直接成员。Remove direct members from specified organization/repository.", "parameters": [ { "description": "slug", "in": "path", "name": "group", "required": true, "type": "string" }, { "description": "username", "in": "path", "name": "username", "required": true, "type": "string" } ], "responses": { "200": { "description": "OK" } }, "path": "/{group}/-/members/{username}", "method": "delete" }, "group.members.post": { "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \ngroup-manage:rw", "operationId": "AddMembersOfGroup", "tags": [ "Collaborators" ], "summary": "添加成员。Add members.", "parameters": [ { "description": "slug", "in": "path", "name": "group", "required": true, "type": "string" }, { "description": "username", "in": "path", "name": "username", "required": true, "type": "string" }, { "description": "member information", "in": "body", "name": "request", "required": true, "schema": { "$ref": "#/definitions/dto.UpdateMembersRequest" } } ], "responses": { "200": { "description": "OK" } }, "path": "/{group}/-/members/{username}", "method": "post" }, "group.members.put": { "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \ngroup-manage:rw", "operationId": "UpdateMembersOfGroup", "tags": [ "Collaborators" ], "summary": "更新指定组织或仓库内的直接成员权限信息。Update permission information for direct members in specified organization/repository.", "parameters": [ { "description": "slug", "in": "path", "name": "group", "required": true, "type": "string" }, { "description": "username", "in": "path", "name": "username", "required": true, "type": "string" }, { "description": "member information", "in": "body", "name": "request", "required": true, "schema": { "$ref": "#/definitions/dto.UpdateMembersRequest" } } ], "responses": { "200": { "description": "OK" } }, "path": "/{group}/-/members/{username}", "method": "put" }, "group.members.accessLevel.list": { "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \ngroup-manage:r", "operationId": "ListMemberAccessLevelOfGroup", "tags": [ "Contributors" ], "summary": "获取指定组织或仓库内指定成员的权限信息, 结果按组织层级来展示, 包含上层组织的权限继承信息。Get specified member's permissions with organizational hierarchy.", "parameters": [ { "description": "slug", "in": "path", "name": "group", "required": true, "type": "string" }, { "description": "username", "in": "path", "name": "username", "required": true, "type": "string" } ], "responses": { "200": { "description": "OK", "schema": { "items": { "$ref": "#/definitions/dto.MemberAccessLevel" }, "type": "array" } } }, "path": "/{group}/-/members/{username}/access-level", "method": "get" }, "group.pinnedRepos.list": { "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \ngroup-manage:r", "operationId": "GetPinnedRepoByGroup", "tags": [ "Repositories" ], "summary": "获取指定组织的仓库墙列表。List the pinned repositories of a group.", "parameters": [ { "description": "slug", "in": "path", "name": "group", "required": true, "type": "string" } ], "responses": { "200": { "description": "OK", "schema": { "items": { "$ref": "#/definitions/dto.Repos4UserBase" }, "type": "array" } } }, "path": "/{group}/-/pinned-repos", "method": "get" }, "group.pinnedRepos.put": { "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \ngroup-manage:rw", "operationId": "SetPinnedRepoByGroup", "tags": [ "Repositories" ], "summary": "更新指定组织仓库墙。Update the pinned repositories of a group.", "parameters": [ { "description": "slug", "in": "path", "name": "group", "required": true, "type": "string" }, { "description": "repo path", "in": "body", "name": "request", "required": true, "schema": { "items": { "type": "string" }, "type": "array" } } ], "responses": { "200": { "description": "OK", "schema": { "items": { "$ref": "#/definitions/dto.Repos4UserBase" }, "type": "array" } } }, "path": "/{group}/-/pinned-repos", "method": "put" }, "group.repos.list": { "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \ngroup-resource:r", "operationId": "GetGroupSubRepos", "tags": [ "Repositories" ], "summary": "查询组织下访问用户有权限查看到仓库。List the repositories that the user has access to.", "parameters": [ { "description": "slug", "in": "path", "name": "group", "required": true, "type": "string" }, { "default": 1, "description": "Pagination page number", "in": "query", "name": "page", "type": "integer" }, { "default": 10, "description": "Pagination page size", "in": "query", "name": "page_size", "type": "integer" }, { "description": "Repositories type", "enum": [ "private", "public", "encrypted" ], "in": "query", "name": "filter_type", "type": "string" }, { "description": "Order field,default(last_updated_at)", "enum": [ "created_at", "last_updated_at", "stars", "slug_path" ], "in": "query", "name": "order_by", "type": "string" }, { "default": false, "description": "Ordering", "in": "query", "name": "desc", "type": "boolean" }, { "description": "查全部/查询直接属于当前组织的仓库/查询子组织的仓库。Get all/Get repos belong to current org or sub-organization", "enum": [ "all", "sub", "grand" ], "in": "query", "name": "descendant", "type": "string" }, { "description": "Key word", "in": "query", "name": "search", "type": "string" } ], "responses": { "200": { "description": "OK", "schema": { "items": { "$ref": "#/definitions/dto.Repos4User" }, "type": "array" } } }, "path": "/{group}/-/repos", "method": "get" }, "group.repos.post": { "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \ngroup-resource:rw", "operationId": "CreateRepo", "tags": [ "Repositories" ], "summary": "创建仓库。Create repositories.", "parameters": [ { "default": "hello", "description": "Group slug", "in": "path", "name": "group", "required": true, "type": "string" }, { "description": "repo information", "in": "body", "name": "request", "required": true, "schema": { "$ref": "#/definitions/dto.CreateRepoReq" } } ], "responses": { "201": { "description": "Created" } }, "path": "/{group}/-/repos", "method": "post" }, "group.settings.get": { "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \ngroup-manage:r", "operationId": "GetGroupSetting", "tags": [ "Organizations" ], "summary": "获取指定组织的配置详情。Get the configuration details for the specified organization.", "parameters": [ { "description": "group path", "in": "path", "name": "group", "required": true, "type": "string" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/dto.OrganizationSettingWithParent" } } }, "path": "/{group}/-/settings", "method": "get" }, "group.settings.put": { "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \ngroup-manage:rw", "operationId": "UpdateGroupSetting", "tags": [ "Organizations" ], "summary": "更新指定组织的配置。Updates the configuration for the specified organization.", "parameters": [ { "description": "slug", "in": "path", "name": "group", "required": true, "type": "string" }, { "description": "group information to update", "in": "body", "name": "request", "required": true, "schema": { "$ref": "#/definitions/dto.GroupSettingReq" } } ], "responses": { "200": { "description": "OK" } }, "path": "/{group}/-/settings", "method": "put" }, "group.subGroups.list": { "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \ngroup-resource:r", "operationId": "ListSubgroups", "tags": [ "Organizations" ], "summary": "获取指定组织下的子组织列表。Get the list of sub-organizations under the specified organization.", "parameters": [ { "description": "Slug", "in": "path", "name": "group", "required": true, "type": "string" }, { "default": "", "description": "Filter organization", "in": "query", "name": "search", "type": "string" }, { "default": 1, "description": "Pagination page number", "in": "query", "name": "page", "required": true, "type": "integer" }, { "default": 10, "description": "Pagination page size", "in": "query", "name": "page_size", "required": true, "type": "integer" } ], "responses": { "200": { "description": "OK", "schema": { "items": { "$ref": "#/definitions/dto.OrganizationUnion" }, "type": "array" } } }, "path": "/{group}/-/sub-groups", "method": "get" }, "group.upload.logos.post": { "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \ngroup-manage:rw", "operationId": "UploadLogos", "tags": [ "Assets" ], "summary": "发起一个上传 logo 的请求,返回上传 cos 的 url 和 form 内容。Post a request to upload a logo.", "parameters": [ { "default": "test-group", "description": "group", "in": "path", "name": "group", "required": true, "type": "string" }, { "description": "UploadRequestParams", "in": "body", "name": "request", "required": true, "schema": { "$ref": "#/definitions/dto.UploadRequestParams" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/dto.UploadAssetsResponse" } } }, "path": "/{group}/-/upload/logos", "method": "post" }, "mission.delete": { "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nmission-delete:rw", "operationId": "DeleteMission", "tags": [ "Missions" ], "summary": "删除指定任务集。Delete the specified mission.", "parameters": [ { "description": "mission path", "in": "path", "name": "mission", "required": true, "type": "string" }, { "description": "微信身份验证票据,首次请求不传会返回新票据。WeChat auth ticket, will return new ticket if not provided in first request.", "in": "header", "name": "x-cnb-identity-ticket", "type": "string" } ], "responses": { "200": { "description": "OK" } }, "path": "/{mission}", "method": "delete" }, "mission.members.post": { "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nmission-manage:rw", "operationId": "AddMembersOfMission", "tags": [ "Collaborators" ], "summary": "添加成员。Add members.", "parameters": [ { "description": "slug", "in": "path", "name": "mission", "required": true, "type": "string" }, { "description": "username", "in": "path", "name": "username", "required": true, "type": "string" }, { "description": "member information", "in": "body", "name": "request", "required": true, "schema": { "$ref": "#/definitions/dto.UpdateMembersRequest" } } ], "responses": { "200": { "description": "OK" } }, "path": "/{mission}/-/members/{username}", "method": "post" }, "registry.delete": { "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nregistry-delete:rw", "operationId": "DeleteRegistry", "tags": [ "Artifactory" ], "summary": "删除制品仓库。Delete the artifact repository.", "parameters": [ { "description": "registry path", "in": "path", "name": "registry", "required": true, "type": "string" }, { "description": "微信身份验证票据,首次请求不传会返回新票据。WeChat auth ticket, will return new ticket if not provided in first request.", "in": "header", "name": "x-cnb-identity-ticket", "type": "string" } ], "responses": { "200": { "description": "OK" } }, "path": "/{registry}", "method": "delete" }, "registry.members.post": { "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nregistry-manage:rw", "operationId": "AddMembersOfRegistry", "tags": [ "Collaborators" ], "summary": "添加成员。Add members.", "parameters": [ { "description": "slug", "in": "path", "name": "registry", "required": true, "type": "string" }, { "description": "username", "in": "path", "name": "username", "required": true, "type": "string" }, { "description": "member information", "in": "body", "name": "request", "required": true, "schema": { "$ref": "#/definitions/dto.UpdateMembersRequest" } } ], "responses": { "200": { "description": "OK" } }, "path": "/{registry}/-/members/{username}", "method": "post" }, "repo.delete": { "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-delete:rw", "operationId": "DeleteRepo", "tags": [ "Repositories" ], "summary": "删除指定仓库。Delete the specified repository.", "parameters": [ { "description": "repo path", "in": "path", "name": "repo", "required": true, "type": "string" }, { "description": "微信身份验证票据,首次请求不传会返回新票据。WeChat auth ticket, will return new ticket if not provided in first request.", "in": "header", "name": "x-cnb-identity-ticket", "type": "string" } ], "responses": { "200": { "description": "OK" } }, "path": "/{repo}", "method": "delete" }, "repo.get": { "description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \nrepo-basic-info:r", "operationId": "GetRepo", "tags": [ "Repositories" ], "summary": "获取指定仓库信息。Get information for the specified repository.", "parameters": [ { "description": "repo path", "in": "path", "name": "repo", "required": true, "type": "string" } ], "responses": { "200": {