Create groups using Postman and REST APIs in Cloud
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 create groups in bulk in Atlassian Cloud (Jira or Confluence).
When not to use this article
For organizations with users and groups provisioned with Atlassian Guard SCIM, use the Atlassian Access User Provisioning REST API.
Prepare data
- Use a text editor to prepare a text document listing the names of all groups to be created.
- Ensure the first row has a header row labelled
groupName
. - Save the file as a csv, now containing a list of groups to be created.
Sample file
groupName
office-pouso-alegre
mtv-sales-ops
mtv-developers
team-rainbow
vip-support
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 "Create Group in Atlassian Cloud".
Change the method from
GET
toPOST
.In the URL, paste:
{{cloudUrl}}/rest/api/2/group
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:
{ "name": "{{groupName}}" }
noting the {{groupName}} matches the csv header (case-sensitive).
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 Group 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 admin.atlassian.com to ensure the group count has been increased by one.
Rerun Postman Runner following the previous steps, with the number of "Iterations" set to the number of rows in the csv file.