<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國際加速解決方案。 廣告
                # Events > 原文:[https://docs.gitlab.com/ee/api/events.html](https://docs.gitlab.com/ee/api/events.html) * [Filter parameters](#filter-parameters) * [Action Types](#action-types) * [Target Types](#target-types) * [Date formatting](#date-formatting) * [Event Time Period Limit](#event-time-period-limit) * [List currently authenticated user’s events](#list-currently-authenticated-users-events) * [Get user contribution events](#get-user-contribution-events) * [List a Project’s visible events](#list-a-projects-visible-events) # Events[](#events "Permalink") ## Filter parameters[](#filter-parameters "Permalink") ### Action Types[](#action-types "Permalink") `action`參數的可用操作類型為: * `created` * `updated` * `closed` * `reopened` * `pushed` * `commented` * `merged` * `joined` * `left` * `destroyed` * `expired` 請注意,這些選項是小寫的. ### Target Types[](#target-types "Permalink") `target_type`參數的可用目標類型為: * `issue` * `milestone` * `merge_request` * `note` * `project` * `snippet` * `user` 請注意,這些選項是小寫的. ### Date formatting[](#date-formatting "Permalink") `before`和`after`參數的日期應以以下格式提供: ``` YYYY-MM-DD ``` ### Event Time Period Limit[](#event-time-period-limit "Permalink") GitLab removes events older than 2 years from the events table for performance reasons. ## List currently authenticated user’s events[](#list-currently-authenticated-users-events "Permalink") **注意:**該端點是在 GitLab 9.3 中引入的. 在 GitLab 11.3 中引入了`read_user`訪問. 獲取經過身份驗證的用戶的事件列表. 范圍`read_user`或`api`是必需的. ``` GET /events ``` Parameters: | Attribute | Type | Required | Description | | --- | --- | --- | --- | | `action` | string | no | 僅包括特定[動作類型的](#action-types)事件 | | `target_type` | string | no | 僅包括特定[目標類型的](#target-types)事件 | | `before` | date | no | 僅包括在特定日期之前創建的事件. 請[在此處查看受支持的格式](#date-formatting) | | `after` | date | no | 僅包括在特定日期之后創建的事件. 請[在此處查看受支持的格式](#date-formatting) | | `scope` | string | no | 包括用戶項目中的所有事件. | | `sort` | string | no | 按`created_at`對事件進行`asc`或`desc`排序. 默認為`desc` | 請求示例: ``` curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/events?target_type=issue&action=created&after=2017-01-31&before=2017-03-01&scope=all" ``` 響應示例: ``` [ { "title":null, "project_id":1, "action_name":"opened", "target_id":160, "target_type":"Issue", "author_id":25, "target_title":"Qui natus eos odio tempore et quaerat consequuntur ducimus cupiditate quis.", "created_at":"2017-02-09T10:43:19.667Z", "author":{ "name":"User 3", "username":"user3", "id":25, "state":"active", "avatar_url":"http://www.gravatar.com/avatar/97d6d9441ff85fdc730e02a6068d267b?s=80\u0026d=identicon", "web_url":"https://gitlab.example.com/user3" }, "author_username":"user3" }, { "title":null, "project_id":1, "action_name":"opened", "target_id":159, "target_type":"Issue", "author_id":21, "target_title":"Nostrum enim non et sed optio illo deleniti non.", "created_at":"2017-02-09T10:43:19.426Z", "author":{ "name":"Test User", "username":"ted", "id":21, "state":"active", "avatar_url":"http://www.gravatar.com/avatar/80fb888c9a48b9a3f87477214acaa63f?s=80\u0026d=identicon", "web_url":"https://gitlab.example.com/ted" }, "author_username":"ted" } ] ``` ### Get user contribution events[](#get-user-contribution-events "Permalink") **注意:**文檔以前位于" [用戶 API"頁面中](users.html) . 在 GitLab 11.3 中引入了`read_user`訪問. 獲取指定用戶的貢獻事件,從最新到最舊排序. 范圍`read_user`或`api`是必需的. ``` GET /users/:id/events ``` Parameters: | Attribute | Type | Required | Description | | --- | --- | --- | --- | | `id` | integer | yes | 用戶的 ID 或用戶名 | | `action` | string | no | 僅包括特定[動作類型的](#action-types)事件 | | `target_type` | string | no | 僅包括特定[目標類型的](#target-types)事件 | | `before` | date | no | 僅包括在特定日期之前創建的事件. 請[在此處查看受支持的格式](#date-formatting) | | `after` | date | no | 僅包括在特定日期之后創建的事件. 請[在此處查看受支持的格式](#date-formatting) | | `sort` | string | no | 按`created_at`對事件進行`asc`或`desc`排序. 默認為`desc` | ``` curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/users/:id/events" ``` 響應示例: ``` [ { "title": null, "project_id": 15, "action_name": "closed", "target_id": 830, "target_type": "Issue", "author_id": 1, "target_title": "Public project search field", "author": { "name": "Dmitriy Zaporozhets", "username": "root", "id": 1, "state": "active", "avatar_url": "http://localhost:3000/uploads/user/avatar/1/fox_avatar.png", "web_url": "http://localhost:3000/root" }, "author_username": "root" }, { "title": null, "project_id": 15, "action_name": "pushed", "target_id": null, "target_type": null, "author_id": 1, "author": { "name": "Dmitriy Zaporozhets", "username": "root", "id": 1, "state": "active", "avatar_url": "http://localhost:3000/uploads/user/avatar/1/fox_avatar.png", "web_url": "http://localhost:3000/root" }, "author_username": "john", "push_data": { "commit_count": 1, "action": "pushed", "ref_type": "branch", "commit_from": "50d4420237a9de7be1304607147aec22e4a14af7", "commit_to": "c5feabde2d8cd023215af4d2ceeb7a64839fc428", "ref": "master", "commit_title": "Add simple search to projects in public area" }, "target_title": null }, { "title": null, "project_id": 15, "action_name": "closed", "target_id": 840, "target_type": "Issue", "author_id": 1, "target_title": "Finish & merge Code search PR", "author": { "name": "Dmitriy Zaporozhets", "username": "root", "id": 1, "state": "active", "avatar_url": "http://localhost:3000/uploads/user/avatar/1/fox_avatar.png", "web_url": "http://localhost:3000/root" }, "author_username": "root" }, { "title": null, "project_id": 15, "action_name": "commented on", "target_id": 1312, "target_type": "Note", "author_id": 1, "target_title": null, "created_at": "2015-12-04T10:33:58.089Z", "note": { "id": 1312, "body": "What an awesome day!", "attachment": null, "author": { "name": "Dmitriy Zaporozhets", "username": "root", "id": 1, "state": "active", "avatar_url": "http://localhost:3000/uploads/user/avatar/1/fox_avatar.png", "web_url": "http://localhost:3000/root" }, "created_at": "2015-12-04T10:33:56.698Z", "system": false, "noteable_id": 377, "noteable_type": "Issue" }, "author": { "name": "Dmitriy Zaporozhets", "username": "root", "id": 1, "state": "active", "avatar_url": "http://localhost:3000/uploads/user/avatar/1/fox_avatar.png", "web_url": "http://localhost:3000/root" }, "author_username": "root" } ] ``` ## List a Project’s visible events[](#list-a-projects-visible-events "Permalink") > **注意:**此端點的時間比其他端點長. 文檔以前位于[Projects API 頁面中](projects.html) . 獲取特定項目的可見事件列表. ``` GET /projects/:project_id/events ``` Parameters: | Attribute | Type | Required | Description | | --- | --- | --- | --- | | `project_id` | integer/string | yes | 項目的 ID 或[URL 編碼的路徑](README.html#namespaced-path-encoding) | | `action` | string | no | 僅包括特定[動作類型的](#action-types)事件 | | `target_type` | string | no | 僅包括特定[目標類型的](#target-types)事件 | | `before` | date | no | 僅包括在特定日期之前創建的事件. 請[在此處查看受支持的格式](#date-formatting) | | `after` | date | no | 僅包括在特定日期之后創建的事件. 請[在此處查看受支持的格式](#date-formatting) | | `sort` | string | no | 按`created_at`對事件進行`asc`或`desc`排序. 默認為`desc` | 請求示例: ``` curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/:project_id/events?target_type=issue&action=created&after=2017-01-31&before=2017-03-01" ``` 響應示例: ``` [ { "title":null, "project_id":1, "action_name":"opened", "target_id":160, "target_iid":160, "target_type":"Issue", "author_id":25, "target_title":"Qui natus eos odio tempore et quaerat consequuntur ducimus cupiditate quis.", "created_at":"2017-02-09T10:43:19.667Z", "author":{ "name":"User 3", "username":"user3", "id":25, "state":"active", "avatar_url":"http://www.gravatar.com/avatar/97d6d9441ff85fdc730e02a6068d267b?s=80\u0026d=identicon", "web_url":"https://gitlab.example.com/user3" }, "author_username":"user3" }, { "title":null, "project_id":1, "action_name":"opened", "target_id":159, "target_iid":159, "target_type":"Issue", "author_id":21, "target_title":"Nostrum enim non et sed optio illo deleniti non.", "created_at":"2017-02-09T10:43:19.426Z", "author":{ "name":"Test User", "username":"ted", "id":21, "state":"active", "avatar_url":"http://www.gravatar.com/avatar/80fb888c9a48b9a3f87477214acaa63f?s=80\u0026d=identicon", "web_url":"https://gitlab.example.com/ted" }, "author_username":"ted" }, { "title": null, "project_id": 1, "action_name": "commented on", "target_id": 1312, "target_iid": 1312, "target_type": "Note", "author_id": 1, "data": null, "target_title": null, "created_at": "2015-12-04T10:33:58.089Z", "note": { "id": 1312, "body": "What an awesome day!", "attachment": null, "author": { "name": "Dmitriy Zaporozhets", "username": "root", "id": 1, "state": "active", "avatar_url": "https://gitlab.example.com/uploads/user/avatar/1/fox_avatar.png", "web_url": "https://gitlab.example.com/root" }, "created_at": "2015-12-04T10:33:56.698Z", "system": false, "noteable_id": 377, "noteable_type": "Issue", "noteable_iid": 377 }, "author": { "name": "Dmitriy Zaporozhets", "username": "root", "id": 1, "state": "active", "avatar_url": "https://gitlab.example.com/uploads/user/avatar/1/fox_avatar.png", "web_url": "https://gitlab.example.com/root" }, "author_username": "root" } ] ```
                  <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>

                              哎呀哎呀视频在线观看