Uploaded image for project: 'Bitbucket Data Center'
  1. Bitbucket Data Center
  2. BSERV-12791

Add the ability to create projects via REST API using Personal Access Token Auth

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Unresolved
    • None
    • API - REST
    • 7
    • We collect Bitbucket feedback from various sources, and we evaluate what we've collected when planning our product roadmap. To understand how this piece of feedback will be reviewed, see our Implementation of New Features Policy.

    Description

      Request

      Allow System Administrator users to create projects via the REST API using Personal Access Token (PAT) Auth

      Problem report:

      Attempting to create a project using the REST API and a PAT in the header as the Auth method fails with "You are not permitted to access this resource"

      Example of failing request:
      curl -i -X POST -H "Content-Type: application/json" -H "Authorization: Bearer Njg2Nzg3NjQ4OTE5OqD2stM90FupJKGtj7K8IkQ7dgRi" -d '{"key": "MTP2", "name": "My Test Project 2", "description": "My Description of my test project 2"}' http://localhost:7990/rest/api/1.0/projects
      
      Full output of error:
      {"errors":[{"context":null,"message":"You are not permitted to access this resource","exceptionName":"com.atlassian.bitbucket.AuthorisationException"}]}
      

      Workaround:

      Currently the REST API works fine with Basic Auth (Username Password) but this is not ideal for automation

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              cdrummond Craig Drummond
              Votes:
              2 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

                Created:
                Updated: