const email = '';
const apiToken = '';
const headers = new HttpHeaders({
'Accept': 'application/json',
'Content-Type': 'application/json',
'X-Atlassian-Token': 'nocheck' ,
'X-Requested-With': 'XMLHttpRequest',
'Authorization': `Basic ${btoa(`${email}:${apiToken}`)}`
});
const bodyData = JSON.stringify({
assigneeType: 'PROJECT_LEAD',
description: 'Cloud migration initiative',
issueSecurityScheme: 10001,
key: 'EXMP',
leadAccountId: '***',
name: 'Example',
permissionScheme: 10011,
projectTemplateKey: 'com.pyxis.greenhopper.jira:gh-simplified-agility-scrum',
projectTypeKey: 'software',
});
this.http.post(api, bodyData, { headers: headers , withCredentials: true })
.subscribe(
(response: any) => {
console.log(response);
},
(error: any) => {
console.error(error);
}
);