In Bitbucket API, how can I get a list of ALL lice

2019-08-16 08:36发布

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?

2条回答
手持菜刀,她持情操
2楼-- · 2019-08-16 08:55

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.

查看更多
乱世女痞
3楼-- · 2019-08-16 09:06

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.

查看更多
登录 后发表回答