Class EmailTemplatesResource

java.lang.Object
com.atlassian.jira.rest.v2.admin.mail.EmailTemplatesResource

@Path("email-templates") public class EmailTemplatesResource extends Object
Since:
v8.14
  • Constructor Details

  • Method Details

    • uploadEmailTemplates

      @POST @Consumes("application/zip") @Produces("application/json") public jakarta.ws.rs.core.Response uploadEmailTemplates(InputStream fileInputStream)
      Extracts given zip file to temporary templates folder. If the folder already exists it will replace it's content
      Returns:
      Response
    • applyEmailTemplates

      @POST @Path("/apply") @Produces("application/json") public jakarta.ws.rs.core.Response applyEmailTemplates()
      Replaces the current email templates pack with previously uploaded one, if exists.
      Returns:
      @Response
    • revertEmailTemplatesToDefault

      @POST @Path("/revert") @Consumes("*/*") @Produces("application/json") public jakarta.ws.rs.core.Response revertEmailTemplatesToDefault()
      Replaces the current email templates pack with default templates, which are copied over from Jira binaries.
      Returns:
      @Response
    • downloadEmailTemplates

      @GET @Produces("application/zip") public jakarta.ws.rs.core.Response downloadEmailTemplates()
      Creates a zip file containing email templates at local home and returns the file.
      Returns:
      Response
    • getEmailTypes

      @GET @Path("types") @Produces("application/json") public jakarta.ws.rs.core.Response getEmailTypes()
      Returns a list of root templates mapped with Event Types. The list can be used to decide which test emails to send.
      Returns:
      Response OK when reading email types was successful, FORBIDDEN when user is not a system admin, SERVER_ERROR when any unexpected exception is thrown