Package org.gitlab4j.api
Class SearchApi
java.lang.Object
org.gitlab4j.api.AbstractApi
org.gitlab4j.api.SearchApi
- All Implemented Interfaces:
Constants
This class provides an entry point to all the GitLab API Search API calls.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.gitlab4j.api.Constants
Constants.ActionType, Constants.ApplicationScope, Constants.ArchiveFormat, Constants.AutoDevopsDeployStrategy, Constants.BuildGitStrategy, Constants.CommitBuildState, Constants.ContributorOrderBy, Constants.DeploymentOrderBy, Constants.DeploymentStatus, Constants.DeployTokenScope, Constants.Encoding, Constants.EpicOrderBy, Constants.EventScope, Constants.GroupOrderBy, Constants.GroupSearchScope, Constants.ImpersonationState, Constants.IssueOrderBy, Constants.IssueScope, Constants.IssueState, Constants.JobScope, Constants.LineType, Constants.MergeRequestOrderBy, Constants.MergeRequestScope, Constants.MergeRequestSearchIn, Constants.MergeRequestState, Constants.MilestoneState, Constants.PackageOrderBy, Constants.PackageStatus, Constants.PipelineOrderBy, Constants.PipelineScope, Constants.ProjectOrderBy, Constants.ProjectSearchScope, Constants.SearchScope, Constants.SortOrder, Constants.SquashOption, Constants.StateEvent, Constants.TagOrderBy, Constants.TargetType, Constants.TodoAction, Constants.TodoState, Constants.TodoType, Constants.TokenType
-
Field Summary
Fields inherited from class org.gitlab4j.api.AbstractApi
gitLabApi
Fields inherited from interface org.gitlab4j.api.Constants
NEXT_PAGE_HEADER, PAGE_HEADER, PAGE_PARAM, PER_PAGE, PER_PAGE_PARAM, PREV_PAGE_HEADER, TOTAL_HEADER, TOTAL_PAGES_HEADER
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionList<?>
globalSearch
(Constants.SearchScope scope, String search) Search globally across the GitLab instance.Pager<?>
globalSearch
(Constants.SearchScope scope, String search, int itemsPerPage) Search globally across the GitLab instance.Stream<?>
globalSearchStream
(Constants.SearchScope scope, String search) Search globally across the GitLab instance.List<?>
groupSearch
(Object groupIdOrPath, Constants.GroupSearchScope scope, String search) Search within the specified group.Pager<?>
groupSearch
(Object groupIdOrPath, Constants.GroupSearchScope scope, String search, int itemsPerPage) Search within the specified group.Stream<?>
groupSearchStream
(Object groupIdOrPath, Constants.GroupSearchScope scope, String search) Search within the specified group.List<?>
projectSearch
(Object projectIdOrPath, Constants.ProjectSearchScope scope, String search) Search within the specified project.Pager<?>
projectSearch
(Object projectIdOrPath, Constants.ProjectSearchScope scope, String search, int itemsPerPage) Search within the specified project.List<?>
projectSearch
(Object projectIdOrPath, Constants.ProjectSearchScope scope, String search, String ref) Search within the specified project.Pager<?>
projectSearch
(Object projectIdOrPath, Constants.ProjectSearchScope scope, String search, String ref, int itemsPerPage) Search within the specified project.Stream<?>
projectSearchStream
(Object projectIdOrPath, Constants.ProjectSearchScope scope, String search) Search within the specified project.Stream<?>
projectSearchStream
(Object projectIdOrPath, Constants.ProjectSearchScope scope, String search, String ref) Search within the specified project.Methods inherited from class org.gitlab4j.api.AbstractApi
addFormParam, addFormParam, delete, delete, get, get, getApiClient, getApiVersion, getDefaultPerPage, getDefaultPerPageParam, getDefaultPerPageParam, getGroupIdOrPath, getLabelIdOrName, getPageQueryParams, getPageQueryParams, getPerPageQueryParam, getProjectIdOrPath, getUserIdOrUsername, getWithAccepts, handle, head, isApiVersion, patch, patch, post, post, post, post, post, put, put, put, putUpload, putUpload, putWithFormData, upload, upload, upload, upload, urlEncode, validate
-
Constructor Details
-
SearchApi
-
-
Method Details
-
globalSearch
Search globally across the GitLab instance.GitLab Endpoint: POST /search?scope=:scope&search=:search-query
- Parameters:
scope
- search the expression within the specified scope. Currently these scopes are supported: projects, issues, merge_requests, milestones, snippet_titles, snippet_blobs, userssearch
- the search query- Returns:
- a List containing the object type specified by the scope
- Throws:
GitLabApiException
- if any exception occurs- Since:
- GitLab 10.5
-
globalSearchStream
public Stream<?> globalSearchStream(Constants.SearchScope scope, String search) throws GitLabApiException Search globally across the GitLab instance.GitLab Endpoint: POST /search?scope=:scope&search=:search-query
- Parameters:
scope
- search the expression within the specified scope. Currently these scopes are supported: projects, issues, merge_requests, milestones, snippet_titles, snippet_blobs, userssearch
- the search query- Returns:
- a Stream containing the object type specified by the scope
- Throws:
GitLabApiException
- if any exception occurs- Since:
- GitLab 10.5
-
globalSearch
public Pager<?> globalSearch(Constants.SearchScope scope, String search, int itemsPerPage) throws GitLabApiException Search globally across the GitLab instance.GitLab Endpoint: POST /search?scope=:scope&search=:search-query
- Parameters:
scope
- search the expression within the specified scope. Currently these scopes are supported: projects, issues, merge_requests, milestones, snippet_titles, snippet_blobs, userssearch
- the search queryitemsPerPage
- the number of items that will be fetched per page- Returns:
- a Pager containing the object type specified by the scope
- Throws:
GitLabApiException
- if any exception occurs- Since:
- GitLab 10.5
-
groupSearch
public List<?> groupSearch(Object groupIdOrPath, Constants.GroupSearchScope scope, String search) throws GitLabApiException Search within the specified group. If a user is not a member of a group and the group is private, a request on that group will result to a 404 status code.GitLab Endpoint: POST /groups/:groupId/search?scope=:scope&search=:search-query
- Parameters:
groupIdOrPath
- the group ID, path of the group, or a Group instance holding the group ID or path, requiredscope
- search the expression within the specified scope. Currently these scopes are supported: projects, issues, merge_requests, milestones, userssearch
- the search query- Returns:
- a List containing the object type specified by the scope
- Throws:
GitLabApiException
- if any exception occurs- Since:
- GitLab 10.5
-
groupSearchStream
public Stream<?> groupSearchStream(Object groupIdOrPath, Constants.GroupSearchScope scope, String search) throws GitLabApiException Search within the specified group. If a user is not a member of a group and the group is private, a request on that group will result to a 404 status code.GitLab Endpoint: POST /groups/:groupId/search?scope=:scope&search=:search-query
- Parameters:
groupIdOrPath
- the group ID, path of the group, or a Group instance holding the group ID or path, requiredscope
- search the expression within the specified scope. Currently these scopes are supported: projects, issues, merge_requests, milestones, userssearch
- the search query- Returns:
- a Stream containing the object type specified by the scope
- Throws:
GitLabApiException
- if any exception occurs- Since:
- GitLab 10.5
-
groupSearch
public Pager<?> groupSearch(Object groupIdOrPath, Constants.GroupSearchScope scope, String search, int itemsPerPage) throws GitLabApiException Search within the specified group. If a user is not a member of a group and the group is private, a request on that group will result to a 404 status code.GitLab Endpoint: POST /groups/:groupId/search?scope=:scope&search=:search-query
- Parameters:
groupIdOrPath
- the group ID, path of the group, or a Group instance holding the group ID or path, requiredscope
- search the expression within the specified scope. Currently these scopes are supported: projects, issues, merge_requests, milestones, userssearch
- the search queryitemsPerPage
- the number of items that will be fetched per page- Returns:
- a Pager containing the object type specified by the scope
- Throws:
GitLabApiException
- if any exception occurs- Since:
- GitLab 10.5
-
projectSearch
public List<?> projectSearch(Object projectIdOrPath, Constants.ProjectSearchScope scope, String search) throws GitLabApiException Search within the specified project. If a user is not a member of a project and the project is private, a request on that project will result to a 404 status code.GitLab Endpoint: POST /projects/:projectId/search?scope=:scope&search=:search-query
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance, requiredscope
- search the expression within the specified scope. Currently these scopes are supported: issues, merge_requests, milestones, notes, wiki_blobs, commits, blobs, userssearch
- the search query- Returns:
- a List containing the object type specified by the scope
- Throws:
GitLabApiException
- if any exception occurs- Since:
- GitLab 10.5
-
projectSearch
public List<?> projectSearch(Object projectIdOrPath, Constants.ProjectSearchScope scope, String search, String ref) throws GitLabApiException Search within the specified project. If a user is not a member of a project and the project is private, a request on that project will result to a 404 status code.GitLab Endpoint: POST /projects/:projectId/search?scope=:scope&search=:search-query&ref=ref
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance, requiredscope
- search the expression within the specified scope. Currently these scopes are supported: issues, merge_requests, milestones, notes, wiki_blobs, commits, blobs, userssearch
- the search queryref
- 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.- Returns:
- a List containing the object type specified by the scope
- Throws:
GitLabApiException
- if any exception occurs- Since:
- GitLab 10.5
-
projectSearchStream
public Stream<?> projectSearchStream(Object projectIdOrPath, Constants.ProjectSearchScope scope, String search) throws GitLabApiException Search within the specified project. If a user is not a member of a project and the project is private, a request on that project will result to a 404 status code.GitLab Endpoint: POST /projects/:projectId/search?scope=:scope&search=:search-query
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance, requiredscope
- search the expression within the specified scope. Currently these scopes are supported: issues, merge_requests, milestones, notes, wiki_blobs, commits, blobs, userssearch
- the search query- Returns:
- a Stream containing the object type specified by the scope
- Throws:
GitLabApiException
- if any exception occurs- Since:
- GitLab 10.5
-
projectSearchStream
public Stream<?> projectSearchStream(Object projectIdOrPath, Constants.ProjectSearchScope scope, String search, String ref) throws GitLabApiException Search within the specified project. If a user is not a member of a project and the project is private, a request on that project will result to a 404 status code.GitLab Endpoint: POST /projects/:projectId/search?scope=:scope&search=:search-query&ref=ref
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance, requiredscope
- search the expression within the specified scope. Currently these scopes are supported: issues, merge_requests, milestones, notes, wiki_blobs, commits, blobs, userssearch
- the search queryref
- 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.- Returns:
- a Stream containing the object type specified by the scope
- Throws:
GitLabApiException
- if any exception occurs- Since:
- GitLab 10.5
-
projectSearch
public Pager<?> projectSearch(Object projectIdOrPath, Constants.ProjectSearchScope scope, String search, int itemsPerPage) throws GitLabApiException Search within the specified project. If a user is not a member of a project and the project is private, a request on that project will result to a 404 status code.GitLab Endpoint: POST /project/:projectId/search?scope=:scope&search=:search-query
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance, requiredscope
- search the expression within the specified scope. Currently these scopes are supported: issues, merge_requests, milestones, notes, wiki_blobs, commits, blobs, userssearch
- the search queryitemsPerPage
- the number of items that will be fetched per page- Returns:
- a Pager containing the object type specified by the scope
- Throws:
GitLabApiException
- if any exception occurs- Since:
- GitLab 10.5
-
projectSearch
public Pager<?> projectSearch(Object projectIdOrPath, Constants.ProjectSearchScope scope, String search, String ref, int itemsPerPage) throws GitLabApiException Search within the specified project. If a user is not a member of a project and the project is private, a request on that project will result to a 404 status code.GitLab Endpoint: POST /project/:projectId/search?scope=:scope&search=:search-query&ref=ref
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance, requiredscope
- search the expression within the specified scope. Currently these scopes are supported: issues, merge_requests, milestones, notes, wiki_blobs, commits, blobs, userssearch
- the search queryref
- 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.itemsPerPage
- the number of items that will be fetched per page- Returns:
- a Pager containing the object type specified by the scope
- Throws:
GitLabApiException
- if any exception occurs- Since:
- GitLab 10.5
-