Uploaded image for project: 'Bitbucket Cloud'
  1. Bitbucket Cloud
  2. BCLOUD-17528

Forking a repository fails with Invalid Project

    XMLWordPrintable

Details

    Description

      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"
          }
      }
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            steven.combs Steven Combs
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: