I am unable to creating a project using restAPI - https://<Your name>.atlassian.net/rest/api/3/project , Sending Username and Token as a Basic Auth.
My request Body is :
{ "notificationScheme": 10021,
"description": "Example Project description",
"lead" : "name",
"url": "https://<yourname>.atlassian.net", "projectTemplateKey": "com.pyxis.greenhopper.jira:gh-simplified-agility-kanban",
"avatarId": 10200,
"issueSecurityScheme": 10001,
"name": "Example",
"permissionScheme": 10011,
"assigneeType": "PROJECT_LEAD",
"projectTypeKey": "software",
"key": "EX",
"categoryId": 10120
}
Gettting this Response : { "errorMessages": [ "'accountId' must be the only user identifying query parameter in GDPR strict mode." ], "errors": {}}
with 400 BAD REQUEST
Hello @Utthan Dharwa
Welcome to the Atlassian Community!
The error you are facing is caused by the deprecation of usernames applied to improve privacy In Jira REST API, as described in the documentation below:
Since the implementation of the policies mentioned above, you can not reference users using Names or Usernames in Jira Cloud. Instead, you must reference his AccountId.
In your particular case, the error is returned because the "lead" field is deprecated. Instead, use the leadAccountId field to add the AccountId of your project lead, as described in the Jira Cloud REST API Official documentation.
P.S: To get the accountId of users, you can navigate to User management > Users > click on the related user and check its accountId at the end of the URL. Also, there is the following experimental REST API to get this information:
Let us know if you have any other questions.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.