diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-18 18:09:07 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-18 18:09:07 +0000 |
commit | 6b8d671de726534a03c18e025a586e1bc9c04a4f (patch) | |
tree | f6a9168160b0d435641a1767b2e68487ec75ae46 /doc/api | |
parent | 163a7046ac76eb4109184e82ce0af911633e6626 (diff) | |
download | gitlab-ce-6b8d671de726534a03c18e025a586e1bc9c04a4f.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'doc/api')
-rw-r--r-- | doc/api/protected_environments.md | 16 |
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' ``` |