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 Join to answer
Community showcase
Piotr Plewa
Published Dec 27, 2017 in Bitbucket

Recipe: Deploying AWS Lambda functions with Bitbucket Pipelines

Bitbucket Pipelines helps me manage and automate a number of serverless deployments to AWS Lambda and this is how I do it. I'm building Node.js Lambda functions using node-lambda&nbsp...

638 views 0 4
Read article

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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot