Forking a repository fails with Invalid Project

Issue #17528 new
Steven Combs
created an issue

We created the MARS project with key MARS. However, the API request is failing when we try to fork. We've tried to understand the API documentation listed here https://developer.atlassian.com/bitbucket/api/2/reference/resource/repositories/%7Busername%7D/%7Brepo_slug%7D/forks

However, the Request Example doesn't specify what the key names should be and in what order they should be in. Nothing really says that we should be posting a keyed object with name "project" it just says "all Of". So we are making assumptions on how the API should work.

Any help is greatly appreciated, see the request URL and post body along with the error message returned from the API.

https://api.bitbucket.org/2.0/repositories/myteamname/initial-index-ui/forks

This is our post body

{
    "name": "my-repo-temp121211",
    "owner": {
      "username": "myteamname"
    },
    "is_private": true,
    "project": {
        "key": "MARS"
    }
}

Fails with error

{
    "type": "error",
    "error": {
        "message": "Invalid project"
    }
}

Comments (5)

  1. Log in to comment