华为云用户手册

  • 请求示例 POST https://{endpoint}/v1/ce8df55870164338a72d7e828a966a2a/agent-plugin/plugin-output [ { "plugin_name" : "official_shell_plugin", "display_name" : "", "plugin_attribution" : "official", "version_attribution" : "formal" } ]
  • 请求参数 表2 请求Header参数 参数 是否必选 参数类型 描述 X-Auth-Token 是 String 用户Token。 通过调用 IAM 服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。 表3 请求Body参数 参数 是否必选 参数类型 描述 [数组元素] 否 Array of PluginPartQueryDTO objects 查询请求体 表4 PluginPartQueryDTO 参数 是否必选 参数类型 描述 plugin_name 否 String 插件名 display_name 否 String 展示名 version 否 String 版本号 plugin_attribution 否 String 插件属性 version_attribution 否 String 版本属性
  • 响应示例 状态码: 200 OK { "offset" : 0, "limit" : 10, "total" : 1, "pipelines" : [ { "pipeline_id" : "cd65d6f2dc17493e97eb5175f872761a", "name" : "新建流水线-20230222181032", "project_id" : "6428c2e2b4b64affa14ec80896695c49", "component_id" : "7bb171e9e9fc415dbd1666ceb68668da", "is_publish" : true, "is_collect" : false, "manifest_version" : "3.0", "create_time" : 1677060662000, "latest_run" : { "pipeline_id" : "cd65d6f2dc17493e97eb5175f872761a", "pipeline_run_id" : "88a195482b8a48a1808e87ec21565c2f", "executor_id" : "847a5317086c41798469d0868535943a", "executor_name" : "beta环境账号", "stage_status_list" : [ { "name" : "合并集成分支", "sequence" : 0, "status" : "FAILED", "start_time" : "2023-02-22 18:12:25", "end_time" : "2023-02-22 18:12:32" }, { "name" : "阶段_1", "sequence" : 1, "status" : "INIT", "start_time" : null, "end_time" : null }, { "name" : "合并主干", "sequence" : 1, "status" : "INIT", "start_time" : null, "end_time" : null } ], "status" : "FAILED", "run_number" : 1, "trigger_type" : "Manual", "build_params" : null, "artifact_params" : null, "start_time" : 1677060745000, "end_time" : 1677060752000 } } ] }
  • 请求参数 表2 请求Header参数 参数 是否必选 参数类型 描述 X-Auth-Token 是 String 用户Token。 通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。 表3 请求Body参数 参数 是否必选 参数类型 描述 project_ids 否 Array of strings 项目ID列表 component_id 否 String 组件ID name 否 String 流水线名称,支持模糊查询 status 否 Array of strings 状态 is_publish 否 Boolean 是否为变更流水线 creator_ids 否 Array of strings 创建人ID列表 executor_ids 否 Array of strings 执行人ID列表 start_time 否 String 开始时间 end_time 否 String 结束时间 offset 否 Long 起始偏移 limit 否 Long 查询数量 sort_key 否 String 排序字段名称 sort_dir 否 String 排序规则 group_path_id 否 String 流水线分组ID by_group 否 Boolean 是否分组查询 query_new 否 Boolean 是否只查询新版流水线
  • 响应参数 状态码: 200 表4 响应Body参数 参数 参数类型 描述 offset Integer 起始偏移 limit Integer 查询大小 total Integer 总数 pipelines Array of pipelines objects 流水线 表5 pipelines 参数 参数类型 描述 pipeline_id String 流水线ID name String 流水线名称 project_id String 项目ID project_name String 项目名称 component_id String 组件ID is_publish Boolean 是否为变更流水线 is_collect Boolean 是否收藏此流水线 manifest_version String 流水线版本 create_time Long 创建时间 latest_run latest_run object 最近一次运行信息 convert_sign Integer 旧版转新版标识 表6 latest_run 参数 参数类型 描述 pipeline_id String 流水线ID pipeline_run_id String 流水线运行实例ID executor_id String 执行人ID executor_name String 执行人名称 stage_status_list Array of stage_status_list objects 阶段信息列表 status String 状态 run_number Integer 运行序号 trigger_type String 触发类型 build_params build_params object 构建参数 artifact_params artifact_params object 制品源参数 start_time Long 开始时间 end_time Long 结束时间 modify_url String 修改页地址 detail_url String 详情页地址 表7 stage_status_list 参数 参数类型 描述 name String 阶段名 sequence Integer 序列号 status String 状态 start_time String 开始时间 end_time String 结束时间 id String 阶段ID 表8 build_params 参数 参数类型 描述 action String 合并请求事件类型 build_type String 基于分支还是tag运行 commit_id String 代码仓提交ID event_type String 运行事件类型 merge_id String 合并请求ID message String 代码仓提交信息 source_branch String 源分支 tag String 标签 target_branch String 目标分支 codehub_id String Repo代码仓ID git_url String 代码仓https地址 source_codehub_id String 源Repo代码仓ID source_codehub_url String 源Repo代码仓地址 source_codehub_http_url String 源Repo代码仓http地址 表9 artifact_params 参数 参数类型 描述 version String 包版本 branch_filter String 过滤分支 package_name String 包名称 organization String docker组织
  • 响应参数 状态码: 200 表4 响应Body参数 参数 参数类型 描述 id String 规则模版实例ID name String 规则模版实例名称 type String 类型 version String 版本 creator String 创建人 create_time String 创建时间 updater String 最近更新人 update_time String 最近更新时间 is_valid Boolean 是否生效 rule_instances Array of RuleInstance objects 规则实例集合 表5 RuleInstance 参数 参数类型 描述 id String 规则实例ID type String 规则类型ID name String 规则名称 version String 规则版本 plugin_id String 插件ID plugin_name String 插件名称 plugin_version String 插件版本号 is_valid Boolean 是否生效 editable Boolean 是否可编辑 content Array of RuleInstanceContent objects 规则属性列表 parent RuleSet object 父级规则实例模板简要信息 表6 RuleInstanceContent 参数 参数类型 描述 group_name String 分组名称 type String 分组类型 can_modify_when_inherit Boolean 继承后的子策略是否可以修改阈值 properties Array of RuleInstanceProperty objects 规则属性列表 表7 RuleInstanceProperty 参数 参数类型 描述 key String 属性键 type String 类型 name String 展示名称 operator String 比较运算符 value String 属性值 value_type String 数据类型 表8 RuleSet 参数 参数类型 描述 id String 规则模版实例ID name String 规则模版实例名称 type String 类型 version String 版本 operator String 最近操作人 operate_time Long 最近操作时间 is_valid Boolean 是否生效 level String 租户级、项目级 is_public Boolean 是否系统级 状态码: 400 表9 响应Body参数 参数 参数类型 描述 error_msg String 错误信息 error_code String 错误码
  • 请求示例 POST https://{endpoint}/v2/ce8df55870164338a72d7e828a966a2a/tenant/open-source/rule-sets/create { "name" : "创建开源治理策略-20231020180239", "content" : { "version_set" : { "enable" : true, "rules" : [ { "ecosystem" : "Maven", "package_name" : "sboot", "predicate" : "eq", "package_version" : "1.1", "description" : "", "enable" : true } ] }, "security" : { "enable" : true, "rules" : { "severity" : { "enable" : false, "values" : [ ] }, "cve" : { "enable" : false, "values" : [ "" ] } } }, "license" : { "enable" : true, "rules" : [ { "values" : [ ], "predicate" : "contain" } ] } } }
  • 请求参数 表2 请求Header参数 参数 是否必选 参数类型 描述 X-Auth-Token 是 String 用户Token。 通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。 表3 请求Body参数 参数 是否必选 参数类型 描述 name 是 String 开源治理策略名称 content 是 OpenSourceRuleContent object 开源治理策略规则详情 表4 OpenSourceRuleContent 参数 是否必选 参数类型 描述 version_set 否 VersionSetProperty object 开源依赖 security 否 SecurityProperty object 漏洞 license 否 LicenseProperty object 许可证 表5 VersionSetProperty 参数 是否必选 参数类型 描述 enable 否 Boolean 是否启用 rules 否 Array of VersionSetRule objects 规则列表 表6 VersionSetRule 参数 是否必选 参数类型 描述 enable 否 Boolean 是否开启 ecosystem 否 String 依赖类型 package_name 否 String 包名称 package_version 否 String 包版本 description 否 String 规则说明 predicate 否 String 比较规则 表7 SecurityProperty 参数 是否必选 参数类型 描述 enable 否 Boolean 是否启用 rules 否 SecurityRule object 规则详情 表8 SecurityRule 参数 是否必选 参数类型 描述 severity 否 severity object 漏洞级别 cve 否 cve object 漏洞编号 表9 severity 参数 是否必选 参数类型 描述 enable 否 Boolean 是否启用 values 否 Array of strings 漏洞等级 表10 cve 参数 是否必选 参数类型 描述 enable 否 Boolean 是否启用 values 否 Array of strings 漏洞编号 表11 LicenseProperty 参数 是否必选 参数类型 描述 enable 否 Boolean 是否开启 rules 否 Array of rules objects 规则列表 表12 rules 参数 是否必选 参数类型 描述 values 否 Array of strings license详情 predicate 否 String 比较规则
  • 请求参数 表3 请求Header参数 参数 是否必选 参数类型 描述 X-Auth-Token 是 String 用户Token。 通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。 表4 请求Body参数 参数 是否必选 参数类型 描述 name 否 String 流水线名称 description 否 String 流水线描述 is_publish 否 Boolean 是否为发布流水线 sources 否 Array of CodeSource objects 流水线源 variables 否 Array of CustomVariable objects 流水线自定义全局变量 schedules 否 Array of PipelineSchedule objects 流水线定时执行配置 triggers 否 Array of PipelineTrigger objects 流水线代码事件触发配置 manifest_version 否 String 流水线结构定义版本,新版默认为3.0 definition 否 String 流水线结构定义 project_name 否 String 项目名称 group_id 否 String 流水线组ID id 否 String 若为复制场景,则为原流水线ID 表5 CodeSource 参数 是否必选 参数类型 描述 type 否 String 流水线源类型 params 否 params object 流水线源参数 表6 params 参数 是否必选 参数类型 描述 git_type 否 String git类型 codehub_id 否 String Repo代码仓ID endpoint_id 否 String 扩展点id default_branch 否 String 默认分支 git_url 否 String git链接 ssh_git_url 否 String ssh_git链接 web_url 否 String 网页url repo_name 否 String 流水线源名称 alias 否 String 代码仓别名。别名仅支持输入大小写英文字母、数字、“_”,至多128个字符 表7 CustomVariable 参数 是否必选 参数类型 描述 pipeline_id 否 String 流水线ID name 否 String 自定义参数名称 sequence 否 Integer 自定义参数顺序 type 否 String 自定义参数类型 value 否 String 自定义参数默认值 is_secret 否 Boolean 是否私密参数 description 否 String 自定义参数描述 is_runtime 否 Boolean 是否运行时设置 limits 否 Array of objects 限制 is_reset 否 Boolean 是否重置 latest_value 否 String 最近一次参数值 runtime_value 否 String 运行时传入值 表8 PipelineSchedule 参数 是否必选 参数类型 描述 uuid 否 String 任务ID type 否 String 任务类型 name 否 String 任务名称 enable 否 String 是否可用 days_of_week 否 Array of integers 一周内具体时间 time_zone 否 String 时区 表9 PipelineTrigger 参数 是否必选 参数类型 描述 pipeline_id 否 String 流水线ID git_url 否 String git链接 git_type 否 String git类型 is_auto_commit 否 Boolean 是否自动提交 events 否 Array of CodeEvent objects 事件 hook_id 否 String 回调id repo_id 否 String 仓库id endpoint_id 否 String 扩展点id callback_url 否 String 回调链接 security_token 否 String 用户token 表10 CodeEvent 参数 是否必选 参数类型 描述 type 否 String 事件类型 enable 否 Boolean 是否可用
  • 请求示例 POST https://{endpoint}/v5/d80a8a6530324b7bac972cbb8a9f28ec/api/pipelines { "name" : "新建流水线-20231024204112", "description" : "", "is_publish" : false, "sources" : [ { "type" : "code", "params" : { "git_type" : "codehub", "codehub_id" : "2111699317", "endpoint_id" : "", "default_branch" : "master", "git_url" : "https://codehub.devcloud.cn-north-7.ulanqab.huawei.com/0213yjw100001/0213yjw1-android.git", "ssh_git_url" : "git@codehub.devcloud.cn-north-7.ulanqab.huawei.com:0213yjw100001/0213yjw1-android.git", "web_url" : "", "repo_name" : "0213yjw1-android", "alias" : "" } } ], "definition" : "{\"stages\":[{\"id\":1698151278179,\"identifier\":\"169815127817987dd9f1d-7821-46e4-89be-2a95b01b0533\",\"run_always\":false,\"name\":\"阶段_1\",\"sequence\":\"0\",\"jobs\":[{\"id\":\"\",\"stage_id\":1698151278179,\"identifier\":\"1698151278179f6548479-2eaf-420a-92a4-92d9a711c51b\",\"name\":\"新建任务\",\"depends_on\":[],\"timeout\":\"\",\"timeout_unit\":\"\",\"steps\":[],\"exec_type\":\"AGENTLESS_JOB\",\"sequence\":0}],\"rule_templates\":[],\"pre\":[{\"task\":\"official_devcloud_autoTrigger\",\"sequence\":0}],\"post\":[],\"depends_on\":[]}]}" }
  • URI GET /v3/templates 表1 Query参数 参数 是否必选 参数类型 描述 template_type 是 String 模板类型 is_build_in 是 String 是否内置模板 offset 否 Integer 偏移量,表示从此偏移量开始查询,offset大于等于0 limit 否 Integer 每页显示的条目数量 name 否 String 模板名称,匹配规则为模糊匹配 sort 否 String 排序字段 asc 否 String 是否正序
  • 请求参数 表2 请求Header参数 参数 是否必选 参数类型 描述 X-Auth-Token 是 String 用户Token。 通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。 表3 请求Body参数 参数 是否必选 参数类型 描述 plugin_name 否 String 插件名 version 否 String 版本 publisher_unique_id 否 String 发布商ID
  • 请求示例 POST https://{endpoint}/v1/ce8df55870164338a72d7e828a966a2a/agent-plugin/publish-plugin-bind { "plugin_name" : "basic_plugin", "version" : "", "publisher_unique_id" : "b9fc8fb6d9194536ac66dd74c2212126" }
  • URI GET /v3/pipelines/build-result 表1 Query参数 参数 是否必选 参数类型 描述 project_id 是 String 项目id start_date 是 String 起始日期,起始日期和结束日期间隔不超过一个月,查询包含起始日期 end_date 是 String 结束日期,起始日期和结束日期间隔不超过一个月,查询包含结束日期 offset 是 Integer 偏移量,表示从此偏移量开始查询,offset大于等于0 limit 是 Integer 每次查询的条目数量
  • 响应示例 状态码: 200 OK { "offset" : 0, "limit" : 10, "total" : 29, "build_results" : [ { "status" : "completed", "outcome" : "success", "pipeline_id" : "fbe06e5655764f049f4d988bd2941279", "pipeline_name" : "接口测试流水线_YN96I241", "build_id" : "12", "start_time" : "2021-08-10 00:00:01", "end_time" : "2021-08-10 00:00:02", "elapse_time" : "917" } ] }
  • 响应参数 状态码: 200 表3 响应Body参数 参数 参数类型 描述 offset Integer 偏移量,表示从此偏移量开始查询,offset大于等于0 limit Integer 每次查询的条目数量 total Integer 总条目数量 build_results Array of PipelineBuildResult objects 执行状况数据列表 表4 PipelineBuildResult 参数 参数类型 描述 build_id String 流水线执行ID elapse_time String 运行耗时,单位为毫秒 end_time String 执行结束时间 outcome String 运行结果。取值及含义:success:成功;error:失败;aborted:终止 pipeline_id String 流水线id pipeline_name String 流水线名称 start_time String 执行开始时间 status String 运行状态。取值及含义:waiting:等待中;running:运行中;verifying:待审核;suspending:挂起;completed:执行完成 状态码: 400 表5 响应Body参数 参数 参数类型 描述 error_msg String 错误信息 error_code String 错误码
  • 请求示例 POST https://{endpoint}/v1/ce8df55870164338a72d7e828a966a2a/agent-plugin/edit-draft { "plugin_name" : "apie_test", "display_name" : "apie_test", "business_type" : "Normal", "description" : "", "maintainers" : "", "business_type_display_name" : "通用", "icon_url" : "", "version" : "0.0.1", "version_description" : "", "input_info" : [ ], "execution_info" : { "inner_execution_info" : { "execution_type" : "COMPOSITE", "steps" : [ { "task" : "official_shell_plugin", "name" : "执行Shell", "identifier" : "16993543005962cb6e5e8-458a-4382-adfe-9702345ecddb", "variables" : { "OFFICIAL_SHELL_SCRIPT_INPUT" : "env" } } ] } }, "runtime_attribution" : "agent" }
  • 请求参数 表2 请求Header参数 参数 是否必选 参数类型 描述 X-Auth-Token 是 String 用户Token。 通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。 表3 请求Body参数 参数 是否必选 参数类型 描述 unique_id 否 String 唯一ID icon_url 否 String 图标URL runtime_attribution 否 String 运行属性 plugin_name 否 String 插件名 display_name 否 String 展示名 business_type 否 String 业务类型 business_type_display_name 否 String 业务类型展示名 description 否 String 描述 is_private 否 Integer 是否私有 region 否 String 局点 maintainers 否 String 维护者 version 否 String 版本号 version_description 否 String 版本号说明 execution_info 否 execution_info object 执行信息 input_info 否 Array of input_info objects 输入信息 表4 execution_info 参数 是否必选 参数类型 描述 inner_execution_info 否 Object 执行信息 表5 input_info 参数 是否必选 参数类型 描述 name 否 String 名称 default_value 否 String 默认值 type 否 String 输入类型 validation 否 String 验证 layout_content 否 String 样式信息
  • 响应示例 状态码: 200 请求成功 { "id" : "865b4c2d616b46ab890fff056a6f7e05", "type" : "Build", "name" : "新建规则-20231020103003", "version" : "e2db2a63b3064252874b1b5a8571e2be", "plugin_id" : "official_devcloud_cloudBuild", "plugin_name" : "official_devcloud_cloudBuild", "plugin_version" : "0.0.15", "content" : [ { "group_name" : "MavenUnitTest", "can_modify_when_inherit" : true, "properties" : [ { "key" : "build.PassRatio", "type" : "judge", "name" : "PassRatio", "value_type" : "float", "value" : "0.1", "operator" : "=" }, { "key" : "build.TotalCases", "type" : "judge", "name" : "TotalCases", "value_type" : "float", "value" : "0.1", "operator" : "=" }, { "key" : "build.CoverageRatio", "type" : "judge", "name" : "CoverageRatio", "value_type" : "float", "value" : "0.1", "operator" : "=" } ] } ], "creator" : "847a5317086c41798469d0868535943a", "create_time" : "2023-10-20T10:30:20", "updater" : "847a5317086c41798469d0868535943a", "update_time" : "2023-10-20T10:30:20" }
  • 响应参数 状态码: 200 表3 响应Body参数 参数 参数类型 描述 id String 规则ID type String 规则类型 name String 规则名称 version String 规则版本 layout_content String 布局内容 plugin_id String 插件ID plugin_name String 插件名称 plugin_version String 插件版本号 creator String 创建人 create_time String 创建时间 updater String 更新人 update_time String 更新时间 content Array of RuleContent objects 规则属性列表 表4 RuleContent 参数 参数类型 描述 group_name String 分组名称 can_modify_when_inherit Boolean 继承后的子策略是否可以修改阈值 properties Array of RuleProperty objects 规则属性列表 表5 RuleProperty 参数 参数类型 描述 key String 属性键 type String 类型 name String 展示名称 operator String 比较运算符 value String 属性值 value_type String 数据类型 状态码: 400 表6 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述 状态码: 401 表7 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述 状态码: 403 表8 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述 状态码: 404 表9 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述
  • 响应示例 状态码: 200 OK { "full_stage_plugins_item_list" : [ { "plugins_list" : [ { "unique_id" : "47d48e84-8a98-4ad1-8bc0-59c112a05c5b", "display_name" : "CloudBuild", "plugin_name" : "official_devcloud_cloudBuild", "disabled" : false, "group_name" : null, "group_type" : null, "plugin_attribution" : "official", "plugin_composition_type" : "single", "runtime_attribution" : "agent", "all_steps" : null, "description" : "CloudBuild capabilities can be called on the pipeline for building.CloudBuild provides an easy-to-use, cloud-based build platform that supports multiple programming languages, helping you achieve continuous delivery, with shorter delivery period and higher delivery efficiency. With CloudBuild, you can create, configure, and run build tasks with a few clicks. CloudBuild also supports automation of code retrieval, building, and packaging, as well as real-time status monitoring.", "version_attribution" : "formal", "icon_url" : "/api/v1/*/common/get-plugin-icon?object_key=official_devcloud_cloudBuild-d81c87f9977d4923a546d067a0001914-构建.png-ce8df55870164338a72d7e828a966a2a", "multi_step_editable" : 0, "standard" : true } ], "display_name" : "构建", "business_type" : "Build", "unique_id" : "f44ca008-ae9b-45ee-905d-711429382c71", "conditions" : null, "addables" : null, "editable" : false, "removable" : false, "cloneable" : false, "disabled" : false } ] }
  • 响应参数 状态码: 200 表4 响应Body参数 参数 参数类型 描述 full_stage_plugins_item_list Array of full_stage_plugins_item_list objects 结果集 表5 full_stage_plugins_item_list 参数 参数类型 描述 plugins_list Array of plugins_list objects 插件列表 display_name String 展示名 business_type String 业务类型 unique_id String 唯一ID conditions Array of strings 条件 addables Array of addables objects 额外属性 editable Boolean 是否可编辑 removable Boolean 是否可移除 cloneable Boolean 是否可复制 disabled Boolean 禁用 表6 plugins_list 参数 参数类型 描述 unique_id String 唯一ID display_name String 展示名 plugin_name String 插件名 disabled Boolean 禁用 group_name String 组名 group_type String 组类型 plugin_attribution String 插件属性 plugin_composition_type String 组合插件 runtime_attribution String 运行属性 all_steps Array of all_steps objects 基础插件列表 description String 描述 version_attribution String 版本属性 icon_url String 图标URL multi_step_editable Integer 是否可编辑 standard Boolean 标准 表7 all_steps 参数 参数类型 描述 plugin_name String 插件名 display_name String 展示名 version String 版本 表8 addables 参数 参数类型 描述 additionalProp1 Boolean 额外属性1 additionalProp2 Boolean 额外属性2 additionalProp3 Boolean 额外属性3 状态码: 400 表9 响应Body参数 参数 参数类型 描述 error_msg String 错误信息 error_code String 错误码
  • 请求参数 表2 请求Header参数 参数 是否必选 参数类型 描述 X-Auth-Token 是 String 用户Token。 通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。 表3 请求Body参数 参数 是否必选 参数类型 描述 use_condition 否 String 用于区分插件为流水线可使用/模板可使用 comp_id 否 String 微服务ID comp_name 否 String 微服务名 cloud_id 否 String 局点ID strategy_id 否 String 策略ID category 否 String 流水线类型 publish_tab 否 String 是否发布流水线 platform 否 String 部署平台 comp_extend_type 否 String 组件类型 deploy_type 否 String 部署类型
  • 请求参数 表2 请求Header参数 参数 是否必选 参数类型 描述 X-Auth-Token 是 String 用户Token。 通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。 表3 请求Body参数 参数 是否必选 参数类型 描述 unique_id 否 String 唯一ID icon_url 否 String 图标URL runtime_attribution 否 String 运行属性 plugin_name 否 String 插件名 display_name 否 String 展示名 business_type 否 String 业务类型 business_type_display_name 否 String 业务类型展示名 description 否 String 描述 is_private 否 Integer 是否私有 region 否 String 局点 maintainers 否 String 维护者 plugin_composition_type 否 String 组合插件类型
  • 请求示例 POST https://{endpoint}/v1/ce8df55870164338a72d7e828a966a2a/agent-plugin/update-info { "plugin_name" : "apie_test", "display_name" : "apie_test", "business_type" : "Normal", "description" : "1111", "maintainers" : "", "business_type_display_name" : "通用", "icon_url" : "" }
  • 请求示例 POST https://{endpoint}/v3/ce8df55870164338a72d7e828a966a2a/extension/info/update { "plugin_name" : "basic_plugin", "display_name" : "basic_plugin", "business_type" : "Normal", "description" : "", "maintainers" : "", "business_type_display_name" : "通用", "icon_url" : "" }
  • 请求参数 表2 请求Header参数 参数 是否必选 参数类型 描述 X-Auth-Token 是 String 用户Token。 通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。 表3 请求Body参数 参数 是否必选 参数类型 描述 unique_id 否 String 唯一ID icon_url 否 String 图标URL runtime_attribution 否 String 运行属性 plugin_name 否 String 插件名 display_name 否 String 展示名 business_type 否 String 业务类型 business_type_display_name 否 String 业务类型展示名 description 否 String 描述 is_private 否 Integer 是否私有 region 否 String 局点 maintainers 否 String 维护者 plugin_composition_type 否 String 组合插件类型
  • 响应示例 状态码: 200 OK { "offset" : 0, "limit" : 3, "total" : 32, "data" : [ { "plugin_name" : "basic_plugin", "display_name" : "basic_plugin", "version" : "", "version_description" : null, "description" : "", "version_attribution" : "init", "unique_id" : "83edd75a8be5406496d9fc63ce6c984e", "op_user" : "devcloud_devcloud_h00485561_01", "op_time" : "1699355741000", "plugin_composition_type" : "single", "plugin_attribution" : "custom", "workspace_id" : "ce8df55870164338a72d7e828a966a2a", "business_type" : "Normal", "business_type_display_name" : "通用", "maintainers" : "", "icon_url" : "", "refer_count" : null, "usage_count" : null, "runtime_attribution" : "agent", "active" : 1 }, { "plugin_name" : "apie_test", "display_name" : "apie_test", "version" : "0.0.2", "version_description" : "", "description" : "", "version_attribution" : "formal", "unique_id" : "8287cdb4908741f889ed307d265677d1", "op_user" : "devcloud_devcloud_h00485561_01", "op_time" : "1699354371000", "plugin_composition_type" : "multi", "plugin_attribution" : "custom", "workspace_id" : "ce8df55870164338a72d7e828a966a2a", "business_type" : "Normal", "business_type_display_name" : "通用", "maintainers" : "", "icon_url" : "", "refer_count" : 0, "usage_count" : null, "runtime_attribution" : "agent", "active" : 0 }, { "plugin_name" : "asdasadsas", "display_name" : "dasddasas", "version" : "", "version_description" : null, "description" : "", "version_attribution" : "init", "unique_id" : "4fccd9e61c424d1298cc9e5f71e7c9e7", "op_user" : "devcloud_devcloud_h00485561_01", "op_time" : "1699325617000", "plugin_composition_type" : "single", "plugin_attribution" : "custom", "workspace_id" : "ce8df55870164338a72d7e828a966a2a", "business_type" : "Gate", "business_type_display_name" : "代码检查", "maintainers" : "", "icon_url" : "", "refer_count" : null, "usage_count" : null, "runtime_attribution" : "agent", "active" : 1 } ] }
  • 请求示例 POST https://{endpoint}/v1/ce8df55870164338a72d7e828a966a2a/agent-plugin/query-all?offset=0&limit=3 { "plugin_name" : "", "maintainer" : "", "business_type" : [ "Build", "Gate", "Deploy", "Test", "Normal" ], "plugin_attribution" : "custom" }
  • 响应参数 状态码: 200 表5 响应Body参数 参数 参数类型 描述 offset Integer 偏移 limit Integer 大小 total Integer 总数 data Array of PluginBasicVO objects 结果集 表6 PluginBasicVO 参数 参数类型 描述 plugin_name String 插件名 display_name String 展示名 version String 版本 version_description String 版本说明 description String 描述 version_attribution String 版本属性 unique_id String 唯一ID op_user String 操作人 op_time String 操作时间 plugin_composition_type String 组合类型 plugin_attribution String 属性 workspace_id String 租户ID business_type String 业务类型 business_type_display_name String 业务类型展示名 maintainers String 维护者 icon_url String 图标URL refer_count Integer 引用次数 usage_count Integer 使用次数 runtime_attribution String 运行属性 active Integer 是否激活 状态码: 400 表7 响应Body参数 参数 参数类型 描述 error_msg String 错误信息 error_code String 错误码
共100000条