diff options
author | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-02-08 22:32:36 +0100 |
---|---|---|
committer | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-02-19 18:30:13 +0100 |
commit | 921cfb66e617156517761b3f294f58c81db55dea (patch) | |
tree | 0580e40ca8dcbdb94db6b6b0d460bb4e0443acc6 /doc/api/builds.md | |
parent | 96158aa6b377d6f683d560689562293c36e05002 (diff) | |
download | gitlab-ce-921cfb66e617156517761b3f294f58c81db55dea.tar.gz |
Introduce API for serving the artifacts archive
Diffstat (limited to 'doc/api/builds.md')
-rw-r--r-- | doc/api/builds.md | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/doc/api/builds.md b/doc/api/builds.md index 6977dedfa9e..295e037df5f 100644 --- a/doc/api/builds.md +++ b/doc/api/builds.md @@ -34,6 +34,10 @@ Example of response "coverage": null, "created_at": "2015-12-24T15:51:21.802Z", "download_url": null, + "artifacts_file": { + "filename": "artifacts.zip", + "size": 1000 + }, "finished_at": "2015-12-24T17:54:27.895Z", "id": 7, "name": "teaspoon", @@ -72,6 +76,7 @@ Example of response "coverage": null, "created_at": "2015-12-24T15:51:21.727Z", "download_url": null, + "artifacts_file": null, "finished_at": "2015-12-24T17:54:24.921Z", "id": 6, "name": "spinach:other", @@ -135,6 +140,7 @@ Example of response "coverage": null, "created_at": "2016-01-11T10:13:33.506Z", "download_url": null, + "artifacts_file": null, "finished_at": "2016-01-11T10:14:09.526Z", "id": 69, "name": "rubocop", @@ -159,6 +165,7 @@ Example of response "coverage": null, "created_at": "2015-12-24T15:51:21.957Z", "download_url": null, + "artifacts_file": null, "finished_at": "2015-12-24T17:54:33.913Z", "id": 9, "name": "brakeman", @@ -220,6 +227,7 @@ Example of response "coverage": null, "created_at": "2015-12-24T15:51:21.880Z", "download_url": null, + "artifacts_file": null, "finished_at": "2015-12-24T17:54:31.198Z", "id": 8, "name": "rubocop", @@ -247,6 +255,35 @@ Example of response } ``` +## Get a build artifacts + +Get a build artifacts of a project + +``` +GET /projects/:id/builds/:build_id/artifacts +``` + +### 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 -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/1/builds/8" +``` + +### Response: + + +| Status | Description | +|-----------|---------------------------------| +| 200 | Serves the artifacts file | +| 404 | Build not found or no artifacts | + ## Cancel a build Cancel a single build of a project @@ -280,6 +317,7 @@ Example of response "coverage": null, "created_at": "2016-01-11T10:13:33.506Z", "download_url": null, + "artifacts_file": null, "finished_at": "2016-01-11T10:14:09.526Z", "id": 69, "name": "rubocop", @@ -326,6 +364,7 @@ Example of response "coverage": null, "created_at": "2016-01-11T10:13:33.506Z", "download_url": null, + "artifacts_file": null, "finished_at": null, "id": 69, "name": "rubocop", |