summaryrefslogtreecommitdiff
path: root/doc/api/namespaces.md
diff options
context:
space:
mode:
authorTomasz Maczukin <tomasz@maczukin.pl>2017-11-17 02:43:55 +0100
committerTomasz Maczukin <tomasz@maczukin.pl>2017-11-23 14:34:34 +0100
commit392cc887097bfd0c28b547700b9a67c32cf14e69 (patch)
treec63c9bb1b2420f0140371ccd90e91c173b1e274c /doc/api/namespaces.md
parentb8db9c8c8c406d4abc03ba7246bbfecbecfbc784 (diff)
downloadgitlab-ce-392cc887097bfd0c28b547700b9a67c32cf14e69.tar.gz
Add new API endpoint - get a namespace by ID
Diffstat (limited to 'doc/api/namespaces.md')
-rw-r--r--doc/api/namespaces.md32
1 files changed, 32 insertions, 0 deletions
diff --git a/doc/api/namespaces.md b/doc/api/namespaces.md
index 5c0bebbaeb0..d06b0d31c67 100644
--- a/doc/api/namespaces.md
+++ b/doc/api/namespaces.md
@@ -89,3 +89,35 @@ Example response:
}
]
```
+
+## Get namespace by ID
+
+Get a namespace by ID.
+
+```
+GET /namespaces/:id
+```
+
+| Attribute | Type | Required | Description |
+| --------- | ---- | -------- | ----------- |
+| `id` | integer | yes | ID of the namespace |
+
+Example request:
+
+```bash
+curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/namespaces/2
+```
+
+Example response:
+
+```json
+{
+ "id": 2,
+ "name": "group1",
+ "path": "group1",
+ "kind": "group",
+ "full_path": "group1",
+ "parent_id": "null",
+ "members_count_with_descendants": 2
+}
+```