Is it possible to create project from project template through java api?

Hey guys,

Looking into the Java API, I can’t find a way to create a project from an existing template through the Java API. Am I missing something from the docs?


probably need to do a get on an existing project and a post to create a new one. or roll your own endpoint. there used to be a groovy script to clone a repo. was probably merged into scriptrunner a million years ago.

Hello Diego,

Are you looking for something like this ?

// Set data for project creation
ProjectCreationData.Builder builder = new ProjectCreationData.Builder();
ProjectCreationData projectCreationData = builder
// Validate data
CreateProjectValidationResult validation = projectService.validateCreateProject(caller,projectCreationData);

// Check for errors...

// Creation of the jira project
Project project = projectService.createProject(validation);

Hope this helps!