Applicability

Regex is short for Regular Expression, and while that clarifies the abbreviation, this amalgamated grouping of symbols initially looks more like an alien language than a “regular” expression. Simply…

Smartphone

独家优惠奖金 100% 高达 1 BTC + 180 免费旋转




How to create a BitBucket repository using BitBucket API?

Image Source — blog.axosoft.com

Bitbucket like we all know is a web-based version control repository hosting service owned by Atlassian.

Everything that could be done using the web console is also made available using the Bitbucket REST APIs.

You can get a list of all the API’s here:

But I wish the documentation was a little clear, I had a hard time understanding.

I explored a couple of things such as:

This will surely give you a start as to how to use the other APIs also. So let’s get started.

OAuth 2.0

This is the link that I followed for OAuth,

Bitbucket provides you around 4 to 5 ways for authentication. I used the Resource Owner Password Credentials Grant (4.3).

It is useful if you have the end user’s password but you want to use a more secure end-user access token instead.

But this method won’t work if you have two-step verification enabled.

So, let’s run the above curl with the details as:

Its output is as:

The access token that we get can be used in the following ways:

Creating a Repository

That’s it, the base is set now and we can go on and use the other bitbucket APIs as well.

Please get in touch in case of any queries.

Thanks.

Add a comment

Related posts:

The Temporal Singularity

Herein lies the destiny of all sorrow fear mutated from something to another, reality of a four-dimensional frame twisted birth and death, the infinite spiral retained. The undoing of all things…

A Pleasure Practice

A mindfulness practice to root in present awareness. A gratitude practice to devine deeper appreciation. A discomfort practice to distill comfort within discomfort. A mettā practice to embrace…

Corporate Creatives Are Often Not Real Creatives

There is a growing creative scene in the corporate world that I got duped into working in. I consider myself a creative person and I was looking for a career path that would let me utilise my…