You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
I want to download my private repository from bitbucket using API calls from my flutter code(DART), how can I download?
Hi @Devansh Mathur,
Welcome to the community.
Unfortunately, we don't have an official API endpoint for you to use to download a repository.
Right now, we have the following workarounds:
To download or get a specific file from your repository, you can use this API endpoint. - Get file or directory contents
To download a repository as a compressed folder, you can use the endpoint below which is also used in your repository Downloads section. Please do note that it only downloads specific revisions from your repository (e.g. the latest commit or tags or branches)
curl -u bbusername:app_password https://bitbucket.org/{workspace}{repo}/get/master.tar.gz -o master.tar.gz
Hope it helps and do let me know if you have further questions.
Regards,
Mark C
Hello @Mark C
Thank you for the answer.
I already know about this API to download files I was only searching for an API to download the repository.
And I got the API for which I was looking.
Regards,
Devansh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Mark C
Can you provide the documentation for this curl.
curl -u bbusername:app_password https://bitbucket.org/{workspace}{repo}/get/master.tar.gz -o master.tar.gz
I am not able to hit API through my flutter code.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Mark C
And please do let me know the response type or the encoding technique used in the response of this API.
I am not able to process the data received from this API using my flutter code.
I have used both Dio and HTTP packages in flutter for API call and an exception is received that is
"XMLHttpRequest error"
I have tried this link https://stackoverflow.com/questions/65630743/how-to-solve-flutter-web-api-cors-error-only-with-dart-code/66879350#66879350
it says to disable the security.
and after disabling the security the API gives me the response.
so is there any way to hit the API without disabling the security?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.