diff options
author | Stan Hu <stanhu@gmail.com> | 2015-05-25 23:51:37 +0300 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2015-05-28 21:39:12 +0300 |
commit | 67992b9be6fc19ef4cc06de48995d1ee9617049a (patch) | |
tree | ccd191c5d27b5c9597daa4ca2e6ae1fb655ad823 /doc/api | |
parent | 06250eef2e12ed509b88f3770ae6d3fa4614b74d (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.md | 1 | ||||
-rw-r--r-- | doc/api/namespaces.md | 44 |
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" + } +] +``` |