Class GetSearchV1OperationSpec

java.lang.Object
io.github.primelib.confluence4j.rest.v1.operations.GetSearchV1OperationSpec

@Generated("io.github.primelib.primecodegen") public class GetSearchV1OperationSpec extends Object
GetSearchV1

Searches for content using the [Confluence Query Language (CQL)](https://developer.atlassian.com/cloud/confluence/advanced-searching-using-cql/). **Note that CQL input queries submitted through the `/wiki/rest/api/search` endpoint no longer support user-specific fields like `user`, `user.fullname`, `user.accountid`, and `user.userkey`.** See this [deprecation notice](https://developer.atlassian.com/cloud/confluence/deprecation-notice-search-api/) for more details. Example initial call: ``` /wiki/rest/api/search?cql=type=page&limit=25 ``` Example response: ``` { "results": [ { ... }, { ... }, ... { ... } ], "limit": 25, "size": 25, ... "_links": { "base": "<url>", "context": "<url>", "next": "/rest/api/search?cql=type=page&limit=25&cursor=raNDoMsTRiNg", "self": "<url>" } } ``` When additional results are available, returns `next` and `prev` URLs to retrieve them in subsequent calls. The URLs each contain a cursor that points to the appropriate set of results. Use `limit` to specify the number of results returned in each call. Example subsequent call (taken from example response): ``` /wiki/rest/api/search?cql=type=page&limit=25&cursor=raNDoMsTRiNg ``` The response to this will have a `prev` URL similar to the `next` in the example response. If the expand query parameter is used with the `body.export_view` and/or `body.styled_view` properties, then the query limit parameter will be restricted to a maximum value of 25. **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the entities. Note, only entities that the user has permission to view will be returned.

  • Field Details

    • VALIDATION_ENABLED

      @Experimental public static Boolean VALIDATION_ENABLED
      allows to disable validation of the spec, use with care!
  • Constructor Details

  • Method Details

    • validate

      public void validate()
      Validates the Spec, will throw a exception if required parameters are missing
      Throws:
      NullPointerException
    • cql

      public @NonNull String cql()
      The CQL query to be used for the search. See [Advanced Searching using CQL](https://developer.atlassian.com/cloud/confluence/advanced-searching-using-cql/) for instructions on how to build a CQL query.
    • cqlcontext

      public @Nullable String cqlcontext()
      The space, content, and content status to execute the search against. - `spaceKey` Key of the space to search against. Optional. - `contentId` ID of the content to search against. Optional. Must be in the space specified by `spaceKey`. - `contentStatuses` Content statuses to search against. Optional. Specify these values in an object. For example, `cqlcontext={%22spaceKey%22:%22TEST%22, %22contentId%22:%22123%22}`
    • cursor

      public @Nullable String cursor()
      Pointer to a set of search results, returned as part of the `next` or `prev` URL from the previous search call.
    • next

      public @Nullable Boolean next()
      next
    • prev

      public @Nullable Boolean prev()
      prev
    • limit

      public @Nullable Integer limit()
      The maximum number of content objects to return per page. Note, this may be restricted by fixed system limits.
    • start

      public @Nullable Integer start()
      The start point of the collection to return
    • includeArchivedSpaces

      public @Nullable Boolean includeArchivedSpaces()
      Whether to include content from archived spaces in the results.
    • excludeCurrentSpaces

      public @Nullable Boolean excludeCurrentSpaces()
      Whether to exclude current spaces and only show archived spaces.
    • excerpt

      public @Nullable String excerpt()
      The excerpt strategy to apply to the result
    • sitePermissionTypeFilter

      public @Nullable String sitePermissionTypeFilter()
      Filters users by permission type. Use `none` to default to licensed users, `externalCollaborator` for external/guest users, and `all` to include all permission types.
    • expand

      public @Nullable List<String> expand()
      expand
    • cql

      public GetSearchV1OperationSpec cql(@NonNull String cql)
      The CQL query to be used for the search. See [Advanced Searching using CQL](https://developer.atlassian.com/cloud/confluence/advanced-searching-using-cql/) for instructions on how to build a CQL query.
      Returns:
      this.
    • cqlcontext

      public GetSearchV1OperationSpec cqlcontext(@Nullable String cqlcontext)
      The space, content, and content status to execute the search against. - `spaceKey` Key of the space to search against. Optional. - `contentId` ID of the content to search against. Optional. Must be in the space specified by `spaceKey`. - `contentStatuses` Content statuses to search against. Optional. Specify these values in an object. For example, `cqlcontext={%22spaceKey%22:%22TEST%22, %22contentId%22:%22123%22}`
      Returns:
      this.
    • cursor

      public GetSearchV1OperationSpec cursor(@Nullable String cursor)
      Pointer to a set of search results, returned as part of the `next` or `prev` URL from the previous search call.
      Returns:
      this.
    • next

      public GetSearchV1OperationSpec next(@Nullable Boolean next)
      next
      Returns:
      this.
    • prev

      public GetSearchV1OperationSpec prev(@Nullable Boolean prev)
      prev
      Returns:
      this.
    • limit

      public GetSearchV1OperationSpec limit(@Nullable Integer limit)
      The maximum number of content objects to return per page. Note, this may be restricted by fixed system limits.
      Returns:
      this.
    • start

      public GetSearchV1OperationSpec start(@Nullable Integer start)
      The start point of the collection to return
      Returns:
      this.
    • includeArchivedSpaces

      public GetSearchV1OperationSpec includeArchivedSpaces(@Nullable Boolean includeArchivedSpaces)
      Whether to include content from archived spaces in the results.
      Returns:
      this.
    • excludeCurrentSpaces

      public GetSearchV1OperationSpec excludeCurrentSpaces(@Nullable Boolean excludeCurrentSpaces)
      Whether to exclude current spaces and only show archived spaces.
      Returns:
      this.
    • excerpt

      public GetSearchV1OperationSpec excerpt(@Nullable String excerpt)
      The excerpt strategy to apply to the result
      Returns:
      this.
    • sitePermissionTypeFilter

      public GetSearchV1OperationSpec sitePermissionTypeFilter(@Nullable String sitePermissionTypeFilter)
      Filters users by permission type. Use `none` to default to licensed users, `externalCollaborator` for external/guest users, and `all` to include all permission types.
      Returns:
      this.
    • expand

      public GetSearchV1OperationSpec expand(@Nullable List<String> expand)
      expand
      Returns:
      this.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object