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

@ExperimentalApi public class TemplateResource extends Object
  • Constructor Details

  • Method Details

    • getBlueprintTemplates

      public PageResponse<ContentTemplate> getBlueprintTemplates(String spaceKey, int start, int limit, String expand, @Context javax.ws.rs.core.UriInfo uriInfo)

      Returns all blueprint templates of the space specified.

      Example request URI:

      • http://example.com/confluence/rest/experimental/template/blueprint?expand=body&limit=10
      Parameters:
      spaceKey - space key, global if not specified.
      start - the start point of the paged response to return.
      limit - the limit of response page
      expand - a comma-separated list of properties to expand in the response. Default to empty string.
      uriInfo - (injected) information about the request URI
      Returns:
      ContentTemplate PageResponse of ContentTemplate
    • getContentTemplates

      public PageResponse<ContentTemplate> getContentTemplates(String spaceKey, int start, int limit, String expand, @Context javax.ws.rs.core.UriInfo uriInfo)

      Returns all content templates of the space specified.

      Example request URI:

      • http://example.com/confluence/rest/experimental/template/page?expand=body&limit=10
      Parameters:
      spaceKey - space key, global if not specified.
      start - the start point of the paged response to return.
      limit - the limit of response page
      expand - a comma-separated list of properties to expand in the response.
      uriInfo - injected by Jersey
      Returns:
      ContentTemplate PageResponse of ContentTemplate
    • getContentTemplate

      public ContentTemplate getContentTemplate(ContentTemplateId id, String expand)
      Return the template identified by id.
      Parameters:
      id - ContentTemplateId Id could contains a long, or uuid or ModuleCompletekeys
      expand - a comma-separated list of properties to expand in the response.
      Returns:
      ContentTemplate ContentTemplate
    • createContentTemplate

      public ContentTemplate createContentTemplate(ContentTemplate contentTemplate, String expand)
      Create a contentTemplate, this means creating a new page template or a customised blueprint template.
      Parameters:
      contentTemplate - ContentTemplate to create.
      expand - a comma-separated list of properties to expand in the response.
      Returns:
      ContentTemplate ContentTemplate created.
    • updateContentTemplate

      public ContentTemplate updateContentTemplate(ContentTemplate contentTemplate, String expand)
      Update/Edit an existing contentTemplate. contentTemplateIdWithId is used to find the template to update. As the original template already saved in database, it already has a long entity id.
      Parameters:
      contentTemplate - update the existing contentTemplate with this one
      expand - a comma-separated list of properties to expand in the response.
      Returns:
      ContentTemplate ContentTemplate updated.
    • removeTemplate

      public javax.ws.rs.core.Response removeTemplate(ContentTemplateId contentTemplateId)
      Delete an existing customised contentTemplate, for blueprint template this means revert to default template from plugin and remove the customised version of template. Revert a space level template, then global template will become used if there is a customised version.
      Parameters:
      contentTemplateId - ContentTemplateId.ContentTemplateIdWithId This has to be a long entity id, as template is already existed before you can delete or revoke.
      Returns:
      noContent
    • createInstance

      public ContentBlueprintInstance createInstance(ContentBlueprintInstance contentBlueprintInstance, ContentTemplateId contentTemplateId, String expand)