While trying to create a Jira project Using Post Method with REST API URL getting user doesn't have access.
How to get the Access_token.
Hi @Bhagavan Goud
Firstly, you will need to create an API token from your Atlassian account:
Log in to https://id.atlassian.com/manage-profile/security/api-tokens.
Click Create API token.
From the dialog that appears, enter a memorable and concise Label for your token and click Create.
Then follow Basic auth for REST APIs for examples on how you can use it in scripts. Hope this helps.
Hi, @Kishan Sharma Thank you for the information.
While trying with like above one getting 500 Internal Server Error
function createProject(keyValue,summary,lead,issueUrl){var originalKeyValue = keyValue;keyValue = keyValue.replace("-","");console.log(keyValue);summary = summary.trim();console.log(summary);
AJS.$.ajax({url: urlToAPI[baseUrl],type: "POST",timeout: 0,dataType: 'json',processData: false,headers: {"Content-Type": "application/json; charset=utf-8","Authorization": "Basic YmhhZ2F2YW4uZ291ZEBpbi5lYm1wYXBzdC5jb206RWJtUGFwc3RJbml0aWFsLWI3KXY=="// "Authorization" : "Basic " + btoa(lead + ":" + "")},data: JSON.stringify({"key": keyValue,"name": originalKeyValue+" "+summary,"lead": lead,"url": issueUrl,"projectTypeKey": "business","templateProjectId":global_config_project_template_id//"templateProjectId":"13303"}),success: function (response) {console.log(JSON.stringify(response));console.log("keyValue"+response.key);alert("Jira project has been created. Now you will be navigated to the project summary screen.");window.location.replace(((baseUrl=='http://localhost:2990')?(baseUrl+'/jira'):(baseUrl)) +'/projects/'+ keyValue +'/summary');},
@Bhagavan Goud Do you have JIRA Admin permission, as per the error message it seems that you don't have project creation access ?
Hi @Vikrant Yadav I have JIRA Admin Permission but the error message seems that you don't have project creation access?
It looks like you're new here. Sign in or register to get started.