Delete teams from Atlassian Cloud using Postman and REST APIs
Platform Notice: Cloud - This article applies to Atlassian products on the cloud platform.
When to use this article
This article may be used any time there is a need to delete teams in bulk from Atlassian Cloud. For example, after testingmigration to Atlassian Cloud, it may be necessary to delete many teams from the organization to retest.
Prepare data
- Follow the steps in Exporting Atlassian Teams and Members data from my Organization to obtain a list of all teams.
- Using a spreadsheet program or text editor, remove columns I onwards. This leaves a csv file with eight columns.
- Review the spreadsheet and remove all rows (teams) that should not be deleted.
Care should be taken as team names are not distinct and may be duplicated.
- Update the contents of A1 to
teamId
(case-sensitive). - Save the csv, now containing a list of all teams to be removed.
The CSV should now resemble:
A | B | C | |
---|---|---|---|
1 | teamId | displayName | ... |
2 | 4fac65bb-00b7-448c-xxxx-6ef06ca98352 | Platform CORE | ... |
3 | be81dfc7-2527-4a79-xxxx-42b4f123bc12 | Transformers | ... |
4 | 150d846f-8a0d-44ac-xxxx-f8b35506d16b | BusDev | ... |
Set up Postman
This section may be skipped if:
a collection named "Atlassian Cloud User Management" has previously been set up, and
an environment named "Atlassian Cloud" has previously been set up
Set up REST API call
Click New, or type
Ctrl
+N
(Windows/Linux) orCmd
+N
(MacOS).Select "HTTP".
Name the request "Delete Team from Atlassian Cloud".
Change the method from
GET
toDELETE
.In the URL, paste:
{{cloudUrl}}/gateway/api/public/teams/v1/org/{{organizationId}}/teams/{{teamId}}
- Click the "Authorization" tab.
Ensure Type is "Inherit auth from parent".
Click Save , saving into the "Atlassian Cloud User Management" collection.
Execute runner
Change the environment using the environment selector at the top right of Postman, selecting "Atlassian Cloud".
Select Collections in the sidebar.
Select the "Atlassian Cloud User Management" collection.
On the Overview tab, select ▶️ Run towards the top right corner.
Under Run order, ensure there is one and only REST API call - "Delete Team from Atlassian Cloud".
On the Functional tab, select Run manually.
Click Data.
Navigate to and select the previously prepared csv file.
Reduce the number of "Iterations" under Run configuration to 1.
Deleting a team is a destructive and irreversible action. We strongly recommend testing with a single team and verifying results before systematically deleting all teams.
Leave Advanced settings as is.
Click Run Atlassian Cloud User Management.
Check Postman to ensure the runner collection has passed all tests. The run results should show:
"Iterations" and "All tests" to be equivalent in count
Passed (n) where n is the number of iterations
Failed (0)
Skipped (0)
Check admin.atlassian.com to ensure the user count has been reduced by one.
Rerun Postman Runner following the previous steps, with the number of "Iterations" set to the number of rows in the csv file. One error may be expected as it is not possible to delete a team that has already been deleted.