I am using " curl -X POST -v -u myaccount:passwd "https://api.bitbucket.org/2.0/repositories/myteam/repo2" -H "Content-Type: application/json" -d '{"has_wiki": true, "is_private": true, "project": {"key": "PRJ_KEY"}}' "
to create a new repository in my project.But this gives repo display name as repo2 and repository name also as repo2.
I know that there is possibility to use uppercase in display name.So, I need displayname as Repo2 and repo name as repo2.How to do that?Please, suggest.
Hi Equinox! As far as I know that won't be possible as curl is creating the repo based in the name you're giving it in the URL (the slug). At the moment, slugs only allow lowercase so it won't be possible for you to create an uppercase display name using this method. You might be interested in voting for this feature request:
Hope that helps!
Ana
Hi, thanks.I actually went through the json object for POST.You can have a display name with the filed "name":"dispalyname".But i gotta say it is quite confusing there are no proper examples.The object is little hard to understand.
https://developer.atlassian.com/bitbucket/api/2/reference/resource/repositories/%7Busername%7D/%7Brepo_slug%7D#post
Example:
" curl -X POST -v -u myaccount:passwd "https://api.bitbucket.org/2.0/repositories/myteam/repo2" -H "Content-Type: application/json" -d '{"has_wiki": true, "is_private": true, "project": {"key": "PRJ_KEY"}, "name": "Repo2"}' "
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.