There's something wrong with Bitbucket's API

I've been trying to create a new repository inside one of my teams' projects, but although I'm including the project's key/uuid in the request body, I'm getting an error: "string indices must be integers"

I tried everything & just can't manage to make it work. Can somebody give me hand with that issue. It's really pissing me off by now.

1 answer

Hi Kelvin,

The key/uuid might be quoted and the request sees it as a string. Try removing quotes around it. 

You can also try stashy .. how to connect

https://community.atlassian.com/t5/Bitbucket-questions/How-to-create-project-in-bit-bucket-using-bit-bucket-REST-API/qaq-p/704125#M22305

bitbucket.repos.Repos.create("PROJ_KEY", "REPO_NAME")

Thanks for the reply, but I eventually managed to fix the issue. It's my fault I guess. I was specifying the content-type in the request header. All I had to do was remove that & it worked fine.

Now my request body has the attributes I want & the headers only have the authorization.

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Jun 12, 2018 in Bitbucket

Do you use any Atlassian products for your personal projects?

After spinning my wheels trying to get organized enough to write a book for National Novel Writing Month (NaNoWriMo) I took my affinity for Atlassian products from my work life and decided to tr...

29,035 views 26 12
Join discussion

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you