Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

App Password option in enterprise edition

uttamag February 28, 2019

I installed bitbucket 6.0.1 enterprise version. I want to access the bitbucket operations such as commit, checkout using rest API. I dont see any option to generate the app password in this edition though I see in SAAS version (bitbucket.org)

1 answer

0 votes
Stephen Sifers
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 28, 2019

Hello Uttam and welcome to the Community!

Bitbucket Server does not have an option to use an API token, unlike Bitbucket Cloud. This is due to the nature of how each tool is made available and the different parity of them. BItbucket server does offer basic authentication when using the REST API. More about this may be found at Bitbucket Server REST API Example - Basic Authentication.

There is a feature request to add token authentication to the REST API. You may find this request at  BSERV-2722. We would suggest you vote and watch this request to receive future updates on its status.

I hope this clarifies how you’re able to authenticate with the REST API when using Bitbucket server.

Regards,
Stephen Sifers

blackstonevmwareteam February 28, 2019

Hi Stephen,


Thanks for the quick response. I tried with personal access token and username and I able to use REST API 1.0. 

 

http://localhost:7990/rest/api/1.0/projects/BLAC/repos/sddc-test/commits

 

I have integrated my application with REST API 2.0 for Bitbucket cloud. I want to make same code working for Bitbucket enterprise edition too. I use below API in my application. Can I use the same for enterprise edition too. Also I read that REST API 1.0 for Cloud will be deprecated from April. Are you planning to deprecate REST API 1.0 for enterprise bitbucket edition also.

 

 

https://api.bitbucket.org/2.0/repositories/<username>/SDDC-Test/refs/branches/sddc-test

https://api.bitbucket.org/2.0/repositories/<username>/SDDC-Test/src/master/

https://api.bitbucket.org/2.0/repositories/<username>/sddc-test/refs/branches

https://api.bitbucket.org/2.0/repositories/<username>/sddc-test/pullrequests

https://api.bitbucket.org/2.0/repositories/<username>/sddc-test/pullrequests/2/merge

https://api.bitbucket.org/2.0/repositories/<username>/sddc-test/src

https://api.bitbucket.org/2.0/repositories/<username>/sddc-test/refs/branches/sddc-test-branch

 

Regards,

Uttam Agarwal

Like Stephen Sifers likes this
Stephen Sifers
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 1, 2019

Hello Uttam,

Thank you for the clarification on which endpoints you’re using along with which products (cloud and server) you want to interface with.

To address the portability of the Cloud API vs. the Server API; The API between the two products are not the same, nor are the endpoints the same. While you may receive similar results from different endpoints, there is not reusability between a Cloud or Server API with one another. For further information on the Bitbucket Server API, please review Bitbucket Server | REST APIs.

For the question about Bitbucket API deprecation, the best place to check which endpoints are going to be or have been deprecated would be API Changelog. The Bitbucket cloud API 1.0 deprecation does not directly impact server versions. You may find the deprecation notice for cloud at Deprecation notice - Bitbucket Cloud REST API version 1 is deprecated effective 30 June 2018.

I hope this helps to clarify the usability of the versions of the APIs along with which endpoints are useable within which product.

Regards,
Stephen Sifers

blackstonevmwareteam March 2, 2019

Thanks Stephen

dimal baby March 2, 2019

Hi Stephen,

Any latest version of bitbucket server support 2.0 APIs ?

Stephen Sifers
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 6, 2019

Hello Dimal and welcome to the Community,

Bitbucket Server and Bitbucket cloud are two different products not using the same API. Presently, there is only V1.0 for Bitbucket server available. If a V2.0 was released for Bitbucket server it would not be the same API that is available for Bitbucket cloud as they have different parity. 

The best place to see updates for the Bitbucket server API would be to check API Changelog for any changes to the server side API. Generally, API changes only come with new version releases.

I hope this proves helpful.

Regards,
Stephen Sifers

blackstonevmwareteam March 6, 2019

Thanks Stephen for the answer. One more help, I raised one more question. Can someone help me in below query.

https://community.atlassian.com/t5/Bitbucket-questions/Adding-multiple-new-files-to-bitbucket-enterprise-server-using/qaq-p/1023009

Like Stephen Sifers likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events