Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Creating project using REST API

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

1 answer

0 votes

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:

Deprecation notice and migration guide for major changes to Jira Cloud REST APIs to improve user privacy 

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:

Get account IDs for users 

Let us know if you have any other questions.

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Jira Service Management

Why upgrade to Jira Service Management Premium?

We often have questions from folks using Jira Service Management about the benefits to using Premium. Check out this video to learn how you can unlock even more value in our Premium plan.  &nb...

209 views 1 6
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you