Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/doc/api
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-02-18 21:09:07 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-02-18 21:09:07 +0300
commit6b8d671de726534a03c18e025a586e1bc9c04a4f (patch)
treef6a9168160b0d435641a1767b2e68487ec75ae46 /doc/api
parent163a7046ac76eb4109184e82ce0af911633e6626 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'doc/api')
-rw-r--r--doc/api/protected_environments.md16
1 files changed, 8 insertions, 8 deletions
diff --git a/doc/api/protected_environments.md b/doc/api/protected_environments.md
index 7d4e62a8ff5..852a5ae6e71 100644
--- a/doc/api/protected_environments.md
+++ b/doc/api/protected_environments.md
@@ -17,7 +17,7 @@ Currently, these levels are recognized:
Gets a list of protected environments from a project:
-```bash
+```shell
GET /projects/:id/protected_environments
```
@@ -25,7 +25,7 @@ GET /projects/:id/protected_environments
| --------- | ---- | -------- | ----------- |
| `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user. |
-```bash
+```shell
curl --header "PRIVATE-TOKEN: <your_access_token>" 'https://gitlab.example.com/api/v4/projects/5/protected_environments/'
```
@@ -51,7 +51,7 @@ Example response:
Gets a single protected environment:
-```bash
+```shell
GET /projects/:id/protected_environments/:name
```
@@ -60,7 +60,7 @@ GET /projects/:id/protected_environments/:name
| `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user |
| `name` | string | yes | The name of the protected environment |
-```bash
+```shell
curl --header "PRIVATE-TOKEN: <your_access_token>" 'https://gitlab.example.com/api/v4/projects/5/protected_environments/production'
```
@@ -84,11 +84,11 @@ Example response:
Protects a single environment:
-```bash
+```shell
POST /projects/:id/protected_environments
```
-```bash
+```shell
curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" 'https://gitlab.example.com/api/v4/projects/5/protected_environments?name=staging&deploy_access_levels%5B%5D%5Buser_id%5D=1'
```
@@ -122,11 +122,11 @@ Example response:
Unprotects the given protected environment:
-```bash
+```shell
DELETE /projects/:id/protected_environments/:name
```
-```bash
+```shell
curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" 'https://gitlab.example.com/api/v4/projects/5/protected_environments/staging'
```