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

XMLWordPrintable

    • Type: Suggestion
    • Resolution: Unresolved
    • None
    • Component/s: API - REST
    • 13
    • 14

      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

              Assignee:
              Unassigned
              Reporter:
              Craig Drummond
              Votes:
              4 Vote for this issue
              Watchers:
              11 Start watching this issue

                Created:
                Updated: