<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>

                企業??AI智能體構建引擎,智能編排和調試,一鍵部署,支持知識庫和私有化部署方案 廣告
                # Custom Attributes API > 原文:[https://docs.gitlab.com/ee/api/custom_attributes.html](https://docs.gitlab.com/ee/api/custom_attributes.html) * [List custom attributes](#list-custom-attributes) * [Single custom attribute](#single-custom-attribute) * [Set custom attribute](#set-custom-attribute) * [Delete custom attribute](#delete-custom-attribute) # Custom Attributes API[](#custom-attributes-api "Permalink") 每個對自定義屬性的 API 調用都必須經過管理員身份驗證. 自定義屬性當前可用于用戶,組和項目,在本文檔中將其稱為"資源". ## List custom attributes[](#list-custom-attributes "Permalink") 獲取資源上的所有自定義屬性. ``` GET /users/:id/custom_attributes GET /groups/:id/custom_attributes GET /projects/:id/custom_attributes ``` | Attribute | Type | Required | Description | | --- | --- | --- | --- | | `id` | integer | yes | 資源的 ID | ``` curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/users/42/custom_attributes" ``` 響應示例: ``` [ { "key": "location", "value": "Antarctica" }, { "key": "role", "value": "Developer" } ] ``` ## Single custom attribute[](#single-custom-attribute "Permalink") 在資源上獲取單個自定義屬性. ``` GET /users/:id/custom_attributes/:key GET /groups/:id/custom_attributes/:key GET /projects/:id/custom_attributes/:key ``` | Attribute | Type | Required | Description | | --- | --- | --- | --- | | `id` | integer | yes | 資源的 ID | | `key` | string | yes | 自定義屬性的鍵 | ``` curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/users/42/custom_attributes/location" ``` 響應示例: ``` { "key": "location", "value": "Antarctica" } ``` ## Set custom attribute[](#set-custom-attribute "Permalink") 在資源上設置自定義屬性. 如果該屬性已經存在,則將對其進行更新;否則,將重新創建該屬性. ``` PUT /users/:id/custom_attributes/:key PUT /groups/:id/custom_attributes/:key PUT /projects/:id/custom_attributes/:key ``` | Attribute | Type | Required | Description | | --- | --- | --- | --- | | `id` | integer | yes | 資源的 ID | | `key` | string | yes | 自定義屬性的鍵 | | `value` | string | yes | 自定義屬性的值 | ``` curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" --data "value=Greenland" "https://gitlab.example.com/api/v4/users/42/custom_attributes/location" ``` 響應示例: ``` { "key": "location", "value": "Greenland" } ``` ## Delete custom attribute[](#delete-custom-attribute "Permalink") 刪除資源上的自定義屬性. ``` DELETE /users/:id/custom_attributes/:key DELETE /groups/:id/custom_attributes/:key DELETE /projects/:id/custom_attributes/:key ``` | Attribute | Type | Required | Description | | --- | --- | --- | --- | | `id` | integer | yes | 資源的 ID | | `key` | string | yes | 自定義屬性的鍵 | ``` curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/users/42/custom_attributes/location" ```
                  <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>

                              哎呀哎呀视频在线观看