Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

There's something wrong with Bitbucket's API

Kelvin Samuel
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 3, 2018

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

1 vote
Edwin Kyalangalilwa
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 15, 2018

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")
Kelvin Samuel
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 16, 2018

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
TAGS
AUG Leaders

Atlassian Community Events