summaryrefslogtreecommitdiff
path: root/doc/api
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2016-11-21 11:30:23 +0000
committerRémy Coutable <remy@rymai.me>2016-11-21 11:30:23 +0000
commitc99522f21eed933f6a6b7214ea659e3ab13ef188 (patch)
tree782908e4dcd1f33468e583d4e2d56a3aab2706b9 /doc/api
parentb98193c55edc94b3ecf1ff143ac85fa9e9d8f029 (diff)
parentfbfc7523cb0119ac3a0d02cd04dc12e453ad3ad6 (diff)
downloadgitlab-ce-c99522f21eed933f6a6b7214ea659e3ab13ef188.tar.gz
Merge branch 'create-pipeline-endpoint' into 'master'
Add API endpoint for creating a pipeline Fixes #23468 See merge request !7209
Diffstat (limited to 'doc/api')
-rw-r--r--doc/api/pipelines.md46
1 files changed, 46 insertions, 0 deletions
diff --git a/doc/api/pipelines.md b/doc/api/pipelines.md
index a29b3eb6f44..6455c333faf 100644
--- a/doc/api/pipelines.md
+++ b/doc/api/pipelines.md
@@ -114,6 +114,51 @@ Example of response
}
```
+## Create a new pipeline
+
+> [Introduced][ce-7209] in GitLab 8.14
+
+```
+POST /projects/:id/pipeline
+```
+
+| Attribute | Type | Required | Description |
+|------------|---------|----------|---------------------|
+| `id` | integer | yes | The ID of a project |
+| `ref` | string | yes | Reference to commit |
+
+```
+curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/1/pipeline?ref=master"
+```
+
+Example of response
+
+```json
+{
+ "id": 61,
+ "sha": "384c444e840a515b23f21915ee5766b87068a70d",
+ "ref": "master",
+ "status": "pending",
+ "before_sha": "0000000000000000000000000000000000000000",
+ "tag": false,
+ "yaml_errors": null,
+ "user": {
+ "name": "Administrator",
+ "username": "root",
+ "id": 1,
+ "state": "active",
+ "avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon",
+ "web_url": "http://localhost:3000/root"
+ },
+ "created_at": "2016-11-04T09:36:13.747Z",
+ "updated_at": "2016-11-04T09:36:13.977Z",
+ "started_at": null,
+ "finished_at": null,
+ "committed_at": null,
+ "duration": null
+}
+```
+
## Retry failed builds in a pipeline
> [Introduced][ce-5837] in GitLab 8.11
@@ -205,3 +250,4 @@ Response:
```
[ce-5837]: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5837
+[ce-7209]: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/7209