Commit 6760d345 authored by Petar Prokic's avatar Petar Prokic Committed by Marcel Amirault

Add environment_scope field to Project Level Variables API docs

parent a8b8d86b
......@@ -16,7 +16,7 @@ GET /projects/:id/variables
```
| Attribute | Type | required | Description |
|-----------|---------|----------|---------------------|
| --------- | -------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
| `id` | integer/string | yes | The ID of a project or [URL-encoded NAMESPACE/PROJECT_NAME of the project](index.md#namespaced-path-encoding) owned by the authenticated user |
```shell
......@@ -26,14 +26,20 @@ curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/a
```json
[
{
"key": "TEST_VARIABLE_1",
"variable_type": "env_var",
"value": "TEST_1"
"key": "TEST_VARIABLE_1",
"value": "TEST_1",
"protected": false,
"masked": true,
"environment_scope": "*"
},
{
"key": "TEST_VARIABLE_2",
"variable_type": "env_var",
"value": "TEST_2"
"key": "TEST_VARIABLE_2",
"value": "TEST_2",
"protected": false,
"masked": false,
"environment_scope": "*"
}
]
```
......@@ -47,7 +53,7 @@ GET /projects/:id/variables/:key
```
| Attribute | Type | required | Description |
|-----------|---------|----------|-----------------------|
| --------- | -------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
| `id` | integer/string | yes | The ID of a project or [URL-encoded NAMESPACE/PROJECT_NAME of the project](index.md#namespaced-path-encoding) owned by the authenticated user |
| `key` | string | yes | The `key` of a variable |
| `filter` | hash | no | Available filters: `[environment_scope]`. See the [`filter` parameter details](#the-filter-parameter). |
......@@ -62,7 +68,8 @@ curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/a
"variable_type": "env_var",
"value": "TEST_1",
"protected": false,
"masked": true
"masked": true,
"environment_scope": "*"
}
```
......@@ -75,7 +82,7 @@ POST /projects/:id/variables
```
| Attribute | Type | required | Description |
|---------------------|---------|----------|-----------------------|
| ------------------- | -------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
| `id` | integer/string | yes | The ID of a project or [URL-encoded NAMESPACE/PROJECT_NAME of the project](index.md#namespaced-path-encoding) owned by the authenticated user |
| `key` | string | yes | The `key` of a variable; must have no more than 255 characters; only `A-Z`, `a-z`, `0-9`, and `_` are allowed |
| `value` | string | yes | The `value` of a variable |
......@@ -91,10 +98,10 @@ curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" \
```json
{
"variable_type": "env_var",
"key": "NEW_VARIABLE",
"value": "new value",
"protected": false,
"variable_type": "env_var",
"masked": false,
"environment_scope": "*"
}
......@@ -109,7 +116,7 @@ PUT /projects/:id/variables/:key
```
| Attribute | Type | required | Description |
|---------------------|---------|----------|-------------------------|
| ------------------- | -------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
| `id` | integer/string | yes | The ID of a project or [URL-encoded NAMESPACE/PROJECT_NAME of the project](index.md#namespaced-path-encoding) owned by the authenticated user |
| `key` | string | yes | The `key` of a variable |
| `value` | string | yes | The `value` of a variable |
......@@ -126,9 +133,9 @@ curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" \
```json
{
"variable_type": "env_var",
"key": "NEW_VARIABLE",
"value": "updated value",
"variable_type": "env_var",
"protected": true,
"masked": false,
"environment_scope": "*"
......@@ -144,7 +151,7 @@ DELETE /projects/:id/variables/:key
```
| Attribute | Type | required | Description |
|-----------|---------|----------|-------------------------|
| --------- | -------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
| `id` | integer/string | yes | The ID of a project or [URL-encoded NAMESPACE/PROJECT_NAME of the project](index.md#namespaced-path-encoding) owned by the authenticated user |
| `key` | string | yes | The `key` of a variable |
| `filter` | hash | no | Available filters: `[environment_scope]`. See the [`filter` parameter details](#the-filter-parameter). |
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment