java.lang.Object
com.atlassian.confluence.plugins.restapi.experimental.resources.WebFragmentResource

@Consumes("application/json") @Produces("application/json") @Path("/webfragment") public class WebFragmentResource extends Object
Rest wrapper for the WebViewService. This REST API returns web fragments used to compose the UI of confluence.

Web fragments include web items provided by plugins implementing the Web Item Module and Web Panels from plugins implementing the Web Panel Module

  • Constructor Details

    • WebFragmentResource

      @Inject public WebFragmentResource(WebViewService service)
  • Method Details

    • sections

      @GET @Path("/section/{location}") public Iterable<WebSectionView> sections(@PathParam("location") String location, List<String> locations, @QueryParam("key") String key, @QueryParam("contentId") ContentId contentId)
      Fetch the websections at the given location. Web sections contain webitems, and provide a way to separate sections of a menu. Confluence defines a number of sections and locations in the UI that can have additional web items, these locations are surfaced by this resource.
      Parameters:
      location - the web location to fetch web items for
      key - the optional space key of the current context,
      contentId - the optional content id used in the current context
      Returns:
      the list of webitems for the location
    • sections

      @GET @Path("/section") public Iterable<WebSectionView> sections(@QueryParam("location") SortedSet locations, @QueryParam("key") String key, @QueryParam("contentId") ContentId contentId)
      Fetch the websections at the given locations. Web sections contain webitems, and provide a way to separate sections of a menu. Confluence defines a number of sections and locations in the UI that can have additional web items, these locations are surfaced by this resource.
      Parameters:
      locations - the web locations to fetch web items for
      key - the optional space key of the current context,
      contentId - the optional content id used in the current context
      Returns:
      the list of webitems for the location
    • items

      @GET @Path("/section/{location}/{section}/items/") public Iterable<WebItemView> items(@PathParam("location") String location, @PathParam("section") String section, @QueryParam("key") String key, @QueryParam("contentId") ContentId contentId)
      Fetch web items for the given section and location. Web items are used to render buttons and menu links in confluence. Confluence defines a number of sections and locations in the UI that can have additional web items, these locations and sections are surfaced by this resource.
      Parameters:
      location - the web location to fetch web items for
      section - the specific section within a location to fetch web items for
      key - the optional space key of the current context,
      contentId - the optional content id used in the current context
      Returns:
      the list of webitems for the location
    • panels

      @GET @Path("/panels") public Iterable<WebPanelView> panels(@QueryParam("location") SortedSet<String> locations, @QueryParam("contentId") ContentId contentId)
      Fetch web panels for the given locations. Web panels are used to render content at various pre-defined locations in confluence. Confluence defines a number of locations in the UI that can have additional content, these locations are surfaced by this resource.
      Parameters:
      locations - the web locations to fetch web panels for
      contentId - the optional content id used in the current context
      Returns:
      the list of web panels for the location
    • panels

      @GET @Path("/panels/{location: .+}/") public Iterable<WebPanelView> panels(@PathParam("location") String location, List<String> locations, @QueryParam("contentId") ContentId contentId, @QueryParam("key") String key)
      Fetch web panels for the given location. Web panels are used to render content at various pre-defined locations in confluence. Confluence defines a number of locations in the UI that can have additional content, these locations are surfaced by this resource.
      Parameters:
      location - the web location to fetch web panels for
      contentId - the optional content id used in the current context
      Returns:
      the list of web panels for the location