summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorAgustin Henze <tin@redhat.com>2019-04-09 14:53:44 +0000
committerKamil TrzciƄski <ayufan@ayufan.eu>2019-04-09 14:53:44 +0000
commit20093f9de0b34da88a8b01ca94ee773685b16308 (patch)
tree6418fff41e2f5deeb5f3839d90472b28c18cf942 /doc
parent67c330841271537eddad6fc938aa638d68f48a11 (diff)
downloadgitlab-ce-20093f9de0b34da88a8b01ca94ee773685b16308.tar.gz
Add new permission model `read-pipeline-variable`
Used to get the variables via the API endpoint `/projects/:id/pipelines/:pipeline_id/variables` Signed-off-by: Agustin Henze <tin@redhat.com>
Diffstat (limited to 'doc')
-rw-r--r--doc/api/pipelines.md30
1 files changed, 30 insertions, 0 deletions
diff --git a/doc/api/pipelines.md b/doc/api/pipelines.md
index 43bbf463c8d..1a4310ef328 100644
--- a/doc/api/pipelines.md
+++ b/doc/api/pipelines.md
@@ -93,6 +93,36 @@ Example of response
}
```
+### Get variables of a pipeline
+
+```
+GET /projects/:id/pipelines/:pipeline_id/variables
+```
+
+| Attribute | Type | Required | Description |
+|------------|---------|----------|---------------------|
+| `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user |
+| `pipeline_id` | integer | yes | The ID of a pipeline |
+
+```
+curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/1/pipelines/46/variables"
+```
+
+Example of response
+
+```json
+[
+ {
+ "key": "RUN_NIGHTLY_BUILD",
+ "value": "true"
+ },
+ {
+ "key": "foo",
+ "value": "bar"
+ }
+]
+```
+
## Create a new pipeline
> [Introduced][ce-7209] in GitLab 8.14