Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomasz Maczukin <tomasz@maczukin.pl>2016-01-13 20:51:06 +0300
committerTomasz Maczukin <tomasz@maczukin.pl>2016-01-13 20:51:27 +0300
commitd338087605791e408e696b11974995be9ebff80e (patch)
treea9191cc042e301d4324e13bc2e37229dfe860f76 /doc/api/build_variables.md
parent9e701ccd48ed442124509aeb68fe6788579efdde (diff)
Add 'Build' prefix to Variables entry name in API docs index
Diffstat (limited to 'doc/api/build_variables.md')
-rw-r--r--doc/api/build_variables.md106
1 files changed, 106 insertions, 0 deletions
diff --git a/doc/api/build_variables.md b/doc/api/build_variables.md
new file mode 100644
index 00000000000..2b804fd9051
--- /dev/null
+++ b/doc/api/build_variables.md
@@ -0,0 +1,106 @@
+# Build Variables
+
+## Variables keys
+
+All variable keys must contains only letters, digits and '\_'. They must also be no longer than 255 characters.
+
+## List project variables
+
+Get list of variables of a project.
+
+```
+GET /projects/:id/variables
+```
+
+Parameters:
+
+- `id` (required) - The ID of a project
+
+```json
+[
+ {
+ "key": "TEST_VARIABLE_1",
+ "value": "TEST_1"
+ },
+ {
+ "key": "TEST_VARIABLE_2",
+ "value": "TEST_2"
+ }
+]
+```
+
+## Show variable details
+
+Get details of specifica variable of a project.
+
+```
+GET /projects/:id/variables/:key
+```
+
+Parameters:
+
+- `id` (required) - The ID of a project
+- `key` (required) - The `key` of variable
+
+```json
+{
+ "key": "TEST_VARIABLE_1",
+ "value": "TEST_1"
+}
+```
+
+## Create variable
+
+Create new variable in project.
+
+```
+POST /projects/:id/variables
+```
+
+Parameters:
+
+- `id` (required) - The ID of a project
+- `key` (required) - The `key` for variable
+- `value` (required) - The `value` for variable
+
+```json
+{
+ "key": "NEW_VARIABLE",
+ "value": "new value"
+}
+```
+
+## Update variable
+
+Update variable.
+
+```
+PUT /projects/:id/variables/:key
+```
+
+Parameters:
+
+- `id` (required) - The ID of a project
+- `key` (required) - The `key` for variable
+- `value` (required) - The `value` for variable
+
+```json
+{
+ "key": "NEW_VARIABLE",
+ "value": "updated value"
+}
+```
+
+## Remove variable
+
+Remove variable.
+
+```
+DELETE /projects/:id/variables/:key
+```
+
+Parameters:
+
+- `id` (required) - The ID of a project
+- `key` (required) - The `key` for variable
+