Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
badges earned

Your Points Tracker
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

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

Correct formatting to Create Project using REST API in Scriptrunner

I'm trying to create a script that creates a project as a post-function in Scriptrunner Cloud.  I'm using the REST API, but I'm getting 400 errors because of some minor change I need to do.  Code snippet is below.  What am I missing?

def result = post("/rest/api/2/project")
.header('Content-Type', 'application/json')
key: newProjectKey,
name: newProjectName,
projectTypeKey: newProjectTypeKey,
projectTemplateKey: newProjectTemplateKey,
leadAccountId: newLeadAccountId
if (result.status == 201) {
return 'Success'
} else {
return "${result.status}: ${result.body}"

 What am I missing?  Thanks in advance!

1 answer

I think the main problem is leadAccountId.  I'm not using the correct format.  I think I have to use dot notation to get at accountId inside the field.

Suggest an answer

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

ThinkTilt is joining the Atlassian Family!

This morning, Atlassian announced the acquisition of ThinkTilt , the maker of ProForma, a no-code/low code form builder with 700+ customers worldwide. ThinkTilt helps IT empower any team in their or...

927 views 30 33
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