Interface SearchRestClient


public interface SearchRestClient
The client handling search REST resource
Since:
2.0 client, 4.3 server
  • Method Details

    • searchJql

      io.atlassian.util.concurrent.Promise<SearchResult> searchJql(@Nullable String jql)
      Performs a JQL search and returns issues matching the query
      Parameters:
      jql - a valid JQL query (will be properly encoded by JIRA client). Restricted JQL characters (like '/') must be properly escaped.
      Returns:
      issues matching given JQL query
      Throws:
      RestClientException - in case of problems (connectivity, malformed messages, invalid JQL query, etc.)
    • searchJql

      io.atlassian.util.concurrent.Promise<SearchResult> searchJql(@Nullable String jql, @Nullable Integer maxResults, @Nullable Integer startAt, @Nullable Set<String> fields)
      Performs a JQL search and returns issues matching the query. The first startAt issues will be skipped and SearchResult will contain at most maxResults issues. List of issue fields which should be included in the result may be specified.
      Parameters:
      jql - a valid JQL query (will be properly encoded by JIRA client). Restricted JQL characters (like '/') must be properly escaped. All issues matches to the null or empty JQL.
      maxResults - maximum results for this search. When null is given, the default maxResults configured in JIRA is used (usually 50).
      startAt - starting index (0-based) defining how many issues should be skipped in the results. For example for startAt=5 and maxResults=3 the results will include matching issues with index 5, 6 and 7. For startAt = 0 and maxResults=3 the issues returned are from position 0, 1 and 2. When null is given, the default startAt is used (0).
      fields - set of fields which should be retrieved. You can specify *all for all fields or *navigable (which is the default value, used when null is given) which will cause to include only navigable fields in the result. To ignore the specific field you can use "-" before the field's name. Note that the following fields: summary, issuetype, created, updated, project and status are required. These fields are included in *all and *navigable.
      Returns:
      issues matching given JQL query
      Throws:
      RestClientException - in case of problems (connectivity, malformed messages, invalid JQL query, etc.)
    • enhancedSearchJql

      io.atlassian.util.concurrent.Promise<SearchResult> enhancedSearchJql(@Nullable String jql)
      Performs a JQL search using the SearchResult format and returns issues matching the query. The search results will be based on the provided JQL query.
      Parameters:
      jql - a valid JQL query (will be properly encoded by JIRA client). Restricted JQL characters (like '/') must be properly escaped.
      Returns:
      issues matching the given JQL query in the SearchResult format.
      Throws:
      RestClientException - in case of problems (connectivity, malformed messages, invalid JQL query, etc.)
    • enhancedSearchJql

      io.atlassian.util.concurrent.Promise<SearchResult> enhancedSearchJql(@Nullable String jql, @Nullable Integer maxResults, @Nullable String nextPageToken, @Nullable Set<String> fields, @Nullable Set<Integer> reconcileIssues)
      Performs a JQL search using the SearchResult format and returns issues matching the query. This method allows for more control over the search results by specifying the maximum number of results, pagination, included fields, and issue reconciliation.
      Parameters:
      jql - a valid JQL query (will be properly encoded by the JIRA client). Restricted JQL characters (like '/') must be properly escaped.
      maxResults - maximum number of results for this search. If null is given, the default maxResults configured in JIRA is used.
      nextPageToken - a token representing the next page of results to be fetched. Useful for paginated results. If null is provided, results will start from the beginning.
      fields - set of fields which should be retrieved. You can specify *all for all fields or *navigable which will cause to include only navigable fields in the result. To ignore the specific field you can use "-" before the field's name.
      reconcileIssues - a set of issue IDs to reconcile with the search results. If null, no reconciliation is performed.
      Returns:
      issues matching the given JQL query in the SearchResult format.
      Throws:
      RestClientException - in case of problems (connectivity issues, malformed messages, invalid JQL query, etc.)
    • totalCount

      io.atlassian.util.concurrent.Promise<TotalCount> totalCount(String jql)
      Provide an estimated count of the issues that match the JQL. Recent updates might not be immediately visible in the returned output. This endpoint requires JQL to be bounded.
      Parameters:
      jql - a valid JQL query (will be properly encoded by the JIRA client). Restricted JQL characters (like '/') must be properly escaped.
      Returns:
      count of the issues matching the given JQL query in the TotalCount format.
      Throws:
      RestClientException - in case of problems (connectivity issues, malformed messages, invalid JQL query, etc.)
    • getFavouriteFilters

      io.atlassian.util.concurrent.Promise<Iterable<Filter>> getFavouriteFilters()
      Retrieves list of your favourite filters.
      Returns:
      list of your favourite filters
      Since:
      2.0 client, 5.0 server
    • getFilter

      io.atlassian.util.concurrent.Promise<Filter> getFilter(URI filterUri)
      Retrieves filter for given URI.
      Parameters:
      filterUri - URI to filter resource (usually get from self attribute describing component elsewhere)
      Returns:
      filter
      Since:
      2.0 client, 5.0 server
    • getFilter

      io.atlassian.util.concurrent.Promise<Filter> getFilter(long id)
      Retrieves filter for given id.
      Parameters:
      id - ID of the filter
      Returns:
      filter
      Since:
      2.0 client, 5.0 server