I would like to fork a repository with Bitbucket API like GitHub has. https://developer.github.com/v3/repos/forks/#create-a-fork. Is it possible?
Thanks in advance.
API v2 for documentation:
Overview of solution is to POST to the /repo/forks/ endoint
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I appreciate your answer but they talked about old API version in the thread and I cannot find the same one in new API version below:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The 2.0 documentation is here but the POST body seems complicated. Would really like some actual examples... ie what are the minimum required fields?
https://developer.atlassian.com/cloud/bitbucket/rest/api-group-repositories/#api-repositories-workspace-repo-slug-post
I was able to figure this out using chrome tools while creating a fork from the BB UI. Here is a minimal example:
Imagine I have a repo `foo` in workspace `myspace`. And I want to fork it into `foo-fork` in the same workspace. The request is
POST {{BB_API}}/repositories/myspace/myspace/forks
{"is_private": true,"scm": "git","name": "foo-fork","workspace":{"slug":"myspace"}}
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.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.