Commit 3cb5e9e0 authored by Marcel Amirault's avatar Marcel Amirault

Merge branch 'docs-restore-search-ref' into 'master'

Docs: Restore ref attribute for Project Search API to search.md

See merge request gitlab-org/gitlab!21190
parents b382bcfa d06cb45c
...@@ -760,6 +760,7 @@ GET /projects/:id/search ...@@ -760,6 +760,7 @@ GET /projects/:id/search
| `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user | | `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user |
| `scope` | string | yes | The scope to search in | | `scope` | string | yes | The scope to search in |
| `search` | string | yes | The search query | | `search` | string | yes | The search query |
| `ref` | string | no | The name of a repository branch or tag to search on. The project's default branch is used by default. This is only applicable for scopes: commits, blobs, and wiki_blobs. |
Search the expression within the specified scope. Currently these scopes are supported: issues, merge_requests, milestones, notes, wiki_blobs, commits, blobs, users. Search the expression within the specified scope. Currently these scopes are supported: issues, merge_requests, milestones, notes, wiki_blobs, commits, blobs, users.
...@@ -1058,7 +1059,7 @@ Blobs searches are performed on both filenames and contents. Search results: ...@@ -1058,7 +1059,7 @@ Blobs searches are performed on both filenames and contents. Search results:
times in the content. times in the content.
```bash ```bash
curl --request GET --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/6/search?scope=blobs&search=installation curl --request GET --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/6/search?scope=blobs&search=installation&ref=feature
``` ```
Example response: Example response:
...@@ -1072,7 +1073,7 @@ Example response: ...@@ -1072,7 +1073,7 @@ Example response:
"path": "README.md", "path": "README.md",
"filename": "README.md", "filename": "README.md",
"id": null, "id": null,
"ref": "master", "ref": "feature",
"startline": 46, "startline": 46,
"project_id": 6 "project_id": 6
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment