summaryrefslogtreecommitdiff
path: root/doc/api/namespaces.md
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2015-05-25 16:51:37 -0400
committerStan Hu <stanhu@gmail.com>2015-05-28 11:39:12 -0700
commit67992b9be6fc19ef4cc06de48995d1ee9617049a (patch)
treeccd191c5d27b5c9597daa4ca2e6ae1fb655ad823 /doc/api/namespaces.md
parent06250eef2e12ed509b88f3770ae6d3fa4614b74d (diff)
downloadgitlab-ce-67992b9be6fc19ef4cc06de48995d1ee9617049a.tar.gz
Make namespace API available to all users
Closes https://github.com/gitlabhq/gitlabhq/issues/9328
Diffstat (limited to 'doc/api/namespaces.md')
-rw-r--r--doc/api/namespaces.md44
1 files changed, 44 insertions, 0 deletions
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"
+ }
+]
+```