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

                ??一站式輕松地調用各大LLM模型接口,支持GPT4、智譜、豆包、星火、月之暗面及文生圖、文生視頻 廣告
                # Search API > 原文:[https://docs.gitlab.com/ee/api/search.html](https://docs.gitlab.com/ee/api/search.html) * [Global Search API](#global-search-api) * [Scope: projects](#scope-projects) * [Scope: issues](#scope-issues) * [Scope: merge_requests](#scope-merge_requests) * [Scope: milestones](#scope-milestones) * [Scope: snippet_titles](#scope-snippet_titles) * [Scope: wiki_blobs](#scope-wiki_blobs-starter) * [Scope: commits](#scope-commits-starter) * [Scope: blobs](#scope-blobs-starter) * [Scope: users](#scope-users) * [Group Search API](#group-search-api) * [Scope: projects](#scope-projects-1) * [Scope: issues](#scope-issues-1) * [Scope: merge_requests](#scope-merge_requests-1) * [Scope: milestones](#scope-milestones-1) * [Scope: wiki_blobs](#scope-wiki_blobs-starter-1) * [Scope: commits](#scope-commits-starter-1) * [Scope: blobs](#scope-blobs-starter-1) * [Scope: users](#scope-users-1) * [Project Search API](#project-search-api) * [Scope: issues](#scope-issues-2) * [Scope: merge_requests](#scope-merge_requests-2) * [Scope: milestones](#scope-milestones-2) * [Scope: notes](#scope-notes) * [Scope: wiki_blobs](#scope-wiki_blobs) * [Scope: commits](#scope-commits) * [Scope: blobs](#scope-blobs) * [Scope: users](#scope-users-2) # Search API[](#search-api "Permalink") 在 GitLab 10.5 中[引入](https://gitlab.com/gitlab-org/gitlab-foss/-/issues/41763) . 搜索的每個 API 調用都必須經過驗證. ## Global Search API[](#global-search-api "Permalink") 在整個 GitLab 實例中進行全局搜索. ``` GET /search ``` | Attribute | Type | Required | Description | | --- | --- | --- | --- | | `scope` | string | yes | 搜索范圍 | | `search` | string | yes | 搜索查詢 | 在指定范圍內搜索表達式. 當前支持以下范圍:項目,問題,merge_requests,里程碑,snippet_titles,用戶. 如果啟用了 Elasticsearch,則其他可用范圍是 blob,wiki_blobs 和 commits. 查找有關[該功能的](../integration/elasticsearch.html)更多信息. 響應取決于請求的范圍. ### Scope: projects[](#scope-projects "Permalink") ``` curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/search?scope=projects&search=flight" ``` 響應示例: ``` [ { "id": 6, "description": "Nobis sed ipsam vero quod cupiditate veritatis hic.", "name": "Flight", "name_with_namespace": "Twitter / Flight", "path": "flight", "path_with_namespace": "twitter/flight", "created_at": "2017-09-05T07:58:01.621Z", "default_branch": "master", "tag_list":[], "ssh_url_to_repo": "ssh://jarka@localhost:2222/twitter/flight.git", "http_url_to_repo": "http://localhost:3000/twitter/flight.git", "web_url": "http://localhost:3000/twitter/flight", "avatar_url": null, "star_count": 0, "forks_count": 0, "last_activity_at": "2018-01-31T09:56:30.902Z" } ] ``` ### Scope: issues[](#scope-issues "Permalink") ``` curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/search?scope=issues&search=file" ``` 響應示例: ``` [ { "id": 83, "iid": 1, "project_id": 12, "title": "Add file", "description": "Add first file", "state": "opened", "created_at": "2018-01-24T06:02:15.514Z", "updated_at": "2018-02-06T12:36:23.263Z", "closed_at": null, "labels":[], "milestone": null, "assignees": [{ "id": 20, "name": "Ceola Deckow", "username": "sammy.collier", "state": "active", "avatar_url": "https://www.gravatar.com/avatar/c23d85a4f50e0ea76ab739156c639231?s=80&d=identicon", "web_url": "http://localhost:3000/sammy.collier" }], "author": { "id": 1, "name": "Administrator", "username": "root", "state": "active", "avatar_url": "https://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon", "web_url": "http://localhost:3000/root" }, "assignee": { "id": 20, "name": "Ceola Deckow", "username": "sammy.collier", "state": "active", "avatar_url": "https://www.gravatar.com/avatar/c23d85a4f50e0ea76ab739156c639231?s=80&d=identicon", "web_url": "http://localhost:3000/sammy.collier" }, "user_notes_count": 0, "upvotes": 0, "downvotes": 0, "due_date": null, "confidential": false, "discussion_locked": null, "web_url": "http://localhost:3000/h5bp/7bp/subgroup-prj/issues/1", "time_stats": { "time_estimate": 0, "total_time_spent": 0, "human_time_estimate": null, "human_total_time_spent": null } } ] ``` **注意** :不建議使用`assignee`列,現在我們將其顯示為符合 GitLab EE API 的單一大小的數組`assignees` . ### Scope: merge_requests[](#scope-merge_requests "Permalink") ``` curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/search?scope=merge_requests&search=file" ``` 響應示例: ``` [ { "id": 56, "iid": 8, "project_id": 6, "title": "Add first file", "description": "This is a test MR to add file", "state": "opened", "created_at": "2018-01-22T14:21:50.830Z", "updated_at": "2018-02-06T12:40:33.295Z", "target_branch": "master", "source_branch": "jaja-test", "upvotes": 0, "downvotes": 0, "author": { "id": 1, "name": "Administrator", "username": "root", "state": "active", "avatar_url": "https://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon", "web_url": "http://localhost:3000/root" }, "assignee": { "id": 5, "name": "Jacquelyn Kutch", "username": "abigail", "state": "active", "avatar_url": "https://www.gravatar.com/avatar/3138c66095ee4bd11a508c2f7f7772da?s=80&d=identicon", "web_url": "http://localhost:3000/abigail" }, "source_project_id": 6, "target_project_id": 6, "labels": [ "ruby", "tests" ], "work_in_progress": false, "milestone": { "id": 13, "iid": 3, "project_id": 6, "title": "v2.0", "description": "Qui aut qui eos dolor beatae itaque tempore molestiae.", "state": "active", "created_at": "2017-09-05T07:58:29.099Z", "updated_at": "2017-09-05T07:58:29.099Z", "due_date": null, "start_date": null }, "merge_when_pipeline_succeeds": false, "merge_status": "can_be_merged", "sha": "78765a2d5e0a43585945c58e61ba2f822e4d090b", "merge_commit_sha": null, "squash_commit_sha": null, "user_notes_count": 0, "discussion_locked": null, "should_remove_source_branch": null, "force_remove_source_branch": true, "web_url": "http://localhost:3000/twitter/flight/merge_requests/8", "time_stats": { "time_estimate": 0, "total_time_spent": 0, "human_time_estimate": null, "human_total_time_spent": null } } ] ``` ### Scope: milestones[](#scope-milestones "Permalink") ``` curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/search?scope=milestones&search=release" ``` 響應示例: ``` [ { "id": 44, "iid": 1, "project_id": 12, "title": "next release", "description": "Next release milestone", "state": "active", "created_at": "2018-02-06T12:43:39.271Z", "updated_at": "2018-02-06T12:44:01.298Z", "due_date": "2018-04-18", "start_date": "2018-02-04" } ] ``` ### Scope: snippet_titles[](#scope-snippet_titles "Permalink") ``` curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/search?scope=snippet_titles&search=sample" ``` 響應示例: ``` [ { "id": 50, "title": "Sample file", "file_name": "file.rb", "description": "Simple ruby file", "author": { "id": 1, "name": "Administrator", "username": "root", "state": "active", "avatar_url": "https://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon", "web_url": "http://localhost:3000/root" }, "updated_at": "2018-02-06T12:49:29.104Z", "created_at": "2017-11-28T08:20:18.071Z", "project_id": 9, "web_url": "http://localhost:3000/root/jira-test/snippets/50" } ] ``` ### Scope: wiki_blobs[](#scope-wiki_blobs-starter "Permalink") 僅當啟用[Elasticsearch 時,](../integration/elasticsearch.html)此范圍才可用. ``` curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/search?scope=wiki_blobs&search=bye" ``` Example response: ``` [ { "basename": "home", "data": "hello\n\nand bye\n\nend", "path": "home.md", "filename": "home.md", "id": null, "ref": "master", "startline": 5, "project_id": 6 } ] ``` **注意:**不建議使用`filename`而推薦使用`path` . 兩者都返回存儲庫中文件的完整路徑,但將來`filename`名將僅是文件名,而不是完整路徑. 有關詳細信息,請參見[問題 34521](https://gitlab.com/gitlab-org/gitlab/-/issues/34521) . ### Scope: commits[](#scope-commits-starter "Permalink") 僅當啟用[Elasticsearch 時,](../integration/elasticsearch.html)此范圍才可用. ``` curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/search?scope=commits&search=bye" ``` 響應示例: ``` [ { "id": "4109c2d872d5fdb1ed057400d103766aaea97f98", "short_id": "4109c2d8", "title": "goodbye $.browser", "created_at": "2013-02-18T22:02:54.000Z", "parent_ids": [ "59d05353ab575bcc2aa958fe1782e93297de64c9" ], "message": "goodbye $.browser\n", "author_name": "angus croll", "author_email": "anguscroll@gmail.com", "authored_date": "2013-02-18T22:02:54.000Z", "committer_name": "angus croll", "committer_email": "anguscroll@gmail.com", "committed_date": "2013-02-18T22:02:54.000Z", "project_id": 6 } ] ``` ### Scope: blobs[](#scope-blobs-starter "Permalink") 僅當啟用[Elasticsearch 時,](../integration/elasticsearch.html)此范圍才可用. 過濾器可用于以下范圍: * filename * path * extension 要使用過濾器,只需將其包含在查詢中,如下所示: `a query filename:some_name*` . 您可以使用通配符( `*` )使用全局匹配. ``` curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/search?scope=blobs&search=installation" ``` 響應示例: ``` [ { "basename": "README", "data": "```\n\n## Installation\n\nQuick start using the [pre-built", "path": "README.md", "filename": "README.md", "id": null, "ref": "master", "startline": 46, "project_id": 6 } ] ``` **注意:**不建議使用`filename`而推薦使用`path` . 兩者都返回存儲庫中文件的完整路徑,但將來`filename`名將僅是文件名,而不是完整路徑. 有關詳細信息,請參見[問題 34521](https://gitlab.com/gitlab-org/gitlab/-/issues/34521) . ### Scope: users[](#scope-users "Permalink") ``` curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/search?scope=users&search=doe" ``` 響應示例: ``` [ { "id": 1, "name": "John Doe1", "username": "user1", "state": "active", "avatar_url": "http://www.gravatar.com/avatar/c922747a93b40d1ea88262bf1aebee62?s=80&d=identicon", "web_url": "http://localhost/user1" } ] ``` ## Group Search API[](#group-search-api "Permalink") 在指定的組中搜索. 如果用戶不是組的成員,并且該組是私有的,則對該組的`GET`請求將導致`404`狀態代碼. ``` GET /groups/:id/search ``` | Attribute | Type | Required | Description | | --- | --- | --- | --- | | `id` | integer/string | yes | 認證用戶擁有[的組](README.html#namespaced-path-encoding)的 ID 或[URL 編碼路徑](README.html#namespaced-path-encoding) | | `scope` | string | yes | 搜索范圍 | | `search` | string | yes | 搜索查詢 | 在指定范圍內搜索表達式. 當前支持以下范圍:項目,問題,merge_requests,里程碑,用戶. 如果啟用了 Elasticsearch,則其他可用范圍是 blob,wiki_blobs 和 commits. 查找有關[該功能的](../integration/elasticsearch.html)更多信息. 響應取決于請求的范圍. ### Scope: projects[](#scope-projects-1 "Permalink") ``` curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/groups/3/search?scope=projects&search=flight" ``` 響應示例: ``` [ { "id": 6, "description": "Nobis sed ipsam vero quod cupiditate veritatis hic.", "name": "Flight", "name_with_namespace": "Twitter / Flight", "path": "flight", "path_with_namespace": "twitter/flight", "created_at": "2017-09-05T07:58:01.621Z", "default_branch": "master", "tag_list":[], "ssh_url_to_repo": "ssh://jarka@localhost:2222/twitter/flight.git", "http_url_to_repo": "http://localhost:3000/twitter/flight.git", "web_url": "http://localhost:3000/twitter/flight", "avatar_url": null, "star_count": 0, "forks_count": 0, "last_activity_at": "2018-01-31T09:56:30.902Z" } ] ``` ### Scope: issues[](#scope-issues-1 "Permalink") ``` curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/groups/3/search?scope=issues&search=file" ``` 響應示例: ``` [ { "id": 83, "iid": 1, "project_id": 12, "title": "Add file", "description": "Add first file", "state": "opened", "created_at": "2018-01-24T06:02:15.514Z", "updated_at": "2018-02-06T12:36:23.263Z", "closed_at": null, "labels":[], "milestone": null, "assignees": [{ "id": 20, "name": "Ceola Deckow", "username": "sammy.collier", "state": "active", "avatar_url": "https://www.gravatar.com/avatar/c23d85a4f50e0ea76ab739156c639231?s=80&d=identicon", "web_url": "http://localhost:3000/sammy.collier" }], "author": { "id": 1, "name": "Administrator", "username": "root", "state": "active", "avatar_url": "https://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon", "web_url": "http://localhost:3000/root" }, "assignee": { "id": 20, "name": "Ceola Deckow", "username": "sammy.collier", "state": "active", "avatar_url": "https://www.gravatar.com/avatar/c23d85a4f50e0ea76ab739156c639231?s=80&d=identicon", "web_url": "http://localhost:3000/sammy.collier" }, "user_notes_count": 0, "upvotes": 0, "downvotes": 0, "due_date": null, "confidential": false, "discussion_locked": null, "web_url": "http://localhost:3000/h5bp/7bp/subgroup-prj/issues/1", "time_stats": { "time_estimate": 0, "total_time_spent": 0, "human_time_estimate": null, "human_total_time_spent": null } } ] ``` **注意** :不建議使用`assignee`列,現在我們將其顯示為符合 GitLab EE API 的單一大小的數組`assignees` . ### Scope: merge_requests[](#scope-merge_requests-1 "Permalink") ``` curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/groups/3/search?scope=merge_requests&search=file" ``` 響應示例: ``` [ { "id": 56, "iid": 8, "project_id": 6, "title": "Add first file", "description": "This is a test MR to add file", "state": "opened", "created_at": "2018-01-22T14:21:50.830Z", "updated_at": "2018-02-06T12:40:33.295Z", "target_branch": "master", "source_branch": "jaja-test", "upvotes": 0, "downvotes": 0, "author": { "id": 1, "name": "Administrator", "username": "root", "state": "active", "avatar_url": "https://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon", "web_url": "http://localhost:3000/root" }, "assignee": { "id": 5, "name": "Jacquelyn Kutch", "username": "abigail", "state": "active", "avatar_url": "https://www.gravatar.com/avatar/3138c66095ee4bd11a508c2f7f7772da?s=80&d=identicon", "web_url": "http://localhost:3000/abigail" }, "source_project_id": 6, "target_project_id": 6, "labels": [ "ruby", "tests" ], "work_in_progress": false, "milestone": { "id": 13, "iid": 3, "project_id": 6, "title": "v2.0", "description": "Qui aut qui eos dolor beatae itaque tempore molestiae.", "state": "active", "created_at": "2017-09-05T07:58:29.099Z", "updated_at": "2017-09-05T07:58:29.099Z", "due_date": null, "start_date": null }, "merge_when_pipeline_succeeds": false, "merge_status": "can_be_merged", "sha": "78765a2d5e0a43585945c58e61ba2f822e4d090b", "merge_commit_sha": null, "squash_commit_sha": null, "user_notes_count": 0, "discussion_locked": null, "should_remove_source_branch": null, "force_remove_source_branch": true, "web_url": "http://localhost:3000/twitter/flight/merge_requests/8", "time_stats": { "time_estimate": 0, "total_time_spent": 0, "human_time_estimate": null, "human_total_time_spent": null } } ] ``` ### Scope: milestones[](#scope-milestones-1 "Permalink") ``` curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/groups/3/search?scope=milestones&search=release" ``` 響應示例: ``` [ { "id": 44, "iid": 1, "project_id": 12, "title": "next release", "description": "Next release milestone", "state": "active", "created_at": "2018-02-06T12:43:39.271Z", "updated_at": "2018-02-06T12:44:01.298Z", "due_date": "2018-04-18", "start_date": "2018-02-04" } ] ``` ### Scope: wiki_blobs[](#scope-wiki_blobs-starter-1 "Permalink") 僅當啟用[Elasticsearch 時,](../integration/elasticsearch.html)此范圍才可用. ``` curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/groups/6/search?scope=wiki_blobs&search=bye" ``` 響應示例: ``` [ { "basename": "home", "data": "hello\n\nand bye\n\nend", "path": "home.md", "filename": "home.md", "id": null, "ref": "master", "startline": 5, "project_id": 6 } ] ``` **注意:**不建議使用`filename`而推薦使用`path` . 兩者都返回存儲庫中文件的完整路徑,但將來`filename`名將僅是文件名,而不是完整路徑. 有關詳細信息,請參見[問題 34521](https://gitlab.com/gitlab-org/gitlab/-/issues/34521) . ### Scope: commits[](#scope-commits-starter-1 "Permalink") 僅當啟用[Elasticsearch 時,](../integration/elasticsearch.html)此范圍才可用. ``` curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/groups/6/search?scope=commits&search=bye" ``` 響應示例: ``` [ { "id": "4109c2d872d5fdb1ed057400d103766aaea97f98", "short_id": "4109c2d8", "title": "goodbye $.browser", "created_at": "2013-02-18T22:02:54.000Z", "parent_ids": [ "59d05353ab575bcc2aa958fe1782e93297de64c9" ], "message": "goodbye $.browser\n", "author_name": "angus croll", "author_email": "anguscroll@gmail.com", "authored_date": "2013-02-18T22:02:54.000Z", "committer_name": "angus croll", "committer_email": "anguscroll@gmail.com", "committed_date": "2013-02-18T22:02:54.000Z", "project_id": 6 } ] ``` ### Scope: blobs[](#scope-blobs-starter-1 "Permalink") 僅當啟用[Elasticsearch 時,](../integration/elasticsearch.html)此范圍才可用. 過濾器可用于以下范圍: * filename * path * extension 要使用過濾器,只需將其包含在查詢中,如下所示: `a query filename:some_name*` . 您可以使用通配符( `*` )使用全局匹配. ``` curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/groups/6/search?scope=blobs&search=installation" ``` 響應示例: ``` [ { "basename": "README", "data": "```\n\n## Installation\n\nQuick start using the [pre-built", "path": "README.md", "filename": "README.md", "id": null, "ref": "master", "startline": 46, "project_id": 6 } ] ``` **注意:**不建議使用`filename`而推薦使用`path` . 兩者都返回存儲庫中文件的完整路徑,但將來`filename`名將僅是文件名,而不是完整路徑. 有關詳細信息,請參見[問題 34521](https://gitlab.com/gitlab-org/gitlab/-/issues/34521) . ### Scope: users[](#scope-users-1 "Permalink") ``` curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/groups/3/search?scope=users&search=doe" ``` 響應示例: ``` [ { "id": 1, "name": "John Doe1", "username": "user1", "state": "active", "avatar_url": "http://www.gravatar.com/avatar/c922747a93b40d1ea88262bf1aebee62?s=80&d=identicon", "web_url": "http://localhost/user1" } ] ``` ## Project Search API[](#project-search-api "Permalink") 在指定項目中搜索. 如果用戶不是項目成員,并且該項目是私有項目,則對該項目的`GET`請求將導致`404`狀態代碼. ``` GET /projects/:id/search ``` | Attribute | Type | Required | Description | | --- | --- | --- | --- | | `id` | integer/string | yes | 經過身份驗證的用戶擁有[的項目](README.html#namespaced-path-encoding)的 ID 或[URL 編碼路徑](README.html#namespaced-path-encoding) | | `scope` | string | yes | 搜索范圍 | | `search` | string | yes | 搜索查詢 | | `ref` | string | no | 要搜索的存儲庫分支或標記的名稱. 默認情況下使用項目的默認分支. 這僅適用于范圍:commit,blob 和 wiki_blobs. | 在指定范圍內搜索表達式. 當前支持以下范圍:問題,merge_requests,里程碑,注釋,wiki_blob,提交,blob,用戶. 響應取決于請求的范圍. ### Scope: issues[](#scope-issues-2 "Permalink") ``` curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/12/search?scope=issues&search=file" ``` 響應示例: ``` [ { "id": 83, "iid": 1, "project_id": 12, "title": "Add file", "description": "Add first file", "state": "opened", "created_at": "2018-01-24T06:02:15.514Z", "updated_at": "2018-02-06T12:36:23.263Z", "closed_at": null, "labels":[], "milestone": null, "assignees": [{ "id": 20, "name": "Ceola Deckow", "username": "sammy.collier", "state": "active", "avatar_url": "https://www.gravatar.com/avatar/c23d85a4f50e0ea76ab739156c639231?s=80&d=identicon", "web_url": "http://localhost:3000/sammy.collier" }], "author": { "id": 1, "name": "Administrator", "username": "root", "state": "active", "avatar_url": "https://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon", "web_url": "http://localhost:3000/root" }, "assignee": { "id": 20, "name": "Ceola Deckow", "username": "sammy.collier", "state": "active", "avatar_url": "https://www.gravatar.com/avatar/c23d85a4f50e0ea76ab739156c639231?s=80&d=identicon", "web_url": "http://localhost:3000/sammy.collier" }, "user_notes_count": 0, "upvotes": 0, "downvotes": 0, "due_date": null, "confidential": false, "discussion_locked": null, "web_url": "http://localhost:3000/h5bp/7bp/subgroup-prj/issues/1", "time_stats": { "time_estimate": 0, "total_time_spent": 0, "human_time_estimate": null, "human_total_time_spent": null } } ] ``` **注意** :不建議使用`assignee`列,現在我們將其顯示為符合 GitLab EE API 的單一大小的數組`assignees` . ### Scope: merge_requests[](#scope-merge_requests-2 "Permalink") ``` curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/6/search?scope=merge_requests&search=file" ``` 響應示例: ``` [ { "id": 56, "iid": 8, "project_id": 6, "title": "Add first file", "description": "This is a test MR to add file", "state": "opened", "created_at": "2018-01-22T14:21:50.830Z", "updated_at": "2018-02-06T12:40:33.295Z", "target_branch": "master", "source_branch": "jaja-test", "upvotes": 0, "downvotes": 0, "author": { "id": 1, "name": "Administrator", "username": "root", "state": "active", "avatar_url": "https://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon", "web_url": "http://localhost:3000/root" }, "assignee": { "id": 5, "name": "Jacquelyn Kutch", "username": "abigail", "state": "active", "avatar_url": "https://www.gravatar.com/avatar/3138c66095ee4bd11a508c2f7f7772da?s=80&d=identicon", "web_url": "http://localhost:3000/abigail" }, "source_project_id": 6, "target_project_id": 6, "labels": [ "ruby", "tests" ], "work_in_progress": false, "milestone": { "id": 13, "iid": 3, "project_id": 6, "title": "v2.0", "description": "Qui aut qui eos dolor beatae itaque tempore molestiae.", "state": "active", "created_at": "2017-09-05T07:58:29.099Z", "updated_at": "2017-09-05T07:58:29.099Z", "due_date": null, "start_date": null }, "merge_when_pipeline_succeeds": false, "merge_status": "can_be_merged", "sha": "78765a2d5e0a43585945c58e61ba2f822e4d090b", "merge_commit_sha": null, "squash_commit_sha": null, "user_notes_count": 0, "discussion_locked": null, "should_remove_source_branch": null, "force_remove_source_branch": true, "web_url": "http://localhost:3000/twitter/flight/merge_requests/8", "time_stats": { "time_estimate": 0, "total_time_spent": 0, "human_time_estimate": null, "human_total_time_spent": null } } ] ``` ### Scope: milestones[](#scope-milestones-2 "Permalink") ``` curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/12/search?scope=milestones&search=release" ``` 響應示例: ``` [ { "id": 44, "iid": 1, "project_id": 12, "title": "next release", "description": "Next release milestone", "state": "active", "created_at": "2018-02-06T12:43:39.271Z", "updated_at": "2018-02-06T12:44:01.298Z", "due_date": "2018-04-18", "start_date": "2018-02-04" } ] ``` ### Scope: notes[](#scope-notes "Permalink") ``` curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/6/search?scope=notes&search=maxime" ``` 響應示例: ``` [ { "id": 191, "body": "Harum maxime consequuntur et et deleniti assumenda facilis.", "attachment": null, "author": { "id": 23, "name": "User 1", "username": "user1", "state": "active", "avatar_url": "https://www.gravatar.com/avatar/111d68d06e2d317b5a59c2c6c5bad808?s=80&d=identicon", "web_url": "http://localhost:3000/user1" }, "created_at": "2017-09-05T08:01:32.068Z", "updated_at": "2017-09-05T08:01:32.068Z", "system": false, "noteable_id": 22, "noteable_type": "Issue", "noteable_iid": 2 } ] ``` ### Scope: wiki_blobs[](#scope-wiki_blobs "Permalink") 過濾器可用于以下范圍: * filename * path * extension 要使用過濾器,只需將其包含在查詢中,例如: `a query filename:some_name*` . 您可以使用通配符( `*` )使用全局匹配. Wiki blobs searches are performed on both filenames and contents. Search results: * 在文件名中找到的結果顯示在內容中之前. * 可能包含同一 blob 的多個匹配項,因為可能在文件名和內容中都找到了搜索字符串,或者在內容中可能出現了多次. ``` curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/6/search?scope=wiki_blobs&search=bye" ``` 響應示例: ``` [ { "basename": "home", "data": "hello\n\nand bye\n\nend", "path": "home.md", "filename": "home.md", "id": null, "ref": "master", "startline": 5, "project_id": 6 } ] ``` **注意:**不建議使用`filename`而推薦使用`path` . 兩者都返回存儲庫中文件的完整路徑,但將來`filename`名將僅是文件名,而不是完整路徑. 有關詳細信息,請參見[問題 34521](https://gitlab.com/gitlab-org/gitlab/-/issues/34521) . ### Scope: commits[](#scope-commits "Permalink") ``` curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/6/search?scope=commits&search=bye" ``` 響應示例: ``` [ { "id": "4109c2d872d5fdb1ed057400d103766aaea97f98", "short_id": "4109c2d8", "title": "goodbye $.browser", "created_at": "2013-02-18T22:02:54.000Z", "parent_ids": [ "59d05353ab575bcc2aa958fe1782e93297de64c9" ], "message": "goodbye $.browser\n", "author_name": "angus croll", "author_email": "anguscroll@gmail.com", "authored_date": "2013-02-18T22:02:54.000Z", "committer_name": "angus croll", "committer_email": "anguscroll@gmail.com", "committed_date": "2013-02-18T22:02:54.000Z", "project_id": 6 } ] ``` ### Scope: blobs[](#scope-blobs "Permalink") 過濾器可用于以下范圍: * filename * path * extension 要使用過濾器,只需將其包含在查詢中,例如: `a query filename:some_name*` . 您可以使用通配符( `*` )使用全局匹配. 對文件名和內容都進行 Blob 搜索. 搜索結果: * 在文件名中找到的結果顯示在內容中之前. * 可能包含同一 blob 的多個匹配項,因為可能在文件名和內容中都找到了搜索字符串,或者在內容中可能出現了多次. ``` curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/6/search?scope=blobs&search=installation&ref=feature" ``` 響應示例: ``` [ { "basename": "README", "data": "```\n\n## Installation\n\nQuick start using the [pre-built", "path": "README.md", "filename": "README.md", "id": null, "ref": "feature", "startline": 46, "project_id": 6 } ] ``` **注意:**不建議使用`filename`而推薦使用`path` . 兩者都返回存儲庫中文件的完整路徑,但將來`filename`名將僅是文件名,而不是完整路徑. 有關詳細信息,請參見[問題 34521](https://gitlab.com/gitlab-org/gitlab/-/issues/34521) . ### Scope: users[](#scope-users-2 "Permalink") ``` curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/6/search?scope=users&search=doe" ``` 響應示例: ``` [ { "id": 1, "name": "John Doe1", "username": "user1", "state": "active", "avatar_url": "http://www.gravatar.com/avatar/c922747a93b40d1ea88262bf1aebee62?s=80&d=identicon", "web_url": "http://localhost/user1" } ] ```
                  <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>

                              哎呀哎呀视频在线观看