I'm very new to web development and I was trying to configure access to a file in my repository in a Django project (so just via a python file) using my username, repo name/workspace name/file name and the app password. I found a guide for cloning the repository via python, but nothing to access the specified file and its contents. I also don't know if this is possible since I haven't found anything specifically addressing this issue. I did find something that said to use the py requests module and request it via a url, but this was once again for cloning. Can anybody guide me in the right direction? And if this doesn't work, do you have any other suggestions for how to approach this?
Hi Hailey and welcome to the community!
We offer API endpoints for getting a file's content and for uploading a file to create a commit.
If you're looking to get the contents of just one file of a repository, you can use the following API endpoint:
If you make changes to that file locally and want to commit the new version to the Bitbucket Cloud repo, you can use the following API endpoint:
Kind regards,
Theodora
Thank you so much!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You are very welcome! Please feel free to reach out if you ever need anything else!
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.