Confluence.js - Cloud and Server API library
    Preparing search index...

    Class Template

    Index

    Constructors

    Methods

    • Returns all templates provided by blueprints. Use this method to retrieve all global blueprint templates or all blueprint templates in a space.

      Note, all global blueprints are inherited by each space. Space blueprints can be customised without affecting the global blueprints.

      Permissions required: 'View' permission for the space to view blueprints for the space and permission to access the Confluence site ('Can use' global permission) to view global blueprints.

      Type Parameters

      Parameters

      Returns Promise<void>

    • Returns all templates provided by blueprints. Use this method to retrieve all global blueprint templates or all blueprint templates in a space.

      Note, all global blueprints are inherited by each space. Space blueprints can be customised without affecting the global blueprints.

      Permissions required: 'View' permission for the space to view blueprints for the space and permission to access the Confluence site ('Can use' global permission) to view global blueprints.

      Type Parameters

      Parameters

      Returns Promise<T>

    • Returns a content template. This includes information about template, like the name, the space or blueprint that the template is in, the body of the template, and more.

      Permissions required: 'View' permission for the space to view space templates and permission to access the Confluence site ('Can use' global permission) to view global templates.

      Type Parameters

      Parameters

      Returns Promise<void>

    • Returns a content template. This includes information about template, like the name, the space or blueprint that the template is in, the body of the template, and more.

      Permissions required: 'View' permission for the space to view space templates and permission to access the Confluence site ('Can use' global permission) to view global templates.

      Type Parameters

      Parameters

      Returns Promise<T>

    • Deletes a template. This results in different actions depending on the type of template:

      • If the template is a content template, it is deleted.
      • If the template is a modified space-level blueprint template, it reverts to the template inherited from the global-level blueprint template.
      • If the template is a modified global-level blueprint template, it reverts to the default global-level blueprint template.

      Note, unmodified blueprint templates cannot be deleted.

      Permissions required: 'Admin' permission for the space to delete a space template or 'Confluence Administrator' global permission to delete a global template.

      Type Parameters

      • T = void

      Parameters

      Returns Promise<void>

    • Deletes a template. This results in different actions depending on the type of template:

      • If the template is a content template, it is deleted.
      • If the template is a modified space-level blueprint template, it reverts to the template inherited from the global-level blueprint template.
      • If the template is a modified global-level blueprint template, it reverts to the default global-level blueprint template.

      Note, unmodified blueprint templates cannot be deleted.

      Permissions required: 'Admin' permission for the space to delete a space template or 'Confluence Administrator' global permission to delete a global template.

      Type Parameters

      • T = void

      Parameters

      Returns Promise<T>