版本管理之gitlab实践教程:基础篇(15) gitlab升级之v3 -> v4
·
背景说明:关于gitlab的api版本,由于11.0中已经不再支持v3,所以版本升上来的时候如果有使用gitlab api进行整合的部分则需要进行确认变更内容,这篇文章整理一下从稳定的8.12版本之后相关的一些升级内容。
变更点整理
| 版本 | 变化内容 |
|---|---|
| 8.17 | GET /projects/:search ->GET /projects?search=x |
| 8.17 | GET /projects/:id/issues中不再有iid过滤器 |
| 8.17 | GET /projects/:id/merge_requests?iid[]=x&iid[]=y 数组方式重命名为iids |
| 8.17 | GET /projects/merge_request/:id -> GET /projects/merge_requests/:id |
| 8.17 | project snippets api(比如可以用GET /projects/:id/snippets获取信息)中不再返回expires_at |
| 8.17 | GET /projects/:id/keys -> GET /projects/:id/deploy_keys |
| 9.0 | POST /projects/:id/members操作在成员存在是返回409,之前返回201 |
| 9.0 | DELETE /projects/:id/star -> POST /projects/:id/unstar |
| 9.0 | deprecated: /licences |
| 9.0 | deprecated: /licences/:key |
| 9.0 | deprecated: /gitignores |
| 9.0 | deprecated: /gitlab_ci_ymls |
| 9.0 | deprecated: /dockerfiles |
| 9.0 | deprecated: /gitignores/:key |
| 9.0 | deprecated: /gitlab_ci_ymls/:key |
| 9.0 | deprecated: /dockerfiles/:key |
| 9.0 | POST /projects/fork/:id -> POST /projects/:id/fork |
| 9.0 | DELETE /todos -> POST /todos/mark_as_done |
| 9.0 | DELETE /todos/:todo_id -> POST /todos/:todo_id/mark_as_done |
| 9.0 | GET /projects/foo -> GET /projects?foo=true |
| 9.0 | GET /projects/visible & GET /projects/all -> GET /projects |
| 9.0 | GET /projects/owned -> GET /projects?owned=true |
| 9.0 | GET /projects/starred -> GET /projects?starred=true |
| 9.0 | GET /projects 动作发生变化,返回对于当前用户可见的所有项目,即使此用户不是改项目的成员 |
| 9.0 | 使用GET /projects?membership=true获取成员归属的项目信息 |
| 9.0 | 新增:POST /environments/:environment_id/stop 停止指定环境 |
| 9.0 | DELETE /projects/:id/deploy_keys/:key_id/disable -> DELETE /projects/:id/deploy_keys/:key_id |
| 9.0 | PUT /users/:id/(block |
| 9.0 | 规范化: POST /projects/:id/:subscribable_type/:subscribable_id/subscribe 用于对于资源的订阅 |
| 9.0 | 规范化: POST /projects/:id/:subscribable_type/:subscribable_id/unsubscribe 取消对于资源的订阅 |
| 9.0 | GET /projects/:id/issues 与 GET /issues 返回包含所有lable的issue,逻辑上是与的关系而不是或 |
| 9.0 | POST /projects/:id/repository/branches 参数名更改:branch_name -> branch |
| 9.0 | POST /projects/:id/repository/commits 参数名更改:branch_name -> branch |
| 9.0 | POST/PUT/DELETE :id/repository/files 参数名更改:branch_name -> branch |
| 9.0 | PUT /projects/:id/merge_requests/:merge_request_id/merge 参数变化: merge_when_build_succeeds -> merge_when_pipeline_succeeds |
| 9.0 | POST /projects/:id/merge_requests/:merge_request_id/cancel_merge_when_pipeline_succeeds 参数变化: merge_when_build_succeeds -> merge_when_pipeline_succeeds 参数变化: merge_when_build_succeeds -> merge_when_pipeline_succeeds |
| 9.0 | POST /projects 参数变化: merge_when_build_succeeds -> merge_when_pipeline_succeeds |
| 9.0 | POST /projects/user/:user_id 参数变化: merge_when_build_succeeds -> merge_when_pipeline_succeeds |
| 9.0 | PUT /projects/:id 参数变化: merge_when_build_succeeds -> merge_when_pipeline_succeeds |
| 9.0 | DELETE /projects/:id/repository/branches/:branch 参数变化 branch_name -> branch |
| 9.0 | 从返回的issue或者merge request中删除subscribed字段,在单个issue或者merge request中包含subscribed |
| 9.0 | visibility 作为字符串而不是integer类型使用 |
| 9.0 | deprecated信息upvote 和 downvote 不再返回 |
| 9.0 | 所有创建或者更新成员信息的验证信息失败的情况返回HTTP 400而不是有时返回422 |
| 9.0 | GET /groups/owned -> GET /groups?owned=true |
| 9.0 | V4 API (DELETE /projects/:id/repository/merged_branches 和 DELETE /projects/:id)返回JSON和202 |
| 9.0 | GET /projects/:id/milestones?iid[]=x&iid[]=y 中数组过滤器改名为iids |
| 9.0 | GET /projects/:id/pipelines 返回pipeline的基本信息 |
| 9.0 | 删除 GET /projects/:id/repository/commits/:sha/jobs !9463 |
| 9.0 | POST /projects/:id/trigger/builds -> POST /projects/:id/trigger/pipeline (Build Triggers -> Pipeline Triggers ) |
| 9.0 | 使用POST /projects/:id/triggers创建新的trigger需要使用description信息 |
| 9.0 | merge request 中IDs -> IIDs |
| 9.0 | GET /projects/:id/repository/commits 初始化页面值0 -> 1 |
| 9.0 | GET /projects/:id/repository/files?file_path=:file_path -> GET /projects/:id/repository/files/:file_path (:file_path should be URL-encoded) |
| 9.0 | GET /projects/:id/repository/blobs/:sha 改为返回由:sha指定的blob相关的JSON属性 |
| 9.0 | GET /projects/:id/repository/commits/:sha/blob?file_path=:file_path 与 GET /projects/:id/repository/blobs/:sha?file_path=:file_path -> GET /projects/:id/repository/files/:file_path/raw?ref=:sha |
| 9.0 | GET /projects/:id/repository/tree 参数统一: ref_name -> ref |
| 9.0 | POST /users 参数变化confirm -> skip_confirmation |
参考内容
更多推荐


所有评论(0)