I have a Jira Cloud project configured with some notification and issue security scheme configurations.
I want to use it as a template to create the other Jira Cloud project using REST API.
I have referred to this (https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-projects/#api-rest-api-3-project-post) and my code is as follows:
url = "https://accton-group.atlassian.net/rest/api/3/project/"
payload = json.dumps( {
"assigneeType": "PROJECT_LEAD",
"avatarId": 10324, # 用Chrome Dev Tool查看avatar的image src資訊
"categoryId": categoryId,
"description": "",
"issueSecurityScheme": 10002,
"key": self.project_key,
"leadAccountId": account_id,
"name": self.project_name,
"notificationScheme": 10200,
"permissionScheme": '2ef8e4b4-aaae-4c6b-bfdd-f4606a44421a',
"projectTemplateKey": "com.pyxis.greenhopper.jira:gh-simplified-basic,",
"projectTypeKey": "software",
# "projectTemplateKey": "com.atlassian.jira-core-project-templates:jira-core-simplified-process-control",
# "url": "http://test.test"
} )
response = requests.request(
"POST",
url,
data=payload,
headers=auth_cloud.HEADERS,
auth=auth_cloud.AUTH
)
return response
But it returns an HTTP 400 error, how can I know what to rectify and the ID of permissionScheme? Thanks!