From d338087605791e408e696b11974995be9ebff80e Mon Sep 17 00:00:00 2001 From: Tomasz Maczukin Date: Wed, 13 Jan 2016 18:51:06 +0100 Subject: Add 'Build' prefix to Variables entry name in API docs index --- doc/api/README.md | 2 +- doc/api/build_variables.md | 106 +++++++++++++++++++++++++++++++++++++++++++++ doc/api/variables.md | 106 --------------------------------------------- 3 files changed, 107 insertions(+), 107 deletions(-) create mode 100644 doc/api/build_variables.md delete mode 100644 doc/api/variables.md (limited to 'doc/api') diff --git a/doc/api/README.md b/doc/api/README.md index 198b4ddfee1..c3401bcbc9d 100644 --- a/doc/api/README.md +++ b/doc/api/README.md @@ -23,7 +23,7 @@ - [Namespaces](namespaces.md) - [Settings](settings.md) - [Keys](keys.md) -- [Variables](variables.md) +- [Build Variables](build_variables.md) ## Clients 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 + diff --git a/doc/api/variables.md b/doc/api/variables.md deleted file mode 100644 index cdc9ba42254..00000000000 --- a/doc/api/variables.md +++ /dev/null @@ -1,106 +0,0 @@ -# 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 - -- cgit v1.2.1