Create teams in Atlassian Cloud using Postman and REST APIs
Platform Notice: Cloud Only - This article only 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 create teams in bulk in Atlassian Cloud.
Prepare data
- Use a text editor to prepare a text document listing the names of all teams to be created, as well as a second column providing a description if desired.
- Ensure the first row has a header row labelled
teamName,teamDescription
.
While a description for the team is not required, it is mandatory for the REST API call. - Save the file as a csv, now containing a list of teams to be created.
Sample file
teamName,teamDescription
Transformers,Business transformation team
Project Matrix,
Platform CORE,
Team Cardguard,InfoSec
Pipedream,API team
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
Find organization id
- Navigate to admin.atlassian.com.
- Select your organization if you have more than one.
- Observe your organization id from the URL:
https://admin.atlassian.com/o/<orgId>/overview
where the org id is a GUID, for example:
7d737580-498a-1b1c-kcd1-kdjj1d0bada9
Find site id
- Navigate to admin.atlassian.com.
- Select your organization if you have more than one.
- Select Products from the top navigation bar.
- In the left navigation pane, select a site.
- Observe your site id from the URL:
https://admin.atlassian.com/s//access-requests
where the site id is a GUID, for example:
6dbf9191-c42b-4988-97d7-45cb4f1112f7
Set up REST API call
Click New, or type
Ctrl
+N
(Windows/Linux) orCmd
+N
(MacOS).Select "HTTP".
Name the request "Create Team in Atlassian Cloud".
Change the method from
GET
toPOST
.In the URL, paste:
{{cloudUrl}}/gateway/api/public/teams/v1/org/<orgId>/teams/
- Replace
<orgId>
in the URL with the organization id previously obtained. Click the "Authorization" tab.
Ensure Type is "Inherit auth from parent".
- Click the "Body" tab.
Click "raw".
Change the content type to "JSON".
Paste the following block in payload area:
{ "displayName": "{{teamName}}", "description": "{{teamDescription}}", "siteId": "<siteId>", "teamType": "OPEN" }
noting the {{teamName}} and {{teamDescription}} match the csv header (case-sensitive).
Accepted values for teamType are:teamType Definition OPEN Any member of your organization may join the team without approval. MEMBER_INVITE Team members must be invited by a team administrator. - Replace
<siteId>
in the URL with the site id previously obtained. - 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 - "Create Team in 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.
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 Teams at your site, for example, https://bancly.atlassian.net/jira/people/search to ensure the team has been added.
Alternatively, open your Jira site, then click on Teams in the top navigation bar.Rerun Postman Runner following the previous steps, with the number of "Iterations" set to the number of rows in the csv file.
References
- developer.atlassian.com - Team Public REST API
- developer.atlassian.com - Teams Public API
- Postman - Using the Collection Runner