summaryrefslogtreecommitdiff
path: root/doc/api/group_level_variables.md
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-02-27 09:09:01 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-02-27 09:09:01 +0000
commitc72e5ebe9938d315ec598197873e71a80168d40a (patch)
tree439bf5c40aaf774e5a301825af517cb52726f450 /doc/api/group_level_variables.md
parentffc43b862df32a590eae874bcbb11109b46dc8be (diff)
downloadgitlab-ce-c72e5ebe9938d315ec598197873e71a80168d40a.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'doc/api/group_level_variables.md')
-rw-r--r--doc/api/group_level_variables.md20
1 files changed, 10 insertions, 10 deletions
diff --git a/doc/api/group_level_variables.md b/doc/api/group_level_variables.md
index 5eaf44ef6c1..95a68283f1d 100644
--- a/doc/api/group_level_variables.md
+++ b/doc/api/group_level_variables.md
@@ -6,7 +6,7 @@
Get list of a group's variables.
-```
+```plaintext
GET /groups/:id/variables
```
@@ -14,7 +14,7 @@ GET /groups/:id/variables
|-----------|---------|----------|---------------------|
| `id` | integer/string | yes | The ID of a group or [URL-encoded path of the group](README.md#namespaced-path-encoding) owned by the authenticated user |
-```
+```shell
curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/groups/1/variables"
```
@@ -41,7 +41,7 @@ curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/a
Get the details of a group's specific variable.
-```
+```plaintext
GET /groups/:id/variables/:key
```
@@ -50,7 +50,7 @@ GET /groups/:id/variables/:key
| `id` | integer/string | yes | The ID of a group or [URL-encoded path of the group](README.md#namespaced-path-encoding) owned by the authenticated user |
| `key` | string | yes | The `key` of a variable |
-```
+```shell
curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/groups/1/variables/TEST_VARIABLE_1"
```
@@ -68,7 +68,7 @@ curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/a
Create a new variable.
-```
+```plaintext
POST /groups/:id/variables
```
@@ -81,7 +81,7 @@ POST /groups/:id/variables
| `protected` | boolean | no | Whether the variable is protected |
| `masked` | boolean | no | Whether the variable is masked |
-```
+```shell
curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/groups/1/variables" --form "key=NEW_VARIABLE" --form "value=new value"
```
@@ -99,7 +99,7 @@ curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" "https://gitla
Update a group's variable.
-```
+```plaintext
PUT /groups/:id/variables/:key
```
@@ -112,7 +112,7 @@ PUT /groups/:id/variables/:key
| `protected` | boolean | no | Whether the variable is protected |
| `masked` | boolean | no | Whether the variable is masked |
-```
+```shell
curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/groups/1/variables/NEW_VARIABLE" --form "value=updated value"
```
@@ -130,7 +130,7 @@ curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab
Remove a group's variable.
-```
+```plaintext
DELETE /groups/:id/variables/:key
```
@@ -139,7 +139,7 @@ DELETE /groups/:id/variables/:key
| `id` | integer/string | yes | The ID of a group or [URL-encoded path of the group](README.md#namespaced-path-encoding) owned by the authenticated user |
| `key` | string | yes | The `key` of a variable |
-```
+```shell
curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/groups/1/variables/VARIABLE_1"
```