Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Jérome Perrin
gitlab-ce
Commits
182e2814
Commit
182e2814
authored
Aug 16, 2016
by
Z.J. van de Weg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Docs for API endpoints
parent
39c71a19
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
431 additions
and
0 deletions
+431
-0
doc/api/builds.md
doc/api/builds.md
+46
-0
doc/api/deployments.md
doc/api/deployments.md
+384
-0
spec/requests/api/deployments_spec.rb
spec/requests/api/deployments_spec.rb
+1
-0
No files found.
doc/api/builds.md
View file @
182e2814
...
...
@@ -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
}
```
doc/api/deployments.md
0 → 100644
View file @
182e2814
This diff is collapsed.
Click to expand it.
spec/requests/api/deployments_spec.rb
View file @
182e2814
...
...
@@ -45,6 +45,7 @@ describe API::API, api: true do
expect
(
response
).
to
have_http_status
(
200
)
expect
(
json_response
[
'sha'
]).
to
match
/\A\h{40}\z/
expect
(
json_response
[
'id'
]).
to
eq
(
deployment
.
id
)
end
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment