summaryrefslogtreecommitdiff
path: root/doc/api/project_level_variables.md
diff options
context:
space:
mode:
Diffstat (limited to 'doc/api/project_level_variables.md')
-rw-r--r--doc/api/project_level_variables.md12
1 files changed, 9 insertions, 3 deletions
diff --git a/doc/api/project_level_variables.md b/doc/api/project_level_variables.md
index 4a6f5624394..3b00f6f140e 100644
--- a/doc/api/project_level_variables.md
+++ b/doc/api/project_level_variables.md
@@ -52,7 +52,9 @@ curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/a
{
"key": "TEST_VARIABLE_1",
"variable_type": "env_var",
- "value": "TEST_1"
+ "value": "TEST_1",
+ "protected": false,
+ "masked": true
}
```
@@ -71,6 +73,7 @@ POST /projects/:id/variables
| `value` | string | yes | The `value` of a variable |
| `variable_type` | string | no | The type of a variable. Available types are: `env_var` (default) and `file` |
| `protected` | boolean | no | Whether the variable is protected |
+| `masked` | boolean | no | Whether the variable is masked |
```
curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/1/variables" --form "key=NEW_VARIABLE" --form "value=new value"
@@ -81,7 +84,8 @@ curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" "https://gitla
"key": "NEW_VARIABLE",
"value": "new value",
"variable_type": "env_var",
- "protected": false
+ "protected": false,
+ "masked": false
}
```
@@ -100,6 +104,7 @@ PUT /projects/:id/variables/:key
| `value` | string | yes | The `value` of a variable |
| `variable_type` | string | no | The type of a variable. Available types are: `env_var` (default) and `file` |
| `protected` | boolean | no | Whether the variable is protected |
+| `masked` | boolean | no | Whether the variable is masked |
```
curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/1/variables/NEW_VARIABLE" --form "value=updated value"
@@ -110,7 +115,8 @@ curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab
"key": "NEW_VARIABLE",
"value": "updated value",
"variable_type": "env_var",
- "protected": true
+ "protected": true,
+ "masked": false
}
```