In Bitbucket API, how can I get a list of ALL licensed users?

北慕城南 提交于 2019-12-13 18:15:34

问题


I've looked at the Bitbucket API docs and this post BitBucket get list of all contributors. The second link asks about users belonging to a repo, but in my case I just want a list of ALL licensed users. Is there really NO way to do this or did I miss it in the docs?


回答1:


Execute something like this:

curl -s --user USER:PASS --request GET https://BITBUCKET-SERVER/rest/api/1.0/admin/users?limit=1000 | jq --raw-output '.values[] | .name + " => " + .displayName'

And you'll get the "username => name" list of users.




回答2:


Just for anyone else looking for this: The currently accepted answer provides a way to list all users, but this will include unlicensed users, i.e. user records that are not currently consuming a seat.

If you want to get a list of all licensed users, follow the steps described in How do I find which users count against my Bitbucket Server license? to install an add-on which will give you exactly this.



来源:https://stackoverflow.com/questions/49616922/in-bitbucket-api-how-can-i-get-a-list-of-all-licensed-users

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!