We are trying to build an app that allows you to import a JSON to create projects. Pretty simple app. The issue we ran into is that the projectTypeKey and projectTemplateKey for service management don’t work from what is documented for the JSON. I have seen other post that also call this out.
Does anyone know what those should be. I want to build a app that allows us to create more advance config ITSM or ESM projects from the base template. I was going to use the Project Custom API but it said it only works for Enterprise sites.
// This sample uses Atlassian Forge
// https://developer.atlassian.com/platform/forge/
import api, { route } from "@forge/api";
var bodyData = `{
"assigneeType": "PROJECT_LEAD",
"avatarId": 10200,
"categoryId": 10120,
"description": "Cloud migration initiative",
"issueSecurityScheme": 10001,
"key": "EX",
"leadAccountId": "5b10a0effa615349cb016cd8",
"name": "Example",
"notificationScheme": 10021,
"permissionScheme": 10011,
"projectTemplateKey": "com.atlassian.jira-core-project-templates:jira-core-simplified-process-control",
"projectTypeKey": "business",
"url": "http://atlassian.com"
}`;
const response = await api.asUser().requestJira(route`/rest/api/3/project`, {
method: 'POST',
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json'
},
body: bodyData
});
console.log(`Response: ${response.status} ${response.statusText}`);
console.log(await response.json());