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
path: root/doc/api
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2015-05-25 23:51:37 +0300
committerStan Hu <stanhu@gmail.com>2015-05-28 21:39:12 +0300
commit67992b9be6fc19ef4cc06de48995d1ee9617049a (patch)
treeccd191c5d27b5c9597daa4ca2e6ae1fb655ad823 /doc/api
parent06250eef2e12ed509b88f3770ae6d3fa4614b74d (diff)
Make namespace API available to all users
Closes https://github.com/gitlabhq/gitlabhq/issues/9328
Diffstat (limited to 'doc/api')
-rw-r--r--doc/api/README.md1
-rw-r--r--doc/api/namespaces.md44
2 files changed, 45 insertions, 0 deletions
diff --git a/doc/api/README.md b/doc/api/README.md
index f6757b0a6aa..ca58c184543 100644
--- a/doc/api/README.md
+++ b/doc/api/README.md
@@ -19,6 +19,7 @@
- [Deploy Keys](deploy_keys.md)
- [System Hooks](system_hooks.md)
- [Groups](groups.md)
+- [Namespaces](namespaces.md)
## Clients
diff --git a/doc/api/namespaces.md b/doc/api/namespaces.md
new file mode 100644
index 00000000000..7b3238441f6
--- /dev/null
+++ b/doc/api/namespaces.md
@@ -0,0 +1,44 @@
+# Namespaces
+
+## List namespaces
+
+Get a list of namespaces. (As user: my namespaces, as admin: all namespaces)
+
+```
+GET /namespaces
+```
+
+```json
+[
+ {
+ "id": 1,
+ "path": "user1",
+ "kind": "user"
+ },
+ {
+ "id": 2,
+ "path": "group1",
+ "kind": "group"
+ }
+]
+```
+
+You can search for namespaces by name or path, see below.
+
+## Search for namespace
+
+Get all namespaces that match your string in their name or path.
+
+```
+GET /namespaces?search=foobar
+```
+
+```json
+[
+ {
+ "id": 1,
+ "path": "user1",
+ "kind": "user"
+ }
+]
+```