@templmf/temp-solf-lmf 0.0.109 → 0.0.110
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package//347/247/273/345/212/250/345/272/224/347/224/250/351/235/236/347/256/241/347/220/206/345/221/230/351/205/215/347/275/256/350/247/222/350/211/262/346/270/205/345/215/225.xlsx +0 -0
- package/gitlab-foss-8-17-stable/doc/api/README.md +0 -391
- package/gitlab-foss-8-17-stable/doc/api/access_requests.md +0 -139
- package/gitlab-foss-8-17-stable/doc/api/award_emoji.md +0 -374
- package/gitlab-foss-8-17-stable/doc/api/boards.md +0 -241
- package/gitlab-foss-8-17-stable/doc/api/branches.md +0 -260
- package/gitlab-foss-8-17-stable/doc/api/broadcast_messages.md +0 -154
- package/gitlab-foss-8-17-stable/doc/api/build_triggers.md +0 -118
- package/gitlab-foss-8-17-stable/doc/api/build_variables.md +0 -128
- package/gitlab-foss-8-17-stable/doc/api/builds.md +0 -610
- package/gitlab-foss-8-17-stable/doc/api/ci/README.md +0 -24
- package/gitlab-foss-8-17-stable/doc/api/ci/builds.md +0 -147
- package/gitlab-foss-8-17-stable/doc/api/ci/lint.md +0 -49
- package/gitlab-foss-8-17-stable/doc/api/ci/runners.md +0 -59
- package/gitlab-foss-8-17-stable/doc/api/commits.md +0 -479
- package/gitlab-foss-8-17-stable/doc/api/deploy_key_multiple_projects.md +0 -29
- package/gitlab-foss-8-17-stable/doc/api/deploy_keys.md +0 -216
- package/gitlab-foss-8-17-stable/doc/api/deployments.md +0 -218
- package/gitlab-foss-8-17-stable/doc/api/enviroments.md +0 -121
- package/gitlab-foss-8-17-stable/doc/api/groups.md +0 -484
- package/gitlab-foss-8-17-stable/doc/api/issues.md +0 -856
- package/gitlab-foss-8-17-stable/doc/api/keys.md +0 -46
- package/gitlab-foss-8-17-stable/doc/api/labels.md +0 -257
- package/gitlab-foss-8-17-stable/doc/api/members.md +0 -175
- package/gitlab-foss-8-17-stable/doc/api/merge_requests.md +0 -1158
- package/gitlab-foss-8-17-stable/doc/api/milestones.md +0 -105
- package/gitlab-foss-8-17-stable/doc/api/namespaces.md +0 -70
- package/gitlab-foss-8-17-stable/doc/api/notes.md +0 -407
- package/gitlab-foss-8-17-stable/doc/api/notification_settings.md +0 -177
- package/gitlab-foss-8-17-stable/doc/api/oauth2.md +0 -137
- package/gitlab-foss-8-17-stable/doc/api/pipelines.md +0 -259
- package/gitlab-foss-8-17-stable/doc/api/project_snippets.md +0 -118
- package/gitlab-foss-8-17-stable/doc/api/projects.md +0 -1402
- package/gitlab-foss-8-17-stable/doc/api/repositories.md +0 -200
- package/gitlab-foss-8-17-stable/doc/api/repository_files.md +0 -134
- package/gitlab-foss-8-17-stable/doc/api/runners.md +0 -322
- package/gitlab-foss-8-17-stable/doc/api/services.md +0 -812
- package/gitlab-foss-8-17-stable/doc/api/session.md +0 -56
- package/gitlab-foss-8-17-stable/doc/api/settings.md +0 -126
- package/gitlab-foss-8-17-stable/doc/api/sidekiq_metrics.md +0 -152
- package/gitlab-foss-8-17-stable/doc/api/snippets.md +0 -232
- package/gitlab-foss-8-17-stable/doc/api/system_hooks.md +0 -146
- package/gitlab-foss-8-17-stable/doc/api/tags.md +0 -191
- package/gitlab-foss-8-17-stable/doc/api/templates/gitignores.md +0 -579
- package/gitlab-foss-8-17-stable/doc/api/templates/gitlab_ci_ymls.md +0 -120
- package/gitlab-foss-8-17-stable/doc/api/templates/licenses.md +0 -147
- package/gitlab-foss-8-17-stable/doc/api/todos.md +0 -296
- package/gitlab-foss-8-17-stable/doc/api/users.md +0 -835
- package/gitlab-foss-8-17-stable/doc/api/v3_to_v4.md +0 -14
- package/gitlab-foss-8-17-stable/doc/api/version.md +0 -23
|
@@ -1,177 +0,0 @@
|
|
|
1
|
-
# Notification settings
|
|
2
|
-
|
|
3
|
-
>**Note:** This feature was [introduced][ce-5632] in GitLab 8.12.
|
|
4
|
-
|
|
5
|
-
**Valid notification levels**
|
|
6
|
-
|
|
7
|
-
The notification levels are defined in the `NotificationSetting.level` model enumeration. Currently, these levels are recognized:
|
|
8
|
-
|
|
9
|
-
```
|
|
10
|
-
disabled
|
|
11
|
-
participating
|
|
12
|
-
watch
|
|
13
|
-
global
|
|
14
|
-
mention
|
|
15
|
-
custom
|
|
16
|
-
```
|
|
17
|
-
|
|
18
|
-
If the `custom` level is used, specific email events can be controlled. Notification email events are defined in the `NotificationSetting::EMAIL_EVENTS` model variable. Currently, these events are recognized:
|
|
19
|
-
|
|
20
|
-
```
|
|
21
|
-
new_note
|
|
22
|
-
new_issue
|
|
23
|
-
reopen_issue
|
|
24
|
-
close_issue
|
|
25
|
-
reassign_issue
|
|
26
|
-
new_merge_request
|
|
27
|
-
reopen_merge_request
|
|
28
|
-
close_merge_request
|
|
29
|
-
reassign_merge_request
|
|
30
|
-
merge_merge_request
|
|
31
|
-
failed_pipeline
|
|
32
|
-
success_pipeline
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
## Global notification settings
|
|
36
|
-
|
|
37
|
-
Get current notification settings and email address.
|
|
38
|
-
|
|
39
|
-
```
|
|
40
|
-
GET /notification_settings
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
```bash
|
|
44
|
-
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/notification_settings
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
Example response:
|
|
48
|
-
|
|
49
|
-
```json
|
|
50
|
-
{
|
|
51
|
-
"level": "participating",
|
|
52
|
-
"notification_email": "admin@example.com"
|
|
53
|
-
}
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
## Update global notification settings
|
|
57
|
-
|
|
58
|
-
Update current notification settings and email address.
|
|
59
|
-
|
|
60
|
-
```
|
|
61
|
-
PUT /notification_settings
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
```bash
|
|
65
|
-
curl --request PUT --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/notification_settings?level=watch
|
|
66
|
-
```
|
|
67
|
-
|
|
68
|
-
| Attribute | Type | Required | Description |
|
|
69
|
-
| --------- | ---- | -------- | ----------- |
|
|
70
|
-
| `level` | string | no | The global notification level |
|
|
71
|
-
| `notification_email` | string | no | The email address to send notifications |
|
|
72
|
-
| `new_note` | boolean | no | Enable/disable this notification |
|
|
73
|
-
| `new_issue` | boolean | no | Enable/disable this notification |
|
|
74
|
-
| `reopen_issue` | boolean | no | Enable/disable this notification |
|
|
75
|
-
| `close_issue` | boolean | no | Enable/disable this notification |
|
|
76
|
-
| `reassign_issue` | boolean | no | Enable/disable this notification |
|
|
77
|
-
| `new_merge_request` | boolean | no | Enable/disable this notification |
|
|
78
|
-
| `reopen_merge_request` | boolean | no | Enable/disable this notification |
|
|
79
|
-
| `close_merge_request` | boolean | no | Enable/disable this notification |
|
|
80
|
-
| `reassign_merge_request` | boolean | no | Enable/disable this notification |
|
|
81
|
-
| `merge_merge_request` | boolean | no | Enable/disable this notification |
|
|
82
|
-
| `failed_pipeline` | boolean | no | Enable/disable this notification |
|
|
83
|
-
| `success_pipeline` | boolean | no | Enable/disable this notification |
|
|
84
|
-
|
|
85
|
-
Example response:
|
|
86
|
-
|
|
87
|
-
```json
|
|
88
|
-
{
|
|
89
|
-
"level": "watch",
|
|
90
|
-
"notification_email": "admin@example.com"
|
|
91
|
-
}
|
|
92
|
-
```
|
|
93
|
-
|
|
94
|
-
## Group / project level notification settings
|
|
95
|
-
|
|
96
|
-
Get current group or project notification settings.
|
|
97
|
-
|
|
98
|
-
```
|
|
99
|
-
GET /groups/:id/notification_settings
|
|
100
|
-
GET /projects/:id/notification_settings
|
|
101
|
-
```
|
|
102
|
-
|
|
103
|
-
```bash
|
|
104
|
-
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/groups/5/notification_settings
|
|
105
|
-
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/projects/8/notification_settings
|
|
106
|
-
```
|
|
107
|
-
|
|
108
|
-
| Attribute | Type | Required | Description |
|
|
109
|
-
| --------- | ---- | -------- | ----------- |
|
|
110
|
-
| `id` | integer/string | yes | The group/project ID or path |
|
|
111
|
-
|
|
112
|
-
Example response:
|
|
113
|
-
|
|
114
|
-
```json
|
|
115
|
-
{
|
|
116
|
-
"level": "global"
|
|
117
|
-
}
|
|
118
|
-
```
|
|
119
|
-
|
|
120
|
-
## Update group/project level notification settings
|
|
121
|
-
|
|
122
|
-
Update current group/project notification settings.
|
|
123
|
-
|
|
124
|
-
```
|
|
125
|
-
PUT /groups/:id/notification_settings
|
|
126
|
-
PUT /projects/:id/notification_settings
|
|
127
|
-
```
|
|
128
|
-
|
|
129
|
-
```bash
|
|
130
|
-
curl --request PUT --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/groups/5/notification_settings?level=watch
|
|
131
|
-
curl --request PUT --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/projects/8/notification_settings?level=custom&new_note=true
|
|
132
|
-
```
|
|
133
|
-
|
|
134
|
-
| Attribute | Type | Required | Description |
|
|
135
|
-
| --------- | ---- | -------- | ----------- |
|
|
136
|
-
| `id` | integer/string | yes | The group/project ID or path |
|
|
137
|
-
| `level` | string | no | The global notification level |
|
|
138
|
-
| `new_note` | boolean | no | Enable/disable this notification |
|
|
139
|
-
| `new_issue` | boolean | no | Enable/disable this notification |
|
|
140
|
-
| `reopen_issue` | boolean | no | Enable/disable this notification |
|
|
141
|
-
| `close_issue` | boolean | no | Enable/disable this notification |
|
|
142
|
-
| `reassign_issue` | boolean | no | Enable/disable this notification |
|
|
143
|
-
| `new_merge_request` | boolean | no | Enable/disable this notification |
|
|
144
|
-
| `reopen_merge_request` | boolean | no | Enable/disable this notification |
|
|
145
|
-
| `close_merge_request` | boolean | no | Enable/disable this notification |
|
|
146
|
-
| `reassign_merge_request` | boolean | no | Enable/disable this notification |
|
|
147
|
-
| `merge_merge_request` | boolean | no | Enable/disable this notification |
|
|
148
|
-
| `failed_pipeline` | boolean | no | Enable/disable this notification |
|
|
149
|
-
| `success_pipeline` | boolean | no | Enable/disable this notification |
|
|
150
|
-
|
|
151
|
-
Example responses:
|
|
152
|
-
|
|
153
|
-
```json
|
|
154
|
-
{
|
|
155
|
-
"level": "watch"
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
{
|
|
159
|
-
"level": "custom",
|
|
160
|
-
"events": {
|
|
161
|
-
"new_note": true,
|
|
162
|
-
"new_issue": false,
|
|
163
|
-
"reopen_issue": false,
|
|
164
|
-
"close_issue": false,
|
|
165
|
-
"reassign_issue": false,
|
|
166
|
-
"new_merge_request": false,
|
|
167
|
-
"reopen_merge_request": false,
|
|
168
|
-
"close_merge_request": false,
|
|
169
|
-
"reassign_merge_request": false,
|
|
170
|
-
"merge_merge_request": false,
|
|
171
|
-
"failed_pipeline": false,
|
|
172
|
-
"success_pipeline": false
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
```
|
|
176
|
-
|
|
177
|
-
[ce-5632]: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5632
|
|
@@ -1,137 +0,0 @@
|
|
|
1
|
-
# GitLab as an OAuth2 provider
|
|
2
|
-
|
|
3
|
-
This document covers using the OAuth2 protocol to access GitLab.
|
|
4
|
-
|
|
5
|
-
If you want GitLab to be an OAuth authentication service provider to sign into other services please see the [Oauth2 provider documentation](../integration/oauth_provider.md).
|
|
6
|
-
|
|
7
|
-
OAuth2 is a protocol that enables us to authenticate a user without requiring them to give their password to a third-party.
|
|
8
|
-
|
|
9
|
-
This functionality is based on [doorkeeper gem](https://github.com/doorkeeper-gem/doorkeeper)
|
|
10
|
-
|
|
11
|
-
## Web Application Flow
|
|
12
|
-
|
|
13
|
-
This is the most common type of flow and is used by server-side clients that wish to access GitLab on a user's behalf.
|
|
14
|
-
|
|
15
|
-
>**Note:**
|
|
16
|
-
This flow **should not** be used for client-side clients as you would leak your `client_secret`. Client-side clients should use the Implicit Grant (which is currently unsupported).
|
|
17
|
-
|
|
18
|
-
For more detailed information, check out the [RFC spec](http://tools.ietf.org/html/rfc6749#section-4.1)
|
|
19
|
-
|
|
20
|
-
In the following sections you will be introduced to the three steps needed for this flow.
|
|
21
|
-
|
|
22
|
-
### 1. Registering the client
|
|
23
|
-
|
|
24
|
-
First, you should create an application (`/profile/applications`) in your user's account.
|
|
25
|
-
Each application gets a unique App ID and App Secret parameters.
|
|
26
|
-
|
|
27
|
-
>**Note:**
|
|
28
|
-
**You should not share/leak your App ID or App Secret.**
|
|
29
|
-
|
|
30
|
-
### 2. Requesting authorization
|
|
31
|
-
|
|
32
|
-
To request the authorization code, you should redirect the user to the `/oauth/authorize` endpoint:
|
|
33
|
-
|
|
34
|
-
```
|
|
35
|
-
https://gitlab.example.com/oauth/authorize?client_id=APP_ID&redirect_uri=REDIRECT_URI&response_type=code&state=your_unique_state_hash
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
This will ask the user to approve the applications access to their account and then redirect back to the `REDIRECT_URI` you provided.
|
|
39
|
-
|
|
40
|
-
The redirect will include the GET `code` parameter, for example:
|
|
41
|
-
|
|
42
|
-
```
|
|
43
|
-
http://myapp.com/oauth/redirect?code=1234567890&state=your_unique_state_hash
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
You should then use the `code` to request an access token.
|
|
47
|
-
|
|
48
|
-
>**Important:**
|
|
49
|
-
It is highly recommended that you send a `state` value with the request to `/oauth/authorize` and
|
|
50
|
-
validate that value is returned and matches in the redirect request.
|
|
51
|
-
This is important to prevent [CSRF attacks](http://www.oauthsecurity.com/#user-content-authorization-code-flow),
|
|
52
|
-
`state` really should have been a requirement in the standard!
|
|
53
|
-
|
|
54
|
-
### 3. Requesting the access token
|
|
55
|
-
|
|
56
|
-
Once you have the authorization code you can request an `access_token` using the code, to do that you can use any HTTP client. In the following example, we are using Ruby's `rest-client`:
|
|
57
|
-
|
|
58
|
-
```
|
|
59
|
-
parameters = 'client_id=APP_ID&client_secret=APP_SECRET&code=RETURNED_CODE&grant_type=authorization_code&redirect_uri=REDIRECT_URI'
|
|
60
|
-
RestClient.post 'http://localhost:3000/oauth/token', parameters
|
|
61
|
-
|
|
62
|
-
# The response will be
|
|
63
|
-
{
|
|
64
|
-
"access_token": "de6780bc506a0446309bd9362820ba8aed28aa506c71eedbe1c5c4f9dd350e54",
|
|
65
|
-
"token_type": "bearer",
|
|
66
|
-
"expires_in": 7200,
|
|
67
|
-
"refresh_token": "8257e65c97202ed1726cf9571600918f3bffb2544b26e00a61df9897668c33a1"
|
|
68
|
-
}
|
|
69
|
-
```
|
|
70
|
-
>**Note:**
|
|
71
|
-
The `redirect_uri` must match the `redirect_uri` used in the original authorization request.
|
|
72
|
-
|
|
73
|
-
You can now make requests to the API with the access token returned.
|
|
74
|
-
|
|
75
|
-
### Use the access token to access the API
|
|
76
|
-
|
|
77
|
-
The access token allows you to make requests to the API on a behalf of a user.
|
|
78
|
-
|
|
79
|
-
```
|
|
80
|
-
GET https://localhost:3000/api/v3/user?access_token=OAUTH-TOKEN
|
|
81
|
-
```
|
|
82
|
-
|
|
83
|
-
Or you can put the token to the Authorization header:
|
|
84
|
-
|
|
85
|
-
```
|
|
86
|
-
curl --header "Authorization: Bearer OAUTH-TOKEN" https://localhost:3000/api/v3/user
|
|
87
|
-
```
|
|
88
|
-
|
|
89
|
-
## Resource Owner Password Credentials
|
|
90
|
-
|
|
91
|
-
## Deprecation Notice
|
|
92
|
-
|
|
93
|
-
1. Starting in GitLab 8.11, the Resource Owner Password Credentials has been *disabled* for users with two-factor authentication turned on.
|
|
94
|
-
2. These users can access the API using [personal access tokens] instead.
|
|
95
|
-
|
|
96
|
-
---
|
|
97
|
-
|
|
98
|
-
In this flow, a token is requested in exchange for the resource owner credentials (username and password).
|
|
99
|
-
The credentials should only be used when there is a high degree of trust between the resource owner and the client (e.g. the
|
|
100
|
-
client is part of the device operating system or a highly privileged application), and when other authorization grant types are not
|
|
101
|
-
available (such as an authorization code).
|
|
102
|
-
|
|
103
|
-
>**Important:**
|
|
104
|
-
Never store the users credentials and only use this grant type when your client is deployed to a trusted environment, in 99% of cases [personal access tokens] are a better choice.
|
|
105
|
-
|
|
106
|
-
Even though this grant type requires direct client access to the resource owner credentials, the resource owner credentials are used
|
|
107
|
-
for a single request and are exchanged for an access token. This grant type can eliminate the need for the client to store the
|
|
108
|
-
resource owner credentials for future use, by exchanging the credentials with a long-lived access token or refresh token.
|
|
109
|
-
You can do POST request to `/oauth/token` with parameters:
|
|
110
|
-
|
|
111
|
-
```
|
|
112
|
-
{
|
|
113
|
-
"grant_type" : "password",
|
|
114
|
-
"username" : "user@example.com",
|
|
115
|
-
"password" : "secret"
|
|
116
|
-
}
|
|
117
|
-
```
|
|
118
|
-
|
|
119
|
-
Then, you'll receive the access token back in the response:
|
|
120
|
-
|
|
121
|
-
```
|
|
122
|
-
{
|
|
123
|
-
"access_token": "1f0af717251950dbd4d73154fdf0a474a5c5119adad999683f5b450c460726aa",
|
|
124
|
-
"token_type": "bearer",
|
|
125
|
-
"expires_in": 7200
|
|
126
|
-
}
|
|
127
|
-
```
|
|
128
|
-
|
|
129
|
-
For testing you can use the oauth2 ruby gem:
|
|
130
|
-
|
|
131
|
-
```
|
|
132
|
-
client = OAuth2::Client.new('the_client_id', 'the_client_secret', :site => "http://example.com")
|
|
133
|
-
access_token = client.password.get_token('user@example.com', 'secret')
|
|
134
|
-
puts access_token.token
|
|
135
|
-
```
|
|
136
|
-
|
|
137
|
-
[personal access tokens]: ./README.md#personal-access-tokens
|
|
@@ -1,259 +0,0 @@
|
|
|
1
|
-
# Pipelines API
|
|
2
|
-
|
|
3
|
-
## List project pipelines
|
|
4
|
-
|
|
5
|
-
> [Introduced][ce-5837] in GitLab 8.11
|
|
6
|
-
|
|
7
|
-
```
|
|
8
|
-
GET /projects/:id/pipelines
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
| Attribute | Type | Required | Description |
|
|
12
|
-
|-----------|---------|----------|---------------------|
|
|
13
|
-
| `id` | integer | yes | The ID of a project |
|
|
14
|
-
|
|
15
|
-
```
|
|
16
|
-
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/1/pipelines"
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
Example of response
|
|
20
|
-
|
|
21
|
-
```json
|
|
22
|
-
[
|
|
23
|
-
{
|
|
24
|
-
"id": 47,
|
|
25
|
-
"status": "pending",
|
|
26
|
-
"ref": "new-pipeline",
|
|
27
|
-
"sha": "a91957a858320c0e17f3a0eca7cfacbff50ea29a",
|
|
28
|
-
"before_sha": "a91957a858320c0e17f3a0eca7cfacbff50ea29a",
|
|
29
|
-
"tag": false,
|
|
30
|
-
"yaml_errors": null,
|
|
31
|
-
"user": {
|
|
32
|
-
"name": "Administrator",
|
|
33
|
-
"username": "root",
|
|
34
|
-
"id": 1,
|
|
35
|
-
"state": "active",
|
|
36
|
-
"avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon",
|
|
37
|
-
"web_url": "http://localhost:3000/root"
|
|
38
|
-
},
|
|
39
|
-
"created_at": "2016-08-16T10:23:19.007Z",
|
|
40
|
-
"updated_at": "2016-08-16T10:23:19.216Z",
|
|
41
|
-
"started_at": null,
|
|
42
|
-
"finished_at": null,
|
|
43
|
-
"committed_at": null,
|
|
44
|
-
"duration": null,
|
|
45
|
-
"coverage": "30.0"
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
"id": 48,
|
|
49
|
-
"status": "pending",
|
|
50
|
-
"ref": "new-pipeline",
|
|
51
|
-
"sha": "eb94b618fb5865b26e80fdd8ae531b7a63ad851a",
|
|
52
|
-
"before_sha": "eb94b618fb5865b26e80fdd8ae531b7a63ad851a",
|
|
53
|
-
"tag": false,
|
|
54
|
-
"yaml_errors": null,
|
|
55
|
-
"user": {
|
|
56
|
-
"name": "Administrator",
|
|
57
|
-
"username": "root",
|
|
58
|
-
"id": 1,
|
|
59
|
-
"state": "active",
|
|
60
|
-
"avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon",
|
|
61
|
-
"web_url": "http://localhost:3000/root"
|
|
62
|
-
},
|
|
63
|
-
"created_at": "2016-08-16T10:23:21.184Z",
|
|
64
|
-
"updated_at": "2016-08-16T10:23:21.314Z",
|
|
65
|
-
"started_at": null,
|
|
66
|
-
"finished_at": null,
|
|
67
|
-
"committed_at": null,
|
|
68
|
-
"duration": null,
|
|
69
|
-
"coverage": null
|
|
70
|
-
}
|
|
71
|
-
]
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
## Get a single pipeline
|
|
75
|
-
|
|
76
|
-
> [Introduced][ce-5837] in GitLab 8.11
|
|
77
|
-
|
|
78
|
-
```
|
|
79
|
-
GET /projects/:id/pipelines/:pipeline_id
|
|
80
|
-
```
|
|
81
|
-
|
|
82
|
-
| Attribute | Type | Required | Description |
|
|
83
|
-
|------------|---------|----------|---------------------|
|
|
84
|
-
| `id` | integer | yes | The ID of a project |
|
|
85
|
-
| `pipeline_id` | integer | yes | The ID of a pipeline |
|
|
86
|
-
|
|
87
|
-
```
|
|
88
|
-
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/1/pipeline/46"
|
|
89
|
-
```
|
|
90
|
-
|
|
91
|
-
Example of response
|
|
92
|
-
|
|
93
|
-
```json
|
|
94
|
-
{
|
|
95
|
-
"id": 46,
|
|
96
|
-
"status": "success",
|
|
97
|
-
"ref": "master",
|
|
98
|
-
"sha": "a91957a858320c0e17f3a0eca7cfacbff50ea29a",
|
|
99
|
-
"before_sha": "a91957a858320c0e17f3a0eca7cfacbff50ea29a",
|
|
100
|
-
"tag": false,
|
|
101
|
-
"yaml_errors": null,
|
|
102
|
-
"user": {
|
|
103
|
-
"name": "Administrator",
|
|
104
|
-
"username": "root",
|
|
105
|
-
"id": 1,
|
|
106
|
-
"state": "active",
|
|
107
|
-
"avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon",
|
|
108
|
-
"web_url": "http://localhost:3000/root"
|
|
109
|
-
},
|
|
110
|
-
"created_at": "2016-08-11T11:28:34.085Z",
|
|
111
|
-
"updated_at": "2016-08-11T11:32:35.169Z",
|
|
112
|
-
"started_at": null,
|
|
113
|
-
"finished_at": "2016-08-11T11:32:35.145Z",
|
|
114
|
-
"committed_at": null,
|
|
115
|
-
"duration": null,
|
|
116
|
-
"coverage": "30.0"
|
|
117
|
-
}
|
|
118
|
-
```
|
|
119
|
-
|
|
120
|
-
## Create a new pipeline
|
|
121
|
-
|
|
122
|
-
> [Introduced][ce-7209] in GitLab 8.14
|
|
123
|
-
|
|
124
|
-
```
|
|
125
|
-
POST /projects/:id/pipeline
|
|
126
|
-
```
|
|
127
|
-
|
|
128
|
-
| Attribute | Type | Required | Description |
|
|
129
|
-
|------------|---------|----------|---------------------|
|
|
130
|
-
| `id` | integer | yes | The ID of a project |
|
|
131
|
-
| `ref` | string | yes | Reference to commit |
|
|
132
|
-
|
|
133
|
-
```
|
|
134
|
-
curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/1/pipeline?ref=master"
|
|
135
|
-
```
|
|
136
|
-
|
|
137
|
-
Example of response
|
|
138
|
-
|
|
139
|
-
```json
|
|
140
|
-
{
|
|
141
|
-
"id": 61,
|
|
142
|
-
"sha": "384c444e840a515b23f21915ee5766b87068a70d",
|
|
143
|
-
"ref": "master",
|
|
144
|
-
"status": "pending",
|
|
145
|
-
"before_sha": "0000000000000000000000000000000000000000",
|
|
146
|
-
"tag": false,
|
|
147
|
-
"yaml_errors": null,
|
|
148
|
-
"user": {
|
|
149
|
-
"name": "Administrator",
|
|
150
|
-
"username": "root",
|
|
151
|
-
"id": 1,
|
|
152
|
-
"state": "active",
|
|
153
|
-
"avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon",
|
|
154
|
-
"web_url": "http://localhost:3000/root"
|
|
155
|
-
},
|
|
156
|
-
"created_at": "2016-11-04T09:36:13.747Z",
|
|
157
|
-
"updated_at": "2016-11-04T09:36:13.977Z",
|
|
158
|
-
"started_at": null,
|
|
159
|
-
"finished_at": null,
|
|
160
|
-
"committed_at": null,
|
|
161
|
-
"duration": null,
|
|
162
|
-
"coverage": null
|
|
163
|
-
}
|
|
164
|
-
```
|
|
165
|
-
|
|
166
|
-
## Retry failed builds in a pipeline
|
|
167
|
-
|
|
168
|
-
> [Introduced][ce-5837] in GitLab 8.11
|
|
169
|
-
|
|
170
|
-
```
|
|
171
|
-
POST /projects/:id/pipelines/:pipeline_id/retry
|
|
172
|
-
```
|
|
173
|
-
|
|
174
|
-
| Attribute | Type | Required | Description |
|
|
175
|
-
|------------|---------|----------|---------------------|
|
|
176
|
-
| `id` | integer | yes | The ID of a project |
|
|
177
|
-
| `pipeline_id` | integer | yes | The ID of a pipeline |
|
|
178
|
-
|
|
179
|
-
```
|
|
180
|
-
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/1/pipelines/46/retry"
|
|
181
|
-
```
|
|
182
|
-
|
|
183
|
-
Response:
|
|
184
|
-
|
|
185
|
-
```json
|
|
186
|
-
{
|
|
187
|
-
"id": 46,
|
|
188
|
-
"status": "pending",
|
|
189
|
-
"ref": "master",
|
|
190
|
-
"sha": "a91957a858320c0e17f3a0eca7cfacbff50ea29a",
|
|
191
|
-
"before_sha": "a91957a858320c0e17f3a0eca7cfacbff50ea29a",
|
|
192
|
-
"tag": false,
|
|
193
|
-
"yaml_errors": null,
|
|
194
|
-
"user": {
|
|
195
|
-
"name": "Administrator",
|
|
196
|
-
"username": "root",
|
|
197
|
-
"id": 1,
|
|
198
|
-
"state": "active",
|
|
199
|
-
"avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon",
|
|
200
|
-
"web_url": "http://localhost:3000/root"
|
|
201
|
-
},
|
|
202
|
-
"created_at": "2016-08-11T11:28:34.085Z",
|
|
203
|
-
"updated_at": "2016-08-11T11:32:35.169Z",
|
|
204
|
-
"started_at": null,
|
|
205
|
-
"finished_at": "2016-08-11T11:32:35.145Z",
|
|
206
|
-
"committed_at": null,
|
|
207
|
-
"duration": null,
|
|
208
|
-
"coverage": null
|
|
209
|
-
}
|
|
210
|
-
```
|
|
211
|
-
|
|
212
|
-
## Cancel a pipelines builds
|
|
213
|
-
|
|
214
|
-
> [Introduced][ce-5837] in GitLab 8.11
|
|
215
|
-
|
|
216
|
-
```
|
|
217
|
-
POST /projects/:id/pipelines/:pipeline_id/cancel
|
|
218
|
-
```
|
|
219
|
-
|
|
220
|
-
| Attribute | Type | Required | Description |
|
|
221
|
-
|------------|---------|----------|---------------------|
|
|
222
|
-
| `id` | integer | yes | The ID of a project |
|
|
223
|
-
| `pipeline_id` | integer | yes | The ID of a pipeline |
|
|
224
|
-
|
|
225
|
-
```
|
|
226
|
-
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/1/pipelines/46/cancel"
|
|
227
|
-
```
|
|
228
|
-
|
|
229
|
-
Response:
|
|
230
|
-
|
|
231
|
-
```json
|
|
232
|
-
{
|
|
233
|
-
"id": 46,
|
|
234
|
-
"status": "canceled",
|
|
235
|
-
"ref": "master",
|
|
236
|
-
"sha": "a91957a858320c0e17f3a0eca7cfacbff50ea29a",
|
|
237
|
-
"before_sha": "a91957a858320c0e17f3a0eca7cfacbff50ea29a",
|
|
238
|
-
"tag": false,
|
|
239
|
-
"yaml_errors": null,
|
|
240
|
-
"user": {
|
|
241
|
-
"name": "Administrator",
|
|
242
|
-
"username": "root",
|
|
243
|
-
"id": 1,
|
|
244
|
-
"state": "active",
|
|
245
|
-
"avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon",
|
|
246
|
-
"web_url": "http://localhost:3000/root"
|
|
247
|
-
},
|
|
248
|
-
"created_at": "2016-08-11T11:28:34.085Z",
|
|
249
|
-
"updated_at": "2016-08-11T11:32:35.169Z",
|
|
250
|
-
"started_at": null,
|
|
251
|
-
"finished_at": "2016-08-11T11:32:35.145Z",
|
|
252
|
-
"committed_at": null,
|
|
253
|
-
"duration": null,
|
|
254
|
-
"coverage": null
|
|
255
|
-
}
|
|
256
|
-
```
|
|
257
|
-
|
|
258
|
-
[ce-5837]: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5837
|
|
259
|
-
[ce-7209]: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/7209
|
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
# Project snippets
|
|
2
|
-
|
|
3
|
-
### Snippet visibility level
|
|
4
|
-
|
|
5
|
-
Snippets in GitLab can be either private, internal or public.
|
|
6
|
-
You can set it with the `visibility_level` field in the snippet.
|
|
7
|
-
|
|
8
|
-
Constants for snippet visibility levels are:
|
|
9
|
-
|
|
10
|
-
| Visibility | visibility_level | Description |
|
|
11
|
-
| ---------- | ---------------- | ----------- |
|
|
12
|
-
| Private | `0` | The snippet is visible only the snippet creator |
|
|
13
|
-
| Internal | `10` | The snippet is visible for any logged in user |
|
|
14
|
-
| Public | `20` | The snippet can be accessed without any authentication |
|
|
15
|
-
|
|
16
|
-
## List snippets
|
|
17
|
-
|
|
18
|
-
Get a list of project snippets.
|
|
19
|
-
|
|
20
|
-
```
|
|
21
|
-
GET /projects/:id/snippets
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
Parameters:
|
|
25
|
-
|
|
26
|
-
- `id` (required) - The ID of a project
|
|
27
|
-
|
|
28
|
-
## Single snippet
|
|
29
|
-
|
|
30
|
-
Get a single project snippet.
|
|
31
|
-
|
|
32
|
-
```
|
|
33
|
-
GET /projects/:id/snippets/:snippet_id
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
Parameters:
|
|
37
|
-
|
|
38
|
-
- `id` (required) - The ID of a project
|
|
39
|
-
- `snippet_id` (required) - The ID of a project's snippet
|
|
40
|
-
|
|
41
|
-
```json
|
|
42
|
-
{
|
|
43
|
-
"id": 1,
|
|
44
|
-
"title": "test",
|
|
45
|
-
"file_name": "add.rb",
|
|
46
|
-
"author": {
|
|
47
|
-
"id": 1,
|
|
48
|
-
"username": "john_smith",
|
|
49
|
-
"email": "john@example.com",
|
|
50
|
-
"name": "John Smith",
|
|
51
|
-
"state": "active",
|
|
52
|
-
"created_at": "2012-05-23T08:00:58Z"
|
|
53
|
-
},
|
|
54
|
-
"updated_at": "2012-06-28T10:52:04Z",
|
|
55
|
-
"created_at": "2012-06-28T10:52:04Z",
|
|
56
|
-
"web_url": "http://example.com/example/example/snippets/1"
|
|
57
|
-
}
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
## Create new snippet
|
|
61
|
-
|
|
62
|
-
Creates a new project snippet. The user must have permission to create new snippets.
|
|
63
|
-
|
|
64
|
-
```
|
|
65
|
-
POST /projects/:id/snippets
|
|
66
|
-
```
|
|
67
|
-
|
|
68
|
-
Parameters:
|
|
69
|
-
|
|
70
|
-
- `id` (required) - The ID of a project
|
|
71
|
-
- `title` (required) - The title of a snippet
|
|
72
|
-
- `file_name` (required) - The name of a snippet file
|
|
73
|
-
- `code` (required) - The content of a snippet
|
|
74
|
-
- `visibility_level` (required) - The snippet's visibility
|
|
75
|
-
|
|
76
|
-
## Update snippet
|
|
77
|
-
|
|
78
|
-
Updates an existing project snippet. The user must have permission to change an existing snippet.
|
|
79
|
-
|
|
80
|
-
```
|
|
81
|
-
PUT /projects/:id/snippets/:snippet_id
|
|
82
|
-
```
|
|
83
|
-
|
|
84
|
-
Parameters:
|
|
85
|
-
|
|
86
|
-
- `id` (required) - The ID of a project
|
|
87
|
-
- `snippet_id` (required) - The ID of a project's snippet
|
|
88
|
-
- `title` (optional) - The title of a snippet
|
|
89
|
-
- `file_name` (optional) - The name of a snippet file
|
|
90
|
-
- `code` (optional) - The content of a snippet
|
|
91
|
-
- `visibility_level` (optional) - The snippet's visibility
|
|
92
|
-
|
|
93
|
-
## Delete snippet
|
|
94
|
-
|
|
95
|
-
Deletes an existing project snippet. This is an idempotent function and deleting a non-existent
|
|
96
|
-
snippet still returns a `200 OK` status code.
|
|
97
|
-
|
|
98
|
-
```
|
|
99
|
-
DELETE /projects/:id/snippets/:snippet_id
|
|
100
|
-
```
|
|
101
|
-
|
|
102
|
-
Parameters:
|
|
103
|
-
|
|
104
|
-
- `id` (required) - The ID of a project
|
|
105
|
-
- `snippet_id` (required) - The ID of a project's snippet
|
|
106
|
-
|
|
107
|
-
## Snippet content
|
|
108
|
-
|
|
109
|
-
Returns the raw project snippet as plain text.
|
|
110
|
-
|
|
111
|
-
```
|
|
112
|
-
GET /projects/:id/snippets/:snippet_id/raw
|
|
113
|
-
```
|
|
114
|
-
|
|
115
|
-
Parameters:
|
|
116
|
-
|
|
117
|
-
- `id` (required) - The ID of a project
|
|
118
|
-
- `snippet_id` (required) - The ID of a project's snippet
|