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/namespaces.md | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 doc/api/namespaces.md (limited to 'doc/api/namespaces.md') 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