-
Suggestion
-
Resolution: Unresolved
-
None
-
16
-
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
- relates to
-
BSERV-10482 Create admin personal tokens for admin endpoints in Bitbucket Server REST API
- Gathering Interest