How to get Bamboo users and groups when connecting to Jira/Crowd

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

目的

Sometimes we need to get details from users and groups programmatically when Bamboo is connected to Jira/Crowd.
This information is not available in Bamboo database but we can get this directly from Jira/Crowd using the same requests Bamboo does.

ソリューション

These are the requests done by Bamboo to get users, membership and groups:

  • Get users

curl -H "Accept: application/xml" \
     -H "Content-Type: application/xml" \
     -d '<?xml version="1.0" encoding="UTF-8" standalone="yes"?><null-search-restriction/>' \
     -X POST '<JIRA_OR_CROWD_URL>/rest/usermanagement/1/search?entity-type=user&start-index=0&max-results=-1&expand=user' \
     --user <APPLICATION>:<PASSWORD>
  • Get groups

curl -H "Accept: application/xml" \
     -H "Content-Type: application/xml" \
     -d '<?xml version="1.0" encoding="UTF-8" standalone="yes"?><null-search-restriction/>' \
     -X POST '<JIRA_OR_CROWD_URL>/rest/usermanagement/1/search?entity-type=group&start-index=0&max-results=-1&expand=group' \
     --user <APPLICATION>:<PASSWORD>
  • Get membership

curl -H "Accept: application/xml" \
     -X GET '<JIRA_OR_CROWD_URL>/rest/usermanagement/1/group/membership' \
      --user <APPLICATION>:<PASSWORD>
  • Get events
curl -H "Accept: application/xml" \
     -X GET '<JIRA_OR_CROWD_URL>/rest/usermanagement/1/event' \
      --user <APPLICATION>:<PASSWORD>

(warning) Please make sure you change the <JIRA_OR_CROWD_URL> to your JIRA or Crowd url, also <APPLICATION> and <PASSWORD>. You should use the same credentials used by Bamboo to get the same results.



最終更新日 2018 年 9 月 5 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.