Code :
import requests
import json
client_id = "<client-id>"
access_token = "<access-token>"
url="https://api.atlassian.com/ex/jira/{0}/rest/api/2/project".format(client_id)
headers = {
'Content-Type' : 'application/json',
'Authorization' : 'Bearer {0}'.format(access_token),
}
parameters= {
"key": "EX",
"name": "Example",
"projectTypeKey": "business",
"projectTemplateKey": "com.atlassian.jira-core-project-templates:jira-core-project-management",
"description": "Example Project description",
"lead": "Charlie",
"url": "http://atlassian.com",
"assigneeType": "PROJECT_LEAD",
"avatarId": 10200,
"issueSecurityScheme": 10001,
"permissionScheme": 10011,
"notificationScheme": 10021,
"categoryId": 10120
}
response = requests.post(url, headers = headers,data = json.dumps(parameters))
print(response)
print(response.content)
Output : {"errorMessages":["\'accountId\' must be the only user identifying query parameter in GDPR strict mode."],"errors":{}}
Referencedocs api docs : https://docs.atlassian.com/software/jira/docs/api/REST/7.12.0/#api/2/project-createProject