diff options
author | Grzegorz Bizon <grzegorz@gitlab.com> | 2016-02-19 20:04:07 +0300 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2016-02-19 20:22:49 +0300 |
commit | 62067b74c826ed3ac527b8e139e5d4f8976cd710 (patch) | |
tree | 567ae70f077587d847135b884b9d198a06f0583c /doc | |
parent | 64f1bab66ebbf4c7c09c3499b1c31179df273516 (diff) |
Merge branch 'ci/remove-builds' into 'master'
Make it possible to erase build content (artifacts, trace)
This feature makes it possible to remove build content - build artifacts and build traces.
- [x] Remove artifacts
- [x] Remove metadata
- [x] Remove build traces
- [x] Wait for https://dev.gitlab.org/gitlab/gitlabhq/merge_requests/1942 this to be merged
- [x] Fix the permissions after the merge
Closes #3421
See merge request !2560
Diffstat (limited to 'doc')
-rw-r--r-- | doc/api/builds.md | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/doc/api/builds.md b/doc/api/builds.md index 43edb40e911..6977dedfa9e 100644 --- a/doc/api/builds.md +++ b/doc/api/builds.md @@ -338,3 +338,53 @@ Example of response "user": null } ``` + +## Erase a build + +Erase a single build of a project (remove build artifacts and a build trace) + +``` +POST /projects/:id/builds/:build_id/erase +``` + +Parameters + +| Attribute | Type | required | Description | +|-------------|---------|----------|---------------------| +| `id` | integer | yes | The ID of a project | +| `build_id` | integer | yes | The ID of a build | + +Example of request + +``` +curl -X POST -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/1/builds/1/erase" +``` + +Example of response + +```json +{ + "commit": { + "author_email": "admin@example.com", + "author_name": "Administrator", + "created_at": "2015-12-24T16:51:14.000+01:00", + "id": "0ff3ae198f8601a285adcf5c0fff204ee6fba5fd", + "message": "Test the CI integration.", + "short_id": "0ff3ae19", + "title": "Test the CI integration." + }, + "coverage": null, + "download_url": null, + "id": 69, + "name": "rubocop", + "ref": "master", + "runner": null, + "stage": "test", + "created_at": "2016-01-11T10:13:33.506Z", + "started_at": "2016-01-11T10:13:33.506Z", + "finished_at": "2016-01-11T10:15:10.506Z", + "status": "failed", + "tag": false, + "user": null +} +``` |