Class ConfluenceResource
java.lang.Object
com.atlassian.jira.plugin.link.confluence.rest.ConfluenceResource
A REST resource to access Confluence's remote API. This is needed to perform authenticated requests.
- Since:
- v5.0
-
Constructor Summary
ConstructorsConstructorDescriptionConfluenceResource
(ConfluenceRemoteServiceStrategyFactory confluenceRemoteServiceStrategyFactory, com.atlassian.applinks.api.ApplicationLinkService applicationLinkService, JiraBaseUrls jiraBaseUrls, I18nHelper i18nBean) -
Method Summary
Modifier and TypeMethodDescriptionjakarta.ws.rs.core.Response
jakarta.ws.rs.core.Response
Returns all matching content from a remote Confluence instance.jakarta.ws.rs.core.Response
Returns all spaces from a remote Confluence instance.
-
Constructor Details
-
ConfluenceResource
@Inject public ConfluenceResource(ConfluenceRemoteServiceStrategyFactory confluenceRemoteServiceStrategyFactory, com.atlassian.applinks.api.ApplicationLinkService applicationLinkService, JiraBaseUrls jiraBaseUrls, I18nHelper i18nBean)
-
-
Method Details
-
getSpaces
@GET @Path("/space") @Produces("application/json") public jakarta.ws.rs.core.Response getSpaces(@QueryParam("query") String query, @QueryParam("startAt") Long startAt, @QueryParam("maxResults") Integer maxResults, @QueryParam("appId") String appId) Returns all spaces from a remote Confluence instance. Results are paginated.- Parameters:
query
- a string of text to search for in Confluence Space titles and descriptions.startAt
- the page offset, if not specified then defaults to 0.maxResults
- how many results on the page should be included. Defaults toCONF_DEFAULT_MAX
.appId
- the applink id for the remote Confluence instance.- Returns:
- the relevant Confluence Spaces.
-
getSiteSearch
@GET @Path("/search") @Produces("application/json") public jakarta.ws.rs.core.Response getSiteSearch(@QueryParam("query") String query, @QueryParam("spaceKey") String spaceKey, @QueryParam("startAt") Long startAt, @QueryParam("maxResults") Integer maxResults, @QueryParam("appId") String appId) Returns all matching content from a remote Confluence instance. Results are paginated.- Parameters:
query
- a string of text to search for anywhere in a piece of Confluence content.spaceKey
- if provided, will restrict the search to a single Space in Confluence.startAt
- the page offset, if not specified then defaults to 0.maxResults
- how many results on the page should be included. Defaults toCONF_DEFAULT_MAX
.appId
- the applink id for the remote Confluence instance.- Returns:
- Confluence content that matched the search query and was in the search's scope.
-
getApplicationLinks
@GET @Path("/applink") @Produces("application/json") public jakarta.ws.rs.core.Response getApplicationLinks()
-