<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                合規國際互聯網加速 OSASE為企業客戶提供高速穩定SD-WAN國際加速解決方案。 廣告
                # Namespaces API > 原文:[https://docs.gitlab.com/ee/api/namespaces.html](https://docs.gitlab.com/ee/api/namespaces.html) * [List namespaces](#list-namespaces) * [Search for namespace](#search-for-namespace) * [Get namespace by ID](#get-namespace-by-id) # Namespaces API[](#namespaces-api "Permalink") 用戶名和組名屬于稱為命名空間的特殊類別. 對于用戶和組支持的 API 調用,請分別參閱[用戶](users.html)和[組](groups.html)文檔. [使用分頁](README.html#pagination) . ## List namespaces[](#list-namespaces "Permalink") 獲取已認證用戶的名稱空間列表. 如果用戶是管理員,則會顯示 GitLab 實例中所有名稱空間的列表. ``` GET /namespaces ``` 請求示例: ``` curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/namespaces" ``` 響應示例: ``` [ { "id": 1, "name": "user1", "path": "user1", "kind": "user", "full_path": "user1" }, { "id": 2, "name": "group1", "path": "group1", "kind": "group", "full_path": "group1", "parent_id": null, "members_count_with_descendants": 2 }, { "id": 3, "name": "bar", "path": "bar", "kind": "group", "full_path": "foo/bar", "parent_id": 9, "members_count_with_descendants": 5 } ] ``` GitLab.com [Bronze 或更高版本](https://about.gitlab.com/pricing/#gitlab-com)上的用戶可能還會看到與名稱空間關聯的`plan`參數: ``` [ { "id": 1, "name": "user1", "plan": "bronze", ... } ] ``` **注意:**僅向組維護者/所有者提供了`members_count_with_descendants`和`plan` . ## Search for namespace[](#search-for-namespace "Permalink") 獲取與名稱或路徑中的字符串匹配的所有名稱空間. ``` GET /namespaces?search=foobar ``` | Attribute | Type | Required | Description | | --- | --- | --- | --- | | `search` | string | no | 返回基于搜索條件授權用戶查看的名稱空間列表 | 請求示例: ``` curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/namespaces?search=twitter" ``` 響應示例: ``` [ { "id": 4, "name": "twitter", "path": "twitter", "kind": "group", "full_path": "twitter", "parent_id": null, "members_count_with_descendants": 2 } ] ``` ## Get namespace by ID[](#get-namespace-by-id "Permalink") 通過 ID 獲取名稱空間. ``` GET /namespaces/:id ``` | Attribute | Type | Required | Description | | --- | --- | --- | --- | | `id` | integer/string | yes | [名稱空間的](README.html#namespaced-path-encoding) ID 或[URL 編碼的路徑](README.html#namespaced-path-encoding) | 請求示例: ``` curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/namespaces/2" ``` 響應示例: ``` { "id": 2, "name": "group1", "path": "group1", "kind": "group", "full_path": "group1", "parent_id": null, "members_count_with_descendants": 2 } ``` 請求示例: ``` curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/namespaces/group1" ``` 響應示例: ``` { "id": 2, "name": "group1", "path": "group1", "kind": "group", "full_path": "group1", "parent_id": null, "members_count_with_descendants": 2 } ```
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看