summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorRobert Speicher <robert@gitlab.com>2016-10-12 18:38:02 +0000
committerRobert Speicher <robert@gitlab.com>2016-10-12 18:38:02 +0000
commit58e2b44afe535100508eb4d49d7e7df24e408383 (patch)
tree297acd474db338de3de6290543e8f14bbe2c4252 /doc
parent5aa7b13c2ed61f22aa3be48b2ad5fe2ed6ea3a5e (diff)
parentb998479c81512b7c9a2cff28e7aabff3c4be0424 (diff)
downloadgitlab-ce-58e2b44afe535100508eb4d49d7e7df24e408383.tar.gz
Merge branch 'api-version' into 'master'
API: Version information ## What does this MR do? Adds a new endpoint to retrieve the version information. ## Why was this MR needed? Clients can now use this information to enable/disable certain API features depending on the version. ## What are the relevant issue numbers? Closes #22608, https://gitlab.com/gitlab-org/gitlab-ce/issues/23148 See merge request !6822
Diffstat (limited to 'doc')
-rw-r--r--doc/api/README.md1
-rw-r--r--doc/api/version.md23
2 files changed, 24 insertions, 0 deletions
diff --git a/doc/api/README.md b/doc/api/README.md
index 00cb003ed8a..3fbe5197a21 100644
--- a/doc/api/README.md
+++ b/doc/api/README.md
@@ -48,6 +48,7 @@ following locations:
- [Todos](todos.md)
- [Users](users.md)
- [Validate CI configuration](ci/lint.md)
+- [Version](version.md)
### Internal CI API
diff --git a/doc/api/version.md b/doc/api/version.md
new file mode 100644
index 00000000000..287d17cf97f
--- /dev/null
+++ b/doc/api/version.md
@@ -0,0 +1,23 @@
+# Version API
+
+>**Note:** This feature was introduced in GitLab 8.13
+
+Retrieve version information for this GitLab instance. Responds `200 OK` for
+authenticated users.
+
+```
+GET /version
+```
+
+```bash
+curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/version
+```
+
+Example response:
+
+```json
+{
+ "version": "8.13.0-pre",
+ "revision": "4e963fe"
+}
+```