I've been experimenting with the BB API, and noticed the following. If I create a repo with token passed as a URI string arg, then the { "name": "My Repo Name" } gets passed to the repository, however, when creating a repo with {"Authorization: Bearer $token"} the name gets ignored. eg.
(assume {repo} = 'cool_repo_bro')
curl -X POST -H "Content-Type: application/json" -d '{"scm": "git", "is_private": "true", "name": "Cool Repo Bro" }' https://api.bitbucket.org/2.0/repositories/{user}/{repo}\?access_token=$token
Creates repository called Cool Repo Bro with url of cool_repo_bro, all is well here.
However, when I try:
curl -X POST -H "Authorization: Bearer $token" -d '{"scm": "git", "is_private": "true", "name": "Cool Repo Bro" }' https://api.bitbucket.org/2.0/repositories/{user}/{repo}
It ignores the name and creates a repository with the name cool_repo_bro
Apologies if this is a silly question, I haven't had a lot of experience with OAuth