summaryrefslogtreecommitdiff
path: root/doc/api/builds.md
diff options
context:
space:
mode:
authorZ.J. van de Weg <zegerjan@gitlab.com>2016-08-16 10:11:32 +0200
committerZ.J. van de Weg <zegerjan@gitlab.com>2016-08-18 21:10:52 +0200
commit182e28141d2e1ac904590a431ed7249d4c20984b (patch)
treebbba1ca3f6821a1bc94dbd442647731b14fb09dc /doc/api/builds.md
parent39c71a19c468736a94f642173a54bf72b2dc1689 (diff)
downloadgitlab-ce-182e28141d2e1ac904590a431ed7249d4c20984b.tar.gz
Docs for API endpoints
Diffstat (limited to 'doc/api/builds.md')
-rw-r--r--doc/api/builds.md46
1 files changed, 46 insertions, 0 deletions
diff --git a/doc/api/builds.md b/doc/api/builds.md
index 8864df03c98..dce666445d0 100644
--- a/doc/api/builds.md
+++ b/doc/api/builds.md
@@ -532,3 +532,49 @@ Example response:
"user": null
}
```
+
+## Play a build
+
+Triggers a manual action to start a build.
+
+```
+POST /projects/:id/builds/:build_id/play
+```
+
+| Attribute | Type | Required | Description |
+|------------|---------|----------|---------------------|
+| `id` | integer | yes | The ID of a project |
+| `build_id` | integer | yes | The ID of a build |
+
+```
+curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/1/builds/1/play"
+```
+
+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,
+ "created_at": "2016-01-11T10:13:33.506Z",
+ "artifacts_file": null,
+ "finished_at": null,
+ "id": 69,
+ "name": "rubocop",
+ "ref": "master",
+ "runner": null,
+ "stage": "test",
+ "started_at": null,
+ "status": "started",
+ "tag": false,
+ "user": null
+}
+```