removeTemplate method

Future<void> removeTemplate(
  1. String contentTemplateId
)

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.

Implementation

Future<void> removeTemplate(String contentTemplateId) async {
  await _client.send(
    'delete',
    'wiki/rest/api/template/{contentTemplateId}',
    pathParameters: {
      'contentTemplateId': contentTemplateId,
    },
  );
}