Forums

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

How to start with API for javascript

fernando azarias February 5, 2019

Hi guys. I want to do an application with javascript (node.js with express.js and vue.js). Basically this application gets the repo from Bitbucket and shows the scaffolding of project and then I select some files for upload at another server. That's all.

 

I stayed reading documentation from some places and I don't understand how can I start  to develop with javascript.

 

So, I need a guide or explanation how can I start to it.

 

Regards

1 answer

1 accepted

1 vote
Answer accepted
Tyler T
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 6, 2019

Hi,

Here is some documentation on the Javascript Fetch API:

https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API

Here is the Bitbucket API documentation for fetching repositories:

https://developer.atlassian.com/bitbucket/api/2/reference/resource/repositories/%7Busername%7D/%7Brepo_slug%7D

Here is an example of an API call to a public repository:

https://api.bitbucket.org/2.0/repositories/pypy/pypy

fernando azarias February 6, 2019

Oh thank so very much!

And the last question.

I need to access to some private endpoints so I need to get any credential or get login.

For example. Is there any way to login with the user account of bitbucket and use this credentials in the app?

Tyler T
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 6, 2019

Here is some documentation about authentication: https://developer.atlassian.com/bitbucket/api/2/reference/meta/authentication#repo-clone

Be sure to NOT store any sensitive credentials client-side for security reasons.

fernando azarias February 7, 2019

Oh thank so very much, that link is very useful for me.

Well, finally I did authentication with Oauth.

 

Thank you.

 

Regards

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events