summaryrefslogtreecommitdiff
path: root/doc/api/builds.md
diff options
context:
space:
mode:
authorKamil Trzcinski <ayufan@ayufan.eu>2016-06-10 17:11:27 +0200
committerPhil Hughes <me@iamphill.com>2016-06-13 11:07:23 +0100
commit6013768fec33e3bf084019d97dbfb7cca78f8e82 (patch)
tree6d79ea67c7ea8bdae03f0cdfd958b6586b817dd6 /doc/api/builds.md
parent7e9273dd946f46b2b2bcc0a751316dc704089a16 (diff)
downloadgitlab-ce-6013768fec33e3bf084019d97dbfb7cca78f8e82.tar.gz
Added keep artifacts API endpoint
Diffstat (limited to 'doc/api/builds.md')
-rw-r--r--doc/api/builds.md50
1 files changed, 50 insertions, 0 deletions
diff --git a/doc/api/builds.md b/doc/api/builds.md
index 5669bd0cdda..0f9f4e99ea2 100644
--- a/doc/api/builds.md
+++ b/doc/api/builds.md
@@ -443,3 +443,53 @@ Example of response
"user": null
}
```
+
+## Keep artifacts
+
+Prevents artifacts from being deleted when expiration is set
+
+```
+POST /projects/:id/builds/:build_id/artifacts/keep
+```
+
+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/artifacts/keep"
+```
+
+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
+}
+```