From 67992b9be6fc19ef4cc06de48995d1ee9617049a Mon Sep 17 00:00:00 2001 From: Stan Hu Date: Mon, 25 May 2015 16:51:37 -0400 Subject: Make namespace API available to all users Closes https://github.com/gitlabhq/gitlabhq/issues/9328 --- doc/api/README.md | 1 + doc/api/namespaces.md | 44 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 doc/api/namespaces.md (limited to 'doc/api') 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" + } +] +``` -- cgit v1.2.1