From 392cc887097bfd0c28b547700b9a67c32cf14e69 Mon Sep 17 00:00:00 2001 From: Tomasz Maczukin Date: Fri, 17 Nov 2017 02:43:55 +0100 Subject: Add new API endpoint - get a namespace by ID --- doc/api/namespaces.md | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) (limited to 'doc') 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 +} +``` -- cgit v1.2.1