You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
I am working on a project to automate the following tasks using Bitbucket REST APIs:
These endpoints are not yet available with Bitbucket REST APIs v2. Please suggest possible ways to automate/integrate the above points using Bitbucket REST APIs.
Thank you!
Hi @Sumit Kumar and welcome to the community.
1. Invite a user to a repository.
We still support certain endpoints of version 1.0 of our API for invitations, until we provide these for API 2.0
Users can be invited/added directly to a repository, or they can be invited/added to a user group that has access to the repository.
Inviting a user to a specific repo: https://support.atlassian.com/bitbucket-cloud/docs/invitations-endpoint/
Inviting a user to a user group: https://support.atlassian.com/bitbucket-cloud/docs/invitations-resource/ (section "Issue an invitation to a group")
2. Remove users from repositories.
If the user has direct/explicit repo access only, this can be removed with the following endpoint:
If the user belongs to a user group with access to the repository, you can remove the user from that user group with API 1.0, see below section "DELETE a member"
https://support.atlassian.com/bitbucket-cloud/docs/groups-endpoint/
3. To fetch the list of users having access to repositories via API.
You can get this info with the following endpoint:
As noted on that page:
Permissions returned are effective permissions: the highest level of permission the user has. This does not distinguish between direct and indirect (group) privileges.
4. To check for any usage/activity of individual users against the repository ( To take decisions for removing access ) via API.
What do you count as usage/activity? Is it accessing the repo from Bitbucket website? Cloning, pulling, or pushing commits? Or all of these?
I'm afraid that none of this info is available in our API and it is also not available on our website either.
We have a feature request to add clone and push events to the Audit Log available to workspace admins:
https://jira.atlassian.com/browse/BCLOUD-8322
And another feature request to make Audit Logs available via API, that our team is currently working on: https://jira.atlassian.com/browse/BCLOUD-13176
You can vote and comment on both to give them more weight and further express your interest, and you can add yourself as a watcher (by selecting the "Start watching this issue" link) if you'd like to get notified via email on updates.
5. To view the subscription-related information ( Plan name, Monthly / Annual, Renewal date, Billing card details, Billing emails ) via API.
This info is not available via API. We have a feature request to get content from this page via API: https://jira.atlassian.com/browse/BCLOUD-22127 You can leave a comment there mentioning the details you'd like to retrieve.
Please keep in mind that billing emails are not available on Bitbucket. These are only available at https://my.atlassian.com/ for the Technical and Billing contacts for the license.
6. To view the billing history of items by month/range along with pdfs via API.
This info is not available on Bitbucket website and it is not available via API either. Invoices can be obtained by billing and technical contacts at https://my.atlassian.com/billing/paidorders
Kind regards,
Theodora
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.