@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,56 +0,0 @@
|
|
|
1
|
-
# Session
|
|
2
|
-
|
|
3
|
-
## Deprecation Notice
|
|
4
|
-
|
|
5
|
-
1. Starting in GitLab 8.11, this feature has been *disabled* for users with two-factor authentication turned on.
|
|
6
|
-
2. These users can access the API using [personal access tokens] instead.
|
|
7
|
-
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
You can login with both GitLab and LDAP credentials in order to obtain the
|
|
11
|
-
private token.
|
|
12
|
-
|
|
13
|
-
```
|
|
14
|
-
POST /session
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
| Attribute | Type | Required | Description |
|
|
18
|
-
| ---------- | ------- | -------- | -------- |
|
|
19
|
-
| `login` | string | yes | The username of the user|
|
|
20
|
-
| `email` | string | yes if login is not provided | The email of the user |
|
|
21
|
-
| `password` | string | yes | The password of the user |
|
|
22
|
-
|
|
23
|
-
```bash
|
|
24
|
-
curl --request POST "https://gitlab.example.com/api/v3/session?login=john_smith&password=strongpassw0rd"
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
Example response:
|
|
28
|
-
|
|
29
|
-
```json
|
|
30
|
-
{
|
|
31
|
-
"name": "John Smith",
|
|
32
|
-
"username": "john_smith",
|
|
33
|
-
"id": 32,
|
|
34
|
-
"state": "active",
|
|
35
|
-
"avatar_url": null,
|
|
36
|
-
"created_at": "2015-01-29T21:07:19.440Z",
|
|
37
|
-
"is_admin": true,
|
|
38
|
-
"bio": null,
|
|
39
|
-
"skype": "",
|
|
40
|
-
"linkedin": "",
|
|
41
|
-
"twitter": "",
|
|
42
|
-
"website_url": "",
|
|
43
|
-
"email": "john@example.com",
|
|
44
|
-
"theme_id": 1,
|
|
45
|
-
"color_scheme_id": 1,
|
|
46
|
-
"projects_limit": 10,
|
|
47
|
-
"current_sign_in_at": "2015-07-07T07:10:58.392Z",
|
|
48
|
-
"identities": [],
|
|
49
|
-
"can_create_group": true,
|
|
50
|
-
"can_create_project": true,
|
|
51
|
-
"two_factor_enabled": false,
|
|
52
|
-
"private_token": "9koXpg98eAheJpvBs5tK"
|
|
53
|
-
}
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
[personal access tokens]: ./README.md#personal-access-tokens
|
|
@@ -1,126 +0,0 @@
|
|
|
1
|
-
# Application settings
|
|
2
|
-
|
|
3
|
-
These API calls allow you to read and modify GitLab instance application
|
|
4
|
-
settings as appear in `/admin/application_settings`. You have to be an
|
|
5
|
-
administrator in order to perform this action.
|
|
6
|
-
|
|
7
|
-
## Get current application settings
|
|
8
|
-
|
|
9
|
-
List the current application settings of the GitLab instance.
|
|
10
|
-
|
|
11
|
-
```
|
|
12
|
-
GET /application/settings
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
```bash
|
|
16
|
-
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/application/settings
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
Example response:
|
|
20
|
-
|
|
21
|
-
```json
|
|
22
|
-
{
|
|
23
|
-
"default_projects_limit" : 10,
|
|
24
|
-
"signup_enabled" : true,
|
|
25
|
-
"id" : 1,
|
|
26
|
-
"default_branch_protection" : 2,
|
|
27
|
-
"restricted_visibility_levels" : [],
|
|
28
|
-
"signin_enabled" : true,
|
|
29
|
-
"after_sign_out_path" : null,
|
|
30
|
-
"max_attachment_size" : 10,
|
|
31
|
-
"user_oauth_applications" : true,
|
|
32
|
-
"updated_at" : "2016-01-04T15:44:55.176Z",
|
|
33
|
-
"session_expire_delay" : 10080,
|
|
34
|
-
"home_page_url" : null,
|
|
35
|
-
"default_snippet_visibility" : 0,
|
|
36
|
-
"domain_whitelist" : [],
|
|
37
|
-
"domain_blacklist_enabled" : false,
|
|
38
|
-
"domain_blacklist" : [],
|
|
39
|
-
"created_at" : "2016-01-04T15:44:55.176Z",
|
|
40
|
-
"default_project_visibility" : 0,
|
|
41
|
-
"gravatar_enabled" : true,
|
|
42
|
-
"sign_in_text" : null,
|
|
43
|
-
"container_registry_token_expire_delay": 5,
|
|
44
|
-
"repository_storage": "default",
|
|
45
|
-
"repository_storages": ["default"],
|
|
46
|
-
"koding_enabled": false,
|
|
47
|
-
"koding_url": null,
|
|
48
|
-
"plantuml_enabled": false,
|
|
49
|
-
"plantuml_url": null,
|
|
50
|
-
"terminal_max_session_time": 0
|
|
51
|
-
}
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
## Change application settings
|
|
55
|
-
|
|
56
|
-
```
|
|
57
|
-
PUT /application/settings
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
| Attribute | Type | Required | Description |
|
|
61
|
-
| --------- | ---- | :------: | ----------- |
|
|
62
|
-
| `default_projects_limit` | integer | no | Project limit per user. Default is `10` |
|
|
63
|
-
| `signup_enabled` | boolean | no | Enable registration. Default is `true`. |
|
|
64
|
-
| `signin_enabled` | boolean | no | Enable login via a GitLab account. Default is `true`. |
|
|
65
|
-
| `gravatar_enabled` | boolean | no | Enable Gravatar |
|
|
66
|
-
| `sign_in_text` | string | no | Text on login page |
|
|
67
|
-
| `home_page_url` | string | no | Redirect to this URL when not logged in |
|
|
68
|
-
| `default_branch_protection` | integer | no | Determine if developers can push to master. Can take `0` _(not protected, both developers and masters can push new commits, force push or delete the branch)_, `1` _(partially protected, developers can push new commits, but cannot force push or delete the branch, masters can do anything)_ or `2` _(fully protected, developers cannot push new commits, force push or delete the branch, masters can do anything)_ as a parameter. Default is `2`. |
|
|
69
|
-
| `restricted_visibility_levels` | array of integers | no | Selected levels cannot be used by non-admin users for projects or snippets. Can take `0` _(Private)_, `1` _(Internal)_ and `2` _(Public)_ as a parameter. Default is null which means there is no restriction. |
|
|
70
|
-
| `max_attachment_size` | integer | no | Limit attachment size in MB |
|
|
71
|
-
| `session_expire_delay` | integer | no | Session duration in minutes. GitLab restart is required to apply changes |
|
|
72
|
-
| `default_project_visibility` | integer | no | What visibility level new projects receive. Can take `0` _(Private)_, `1` _(Internal)_ and `2` _(Public)_ as a parameter. Default is `0`.|
|
|
73
|
-
| `default_snippet_visibility` | integer | no | What visibility level new snippets receive. Can take `0` _(Private)_, `1` _(Internal)_ and `2` _(Public)_ as a parameter. Default is `0`.|
|
|
74
|
-
| `domain_whitelist` | array of strings | no | Force people to use only corporate emails for sign-up. Default is null, meaning there is no restriction. |
|
|
75
|
-
| `domain_blacklist_enabled` | boolean | no | Enable/disable the `domain_blacklist` |
|
|
76
|
-
| `domain_blacklist` | array of strings | yes (if `domain_blacklist_enabled` is `true`) | People trying to sign-up with emails from this domain will not be allowed to do so. |
|
|
77
|
-
| `user_oauth_applications` | boolean | no | Allow users to register any application to use GitLab as an OAuth provider |
|
|
78
|
-
| `after_sign_out_path` | string | no | Where to redirect users after logout |
|
|
79
|
-
| `container_registry_token_expire_delay` | integer | no | Container Registry token duration in minutes |
|
|
80
|
-
| `repository_storages` | array of strings | no | A list of names of enabled storage paths, taken from `gitlab.yml`. New projects will be created in one of these stores, chosen at random. |
|
|
81
|
-
| `repository_storage` | string | no | The first entry in `repository_storages`. Deprecated, but retained for compatibility reasons |
|
|
82
|
-
| `enabled_git_access_protocol` | string | no | Enabled protocols for Git access. Allowed values are: `ssh`, `http`, and `nil` to allow both protocols. |
|
|
83
|
-
| `koding_enabled` | boolean | no | Enable Koding integration. Default is `false`. |
|
|
84
|
-
| `koding_url` | string | yes (if `koding_enabled` is `true`) | The Koding instance URL for integration. |
|
|
85
|
-
| `disabled_oauth_sign_in_sources` | Array of strings | no | Disabled OAuth sign-in sources |
|
|
86
|
-
| `plantuml_enabled` | boolean | no | Enable PlantUML integration. Default is `false`. |
|
|
87
|
-
| `plantuml_url` | string | yes (if `plantuml_enabled` is `true`) | The PlantUML instance URL for integration. |
|
|
88
|
-
| `terminal_max_session_time` | integer | no | Maximum time for web terminal websocket connection (in seconds). Set to 0 for unlimited time. |
|
|
89
|
-
|
|
90
|
-
```bash
|
|
91
|
-
curl --request PUT --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/application/settings?signup_enabled=false&default_project_visibility=1
|
|
92
|
-
```
|
|
93
|
-
|
|
94
|
-
Example response:
|
|
95
|
-
|
|
96
|
-
```json
|
|
97
|
-
{
|
|
98
|
-
"id": 1,
|
|
99
|
-
"default_projects_limit": 10,
|
|
100
|
-
"signup_enabled": true,
|
|
101
|
-
"signin_enabled": true,
|
|
102
|
-
"gravatar_enabled": true,
|
|
103
|
-
"sign_in_text": "",
|
|
104
|
-
"created_at": "2015-06-12T15:51:55.432Z",
|
|
105
|
-
"updated_at": "2015-06-30T13:22:42.210Z",
|
|
106
|
-
"home_page_url": "",
|
|
107
|
-
"default_branch_protection": 2,
|
|
108
|
-
"restricted_visibility_levels": [],
|
|
109
|
-
"max_attachment_size": 10,
|
|
110
|
-
"session_expire_delay": 10080,
|
|
111
|
-
"default_project_visibility": 1,
|
|
112
|
-
"default_snippet_visibility": 0,
|
|
113
|
-
"domain_whitelist": [],
|
|
114
|
-
"domain_blacklist_enabled" : false,
|
|
115
|
-
"domain_blacklist" : [],
|
|
116
|
-
"user_oauth_applications": true,
|
|
117
|
-
"after_sign_out_path": "",
|
|
118
|
-
"container_registry_token_expire_delay": 5,
|
|
119
|
-
"repository_storage": "default",
|
|
120
|
-
"koding_enabled": false,
|
|
121
|
-
"koding_url": null,
|
|
122
|
-
"plantuml_enabled": false,
|
|
123
|
-
"plantuml_url": null,
|
|
124
|
-
"terminal_max_session_time": 0
|
|
125
|
-
}
|
|
126
|
-
```
|
|
@@ -1,152 +0,0 @@
|
|
|
1
|
-
# Sidekiq Metrics
|
|
2
|
-
|
|
3
|
-
>**Note:** This endpoint is only available on GitLab 8.9 and above.
|
|
4
|
-
|
|
5
|
-
This API endpoint allows you to retrieve some information about the current state
|
|
6
|
-
of Sidekiq, its jobs, queues, and processes.
|
|
7
|
-
|
|
8
|
-
## Get the current Queue Metrics
|
|
9
|
-
|
|
10
|
-
List information about all the registered queues, their backlog and their
|
|
11
|
-
latency.
|
|
12
|
-
|
|
13
|
-
```
|
|
14
|
-
GET /sidekiq/queue_metrics
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
```bash
|
|
18
|
-
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/sidekiq/queue_metrics
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
Example response:
|
|
22
|
-
|
|
23
|
-
```json
|
|
24
|
-
{
|
|
25
|
-
"queues": {
|
|
26
|
-
"default": {
|
|
27
|
-
"backlog": 0,
|
|
28
|
-
"latency": 0
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
## Get the current Process Metrics
|
|
35
|
-
|
|
36
|
-
List information about all the Sidekiq workers registered to process your queues.
|
|
37
|
-
|
|
38
|
-
```
|
|
39
|
-
GET /sidekiq/process_metrics
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
```bash
|
|
43
|
-
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/sidekiq/process_metrics
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
Example response:
|
|
47
|
-
|
|
48
|
-
```json
|
|
49
|
-
{
|
|
50
|
-
"processes": [
|
|
51
|
-
{
|
|
52
|
-
"hostname": "gitlab.example.com",
|
|
53
|
-
"pid": 5649,
|
|
54
|
-
"tag": "gitlab",
|
|
55
|
-
"started_at": "2016-06-14T10:45:07.159-05:00",
|
|
56
|
-
"queues": [
|
|
57
|
-
"post_receive",
|
|
58
|
-
"mailers",
|
|
59
|
-
"archive_repo",
|
|
60
|
-
"system_hook",
|
|
61
|
-
"project_web_hook",
|
|
62
|
-
"gitlab_shell",
|
|
63
|
-
"incoming_email",
|
|
64
|
-
"runner",
|
|
65
|
-
"common",
|
|
66
|
-
"default"
|
|
67
|
-
],
|
|
68
|
-
"labels": [],
|
|
69
|
-
"concurrency": 25,
|
|
70
|
-
"busy": 0
|
|
71
|
-
}
|
|
72
|
-
]
|
|
73
|
-
}
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
## Get the current Job Statistics
|
|
77
|
-
|
|
78
|
-
List information about the jobs that Sidekiq has performed.
|
|
79
|
-
|
|
80
|
-
```
|
|
81
|
-
GET /sidekiq/job_stats
|
|
82
|
-
```
|
|
83
|
-
|
|
84
|
-
```bash
|
|
85
|
-
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/sidekiq/job_stats
|
|
86
|
-
```
|
|
87
|
-
|
|
88
|
-
Example response:
|
|
89
|
-
|
|
90
|
-
```json
|
|
91
|
-
{
|
|
92
|
-
"jobs": {
|
|
93
|
-
"processed": 2,
|
|
94
|
-
"failed": 0,
|
|
95
|
-
"enqueued": 0
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
```
|
|
99
|
-
|
|
100
|
-
## Get a compound response of all the previously mentioned metrics
|
|
101
|
-
|
|
102
|
-
List all the currently available information about Sidekiq.
|
|
103
|
-
|
|
104
|
-
```
|
|
105
|
-
GET /sidekiq/compound_metrics
|
|
106
|
-
```
|
|
107
|
-
|
|
108
|
-
```bash
|
|
109
|
-
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/sidekiq/compound_metrics
|
|
110
|
-
```
|
|
111
|
-
|
|
112
|
-
Example response:
|
|
113
|
-
|
|
114
|
-
```json
|
|
115
|
-
{
|
|
116
|
-
"queues": {
|
|
117
|
-
"default": {
|
|
118
|
-
"backlog": 0,
|
|
119
|
-
"latency": 0
|
|
120
|
-
}
|
|
121
|
-
},
|
|
122
|
-
"processes": [
|
|
123
|
-
{
|
|
124
|
-
"hostname": "gitlab.example.com",
|
|
125
|
-
"pid": 5649,
|
|
126
|
-
"tag": "gitlab",
|
|
127
|
-
"started_at": "2016-06-14T10:45:07.159-05:00",
|
|
128
|
-
"queues": [
|
|
129
|
-
"post_receive",
|
|
130
|
-
"mailers",
|
|
131
|
-
"archive_repo",
|
|
132
|
-
"system_hook",
|
|
133
|
-
"project_web_hook",
|
|
134
|
-
"gitlab_shell",
|
|
135
|
-
"incoming_email",
|
|
136
|
-
"runner",
|
|
137
|
-
"common",
|
|
138
|
-
"default"
|
|
139
|
-
],
|
|
140
|
-
"labels": [],
|
|
141
|
-
"concurrency": 25,
|
|
142
|
-
"busy": 0
|
|
143
|
-
}
|
|
144
|
-
],
|
|
145
|
-
"jobs": {
|
|
146
|
-
"processed": 2,
|
|
147
|
-
"failed": 0,
|
|
148
|
-
"enqueued": 0
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
```
|
|
152
|
-
|
|
@@ -1,232 +0,0 @@
|
|
|
1
|
-
# Snippets
|
|
2
|
-
|
|
3
|
-
> [Introduced][ce-6373] in GitLab 8.15.
|
|
4
|
-
|
|
5
|
-
### Snippet visibility level
|
|
6
|
-
|
|
7
|
-
Snippets in GitLab can be either private, internal, or public.
|
|
8
|
-
You can set it with the `visibility_level` field in the snippet.
|
|
9
|
-
|
|
10
|
-
Constants for snippet visibility levels are:
|
|
11
|
-
|
|
12
|
-
| Visibility | Visibility level | Description |
|
|
13
|
-
| ---------- | ---------------- | ----------- |
|
|
14
|
-
| Private | `0` | The snippet is visible only to the snippet creator |
|
|
15
|
-
| Internal | `10` | The snippet is visible for any logged in user |
|
|
16
|
-
| Public | `20` | The snippet can be accessed without any authentication |
|
|
17
|
-
|
|
18
|
-
## List snippets
|
|
19
|
-
|
|
20
|
-
Get a list of current user's snippets.
|
|
21
|
-
|
|
22
|
-
```
|
|
23
|
-
GET /snippets
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
## Single snippet
|
|
27
|
-
|
|
28
|
-
Get a single snippet.
|
|
29
|
-
|
|
30
|
-
```
|
|
31
|
-
GET /snippets/:id
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
Parameters:
|
|
35
|
-
|
|
36
|
-
| Attribute | Type | Required | Description |
|
|
37
|
-
| --------- | ---- | -------- | ----------- |
|
|
38
|
-
| `id` | Integer | yes | The ID of a snippet |
|
|
39
|
-
|
|
40
|
-
``` bash
|
|
41
|
-
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/snippets/1
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
Example response:
|
|
45
|
-
|
|
46
|
-
``` json
|
|
47
|
-
{
|
|
48
|
-
"id": 1,
|
|
49
|
-
"title": "test",
|
|
50
|
-
"file_name": "add.rb",
|
|
51
|
-
"author": {
|
|
52
|
-
"id": 1,
|
|
53
|
-
"username": "john_smith",
|
|
54
|
-
"email": "john@example.com",
|
|
55
|
-
"name": "John Smith",
|
|
56
|
-
"state": "active",
|
|
57
|
-
"created_at": "2012-05-23T08:00:58Z"
|
|
58
|
-
},
|
|
59
|
-
"expires_at": null,
|
|
60
|
-
"updated_at": "2012-06-28T10:52:04Z",
|
|
61
|
-
"created_at": "2012-06-28T10:52:04Z",
|
|
62
|
-
"web_url": "http://example.com/snippets/1",
|
|
63
|
-
}
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
## Create new snippet
|
|
67
|
-
|
|
68
|
-
Creates a new snippet. The user must have permission to create new snippets.
|
|
69
|
-
|
|
70
|
-
```
|
|
71
|
-
POST /snippets
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
Parameters:
|
|
75
|
-
|
|
76
|
-
| Attribute | Type | Required | Description |
|
|
77
|
-
| --------- | ---- | -------- | ----------- |
|
|
78
|
-
| `title` | String | yes | The title of a snippet |
|
|
79
|
-
| `file_name` | String | yes | The name of a snippet file |
|
|
80
|
-
| `content` | String | yes | The content of a snippet |
|
|
81
|
-
| `visibility_level` | Integer | yes | The snippet's visibility |
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
``` bash
|
|
85
|
-
curl --request POST --data '{"title": "This is a snippet", "content": "Hello world", "file_name": "test.txt", "visibility_level": 10 }' --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/snippets
|
|
86
|
-
```
|
|
87
|
-
|
|
88
|
-
Example response:
|
|
89
|
-
|
|
90
|
-
``` json
|
|
91
|
-
{
|
|
92
|
-
"id": 1,
|
|
93
|
-
"title": "This is a snippet",
|
|
94
|
-
"file_name": "test.txt",
|
|
95
|
-
"author": {
|
|
96
|
-
"id": 1,
|
|
97
|
-
"username": "john_smith",
|
|
98
|
-
"email": "john@example.com",
|
|
99
|
-
"name": "John Smith",
|
|
100
|
-
"state": "active",
|
|
101
|
-
"created_at": "2012-05-23T08:00:58Z"
|
|
102
|
-
},
|
|
103
|
-
"expires_at": null,
|
|
104
|
-
"updated_at": "2012-06-28T10:52:04Z",
|
|
105
|
-
"created_at": "2012-06-28T10:52:04Z",
|
|
106
|
-
"web_url": "http://example.com/snippets/1",
|
|
107
|
-
}
|
|
108
|
-
```
|
|
109
|
-
|
|
110
|
-
## Update snippet
|
|
111
|
-
|
|
112
|
-
Updates an existing snippet. The user must have permission to change an existing snippet.
|
|
113
|
-
|
|
114
|
-
```
|
|
115
|
-
PUT /snippets/:id
|
|
116
|
-
```
|
|
117
|
-
|
|
118
|
-
Parameters:
|
|
119
|
-
|
|
120
|
-
| Attribute | Type | Required | Description |
|
|
121
|
-
| --------- | ---- | -------- | ----------- |
|
|
122
|
-
| `id` | Integer | yes | The ID of a snippet |
|
|
123
|
-
| `title` | String | no | The title of a snippet |
|
|
124
|
-
| `file_name` | String | no | The name of a snippet file |
|
|
125
|
-
| `content` | String | no | The content of a snippet |
|
|
126
|
-
| `visibility_level` | Integer | no | The snippet's visibility |
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
``` bash
|
|
130
|
-
curl --request PUT --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" --data '{"title": "foo", "content": "bar"}' https://gitlab.example.com/api/v3/snippets/1
|
|
131
|
-
```
|
|
132
|
-
|
|
133
|
-
Example response:
|
|
134
|
-
|
|
135
|
-
``` json
|
|
136
|
-
{
|
|
137
|
-
"id": 1,
|
|
138
|
-
"title": "test",
|
|
139
|
-
"file_name": "add.rb",
|
|
140
|
-
"author": {
|
|
141
|
-
"id": 1,
|
|
142
|
-
"username": "john_smith",
|
|
143
|
-
"email": "john@example.com",
|
|
144
|
-
"name": "John Smith",
|
|
145
|
-
"state": "active",
|
|
146
|
-
"created_at": "2012-05-23T08:00:58Z"
|
|
147
|
-
},
|
|
148
|
-
"expires_at": null,
|
|
149
|
-
"updated_at": "2012-06-28T10:52:04Z",
|
|
150
|
-
"created_at": "2012-06-28T10:52:04Z",
|
|
151
|
-
"web_url": "http://example.com/snippets/1",
|
|
152
|
-
}
|
|
153
|
-
```
|
|
154
|
-
|
|
155
|
-
## Delete snippet
|
|
156
|
-
|
|
157
|
-
Deletes an existing snippet.
|
|
158
|
-
|
|
159
|
-
```
|
|
160
|
-
DELETE /snippets/:id
|
|
161
|
-
```
|
|
162
|
-
|
|
163
|
-
Parameters:
|
|
164
|
-
|
|
165
|
-
| Attribute | Type | Required | Description |
|
|
166
|
-
| --------- | ---- | -------- | ----------- |
|
|
167
|
-
| `id` | Integer | yes | The ID of a snippet |
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
```
|
|
171
|
-
curl --request DELETE --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/snippets/1"
|
|
172
|
-
```
|
|
173
|
-
|
|
174
|
-
upon successful delete a `204 No content` HTTP code shall be expected, with no data,
|
|
175
|
-
but if the snippet is non-existent, a `404 Not Found` will be returned.
|
|
176
|
-
|
|
177
|
-
## Explore all public snippets
|
|
178
|
-
|
|
179
|
-
```
|
|
180
|
-
GET /snippets/public
|
|
181
|
-
```
|
|
182
|
-
|
|
183
|
-
| Attribute | Type | Required | Description |
|
|
184
|
-
| --------- | ---- | -------- | ----------- |
|
|
185
|
-
| `per_page` | Integer | no | number of snippets to return per page |
|
|
186
|
-
| `page` | Integer | no | the page to retrieve |
|
|
187
|
-
|
|
188
|
-
``` bash
|
|
189
|
-
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/snippets/public?per_page=2&page=1
|
|
190
|
-
```
|
|
191
|
-
|
|
192
|
-
Example response:
|
|
193
|
-
|
|
194
|
-
``` json
|
|
195
|
-
[
|
|
196
|
-
{
|
|
197
|
-
"author": {
|
|
198
|
-
"avatar_url": "http://www.gravatar.com/avatar/edaf55a9e363ea263e3b981d09e0f7f7?s=80&d=identicon",
|
|
199
|
-
"id": 12,
|
|
200
|
-
"name": "Libby Rolfson",
|
|
201
|
-
"state": "active",
|
|
202
|
-
"username": "elton_wehner",
|
|
203
|
-
"web_url": "http://localhost:3000/elton_wehner"
|
|
204
|
-
},
|
|
205
|
-
"created_at": "2016-11-25T16:53:34.504Z",
|
|
206
|
-
"file_name": "oconnerrice.rb",
|
|
207
|
-
"id": 49,
|
|
208
|
-
"raw_url": "http://localhost:3000/snippets/49/raw",
|
|
209
|
-
"title": "Ratione cupiditate et laborum temporibus.",
|
|
210
|
-
"updated_at": "2016-11-25T16:53:34.504Z",
|
|
211
|
-
"web_url": "http://localhost:3000/snippets/49"
|
|
212
|
-
},
|
|
213
|
-
{
|
|
214
|
-
"author": {
|
|
215
|
-
"avatar_url": "http://www.gravatar.com/avatar/36583b28626de71061e6e5a77972c3bd?s=80&d=identicon",
|
|
216
|
-
"id": 16,
|
|
217
|
-
"name": "Llewellyn Flatley",
|
|
218
|
-
"state": "active",
|
|
219
|
-
"username": "adaline",
|
|
220
|
-
"web_url": "http://localhost:3000/adaline"
|
|
221
|
-
},
|
|
222
|
-
"created_at": "2016-11-25T16:53:34.479Z",
|
|
223
|
-
"file_name": "muellershields.rb",
|
|
224
|
-
"id": 48,
|
|
225
|
-
"raw_url": "http://localhost:3000/snippets/48/raw",
|
|
226
|
-
"title": "Minus similique nesciunt vel fugiat qui ullam sunt.",
|
|
227
|
-
"updated_at": "2016-11-25T16:53:34.479Z",
|
|
228
|
-
"web_url": "http://localhost:3000/snippets/48"
|
|
229
|
-
}
|
|
230
|
-
]
|
|
231
|
-
```
|
|
232
|
-
|