This resource represents groups of users. Use it to get, create, find, and delete groups as well as add and remove users from groups. ([WARNING] The standard Atlassian group names are default names only and can be edited or deleted. For example, an admin or Atlassian support could delete the default group jira-software-users or rename it to jsw-users at any point. See https://support.atlassian.com/user-management/docs/create-and-update-groups/ for details.)
This operation is deprecated, use group/member
.
Returns all users in a group.
Permissions required: either of:
read:jira-user
read:group:jira
, read:user:jira
, read:avatar:jira
Connect app scope required: ADMIN
string
string
string
Returned if the request is successful.
1
2
3
4
5
6
7
8
9
10
11
12
// This sample uses Atlassian Forge
// https://developer.atlassian.com/platform/forge/
import api, { route } from "@forge/api";
const response = await api.asUser().requestJira(route`/rest/api/3/group?groupId={groupId}`, {
headers: {
'Accept': 'application/json'
}
});
console.log(`Response: ${response.status} ${response.statusText}`);
console.log(await response.json());
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
{
"expand": "<string>",
"groupId": "<string>",
"name": "<string>",
"self": "<string>",
"users": {
"end-index": 48,
"items": [
{
"accountId": "<string>",
"accountType": "<string>",
"active": true,
"avatarUrls": {},
"displayName": "<string>",
"emailAddress": "<string>",
"key": "<string>",
"name": "<string>",
"self": "<string>",
"timeZone": "<string>"
}
],
"max-results": 56,
"size": 32,
"start-index": 49
}
}
Creates a group.
Permissions required: Site administration (that is, member of the site-admin group).
manage:jira-configuration
read:group:jira
, read:user:jira
, write:group:jira
, read:avatar:jira
Connect apps cannot access this REST resource.
The name of the group.
string
Requiredany
Returned if the request is successful.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// This sample uses Atlassian Forge
// https://developer.atlassian.com/platform/forge/
import api, { route } from "@forge/api";
var bodyData = `{
"name": "power-users"
}`;
const response = await api.asUser().requestJira(route`/rest/api/3/group`, {
method: 'POST',
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json'
},
body: bodyData
});
console.log(`Response: ${response.status} ${response.statusText}`);
console.log(await response.json());
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
{
"expand": "users",
"groupId": "276f955c-63d7-42c8-9520-92d01dca0625",
"name": "power-users",
"self": "https://your-domain.atlassian.net/rest/api/3/group?groupId=276f955c-63d7-42c8-9520-92d01dca0625",
"users": {
"end-index": 0,
"items": [
{
"accountId": "5b10a2844c20165700ede21g",
"active": false,
"displayName": "Mia Krystof",
"self": "https://your-domain.atlassian.net/rest/api/3/user?accountId=5b10a2844c20165700ede21g"
}
],
"max-results": 50,
"size": 1,
"start-index": 0
}
}
Deletes a group.
Permissions required: Site administration (that is, member of the site-admin strategic group).
manage:jira-configuration
delete:group:jira
Connect apps cannot access this REST resource.
string
string
string
string
Returned if the request is successful.
1
2
3
4
5
6
7
8
9
10
// This sample uses Atlassian Forge
// https://developer.atlassian.com/platform/forge/
import api, { route } from "@forge/api";
const response = await api.asUser().requestJira(route`/rest/api/3/group?groupId={groupId}`, {
method: 'DELETE'
});
console.log(`Response: ${response.status} ${response.statusText}`);
console.log(await response.text());
Returns a paginated list of groups.
Permissions required: Browse users and groups global permission.
read:jira-user
read:group:jira
Connect app scope required: READ
integer
integer
array<string>
array<string>
string
string
Returned if the request is successful.
A page of items.
1
2
3
4
5
6
7
8
9
10
11
12
// This sample uses Atlassian Forge
// https://developer.atlassian.com/platform/forge/
import api, { route } from "@forge/api";
const response = await api.asUser().requestJira(route`/rest/api/3/group/bulk?groupId={groupId}`, {
headers: {
'Accept': 'application/json'
}
});
console.log(`Response: ${response.status} ${response.statusText}`);
console.log(await response.json());
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
{
"isLast": true,
"maxResults": 10,
"startAt": 0,
"total": 2,
"values": [
{
"groupId": "276f955c-63d7-42c8-9520-92d01dca0625",
"name": "jdog-developers"
},
{
"groupId": "6e87dc72-4f1f-421f-9382-2fee8b652487",
"name": "juvenal-bot"
}
]
}
Returns a paginated list of all users in a group.
Note that users are ordered by username, however the username is not returned in the results due to privacy reasons.
Permissions required: either of:
manage:jira-configuration
read:group:jira
, read:user:jira
, read:avatar:jira
Connect app scope required: ADMIN
string
string
boolean
integer
integer
Returned if the request is successful.
A page of items.
1
2
3
4
5
6
7
8
9
10
11
12
// This sample uses Atlassian Forge
// https://developer.atlassian.com/platform/forge/
import api, { route } from "@forge/api";
const response = await api.asUser().requestJira(route`/rest/api/3/group/member?groupId={groupId}`, {
headers: {
'Accept': 'application/json'
}
});
console.log(`Response: ${response.status} ${response.statusText}`);
console.log(await response.json());
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
{
"isLast": false,
"maxResults": 2,
"nextPage": "https://your-domain.atlassian.net/rest/api/3/group/member?groupId=276f955c-63d7-42c8-9520-92d01dca0625&includeInactiveUsers=false&startAt=4&maxResults=2",
"self": "https://your-domain.atlassian.net/rest/api/3/group/member?groupId=276f955c-63d7-42c8-9520-92d01dca0625&includeInactiveUsers=false&startAt=2&maxResults=2",
"startAt": 3,
"total": 5,
"values": [
{
"accountId": "5b10a2844c20165700ede21g",
"accountType": "atlassian",
"active": true,
"avatarUrls": {},
"displayName": "Mia",
"emailAddress": "mia@example.com",
"key": "",
"name": "",
"self": "https://your-domain.atlassian.net/rest/api/3/user?accountId=5b10a2844c20165700ede21g",
"timeZone": "Australia/Sydney"
},
{
"accountId": "5b10a0effa615349cb016cd8",
"accountType": "atlassian",
"active": false,
"avatarUrls": {},
"displayName": "Will",
"emailAddress": "will@example.com",
"key": "",
"name": "",
"self": "https://your-domain.atlassian.net/rest/api/3/user?accountId=5b10a0effa615349cb016cd8",
"timeZone": "Australia/Sydney"
}
]
}
Adds a user to a group.
Permissions required: Site administration (that is, member of the site-admin group).
manage:jira-configuration
write:group:jira
, read:avatar:jira
, read:group:jira
, read:user:jira
Connect apps cannot access this REST resource.
string
string
The user to add to the group.
string
string
any
Returned if the request is successful.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// This sample uses Atlassian Forge
// https://developer.atlassian.com/platform/forge/
import api, { route } from "@forge/api";
var bodyData = `{
"accountId": "5b10ac8d82e05b22cc7d4ef5"
}`;
const response = await api.asUser().requestJira(route`/rest/api/3/group/user?groupId={groupId}`, {
method: 'POST',
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json'
},
body: bodyData
});
console.log(`Response: ${response.status} ${response.statusText}`);
console.log(await response.json());
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
{
"expand": "<string>",
"groupId": "<string>",
"name": "<string>",
"self": "<string>",
"users": {
"end-index": 48,
"items": [
{
"accountId": "<string>",
"accountType": "<string>",
"active": true,
"avatarUrls": {},
"displayName": "<string>",
"emailAddress": "<string>",
"key": "<string>",
"name": "<string>",
"self": "<string>",
"timeZone": "<string>"
}
],
"max-results": 56,
"size": 32,
"start-index": 49
}
}
Removes a user from a group.
Permissions required: Site administration (that is, member of the site-admin group).
manage:jira-configuration
write:group:jira
Connect apps cannot access this REST resource.
string
string
string
string
RequiredReturned if the request is successful.
1
2
3
4
5
6
7
8
9
10
// This sample uses Atlassian Forge
// https://developer.atlassian.com/platform/forge/
import api, { route } from "@forge/api";
const response = await api.asUser().requestJira(route`/rest/api/3/group/user?groupId={groupId}&accountId=5b10ac8d82e05b22cc7d4ef5`, {
method: 'DELETE'
});
console.log(`Response: ${response.status} ${response.statusText}`);
console.log(await response.text());
Returns a list of groups whose names contain a query string. A list of group names can be provided to exclude groups from the results.
The primary use case for this resource is to populate a group picker suggestions list. To this end, the returned object includes the html
field where the matched query term is highlighted in the group name with the HTML strong tag. Also, the groups list is wrapped in a response object that contains a header for use in the picker, specifically Showing X of Y matching groups.
The list returns with the groups sorted. If no groups match the list criteria, an empty list is returned.
This operation can be accessed anonymously.
Permissions required: Browse projects project permission. Anonymous calls and calls by users without the required permission return an empty list.
Browse users and groups global permission. Without this permission, calls where query is not an exact match to an existing group will return an empty list.
read:jira-user
read:group:jira
Connect app scope required: READ
string
string
array<string>
array<string>
integer
boolean
string
Returned if the request is successful.
The list of groups found in a search, including header text (Showing X of Y matching groups) and total of matched groups.
1
2
3
4
5
6
7
8
9
10
11
12
// This sample uses Atlassian Forge
// https://developer.atlassian.com/platform/forge/
import api, { route } from "@forge/api";
const response = await api.asUser().requestJira(route`/rest/api/3/groups/picker`, {
headers: {
'Accept': 'application/json'
}
});
console.log(`Response: ${response.status} ${response.statusText}`);
console.log(await response.json());
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
{
"groups": [
{
"groupId": "276f955c-63d7-42c8-9520-92d01dca0625",
"html": "<b>j</b>dog-developers",
"name": "jdog-developers"
},
{
"groupId": "6e87dc72-4f1f-421f-9382-2fee8b652487",
"html": "<b>j</b>uvenal-bot",
"name": "juvenal-bot"
}
],
"header": "Showing 20 of 25 matching groups",
"total": 25
}
Rate this page: