This resource represents options for sharing filters. Use it to get share scopes as well as add and remove share scopes from filters.
Returns the default sharing settings for new filters and dashboards for a user.
Permissions required: Permission to access Jira.
read:jira-work
read:filter.default-share-scope:jira
Connect app scope required: READ
This request has no parameters.
Returned if the request is successful.
Details of the scope of the default sharing for new filters and dashboards.
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/filter/defaultShareScope`, {
headers: {
'Accept': 'application/json'
}
});
console.log(`Response: ${response.status} ${response.statusText}`);
console.log(await response.json());
1
2
3
{
"scope": "GLOBAL"
}
Sets the default sharing for new filters and dashboards for a user.
Permissions required: Permission to access Jira.
write:jira-work
write:filter.default-share-scope:jira
, read:filter.default-share-scope:jira
Connect app scope required: WRITE
string
RequiredReturned if the request is successful.
Details of the scope of the default sharing for new filters and dashboards.
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 = `{
"scope": "GLOBAL"
}`;
const response = await api.asUser().requestJira(route`/rest/api/3/filter/defaultShareScope`, {
method: 'PUT',
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
{
"scope": "GLOBAL"
}
Returns the share permissions for a filter. A filter can be shared with groups, projects, all logged-in users, or the public. Sharing with all logged-in users or the public is known as a global share permission.
This operation can be accessed anonymously.
Permissions required: None, however, share permissions are only returned for:
read:jira-work
read:filter:jira
, read:group:jira
, read:project:jira
, read:user:jira
, read:application-role:jira
...(Show more)Connect app scope required: READ
integer
RequiredReturned if the request is successful.
array<SharePermission>
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/filter/{id}/permission`, {
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
[
{
"id": 10000,
"type": "global"
},
{
"id": 10010,
"project": {
"avatarUrls": {
"16x16": "https://your-domain.atlassian.net/secure/projectavatar?size=xsmall&pid=10000",
"24x24": "https://your-domain.atlassian.net/secure/projectavatar?size=small&pid=10000",
"32x32": "https://your-domain.atlassian.net/secure/projectavatar?size=medium&pid=10000",
"48x48": "https://your-domain.atlassian.net/secure/projectavatar?size=large&pid=10000"
},
"id": "10000",
"insight": {
"lastIssueUpdateTime": "2021-04-22T05:37:05.000+0000",
"totalIssueCount": 100
},
"key": "EX",
"name": "Example",
"projectCategory": {
"description": "First Project Category",
"id": "10000",
"name": "FIRST",
"self": "https://your-domain.atlassian.net/rest/api/3/projectCategory/10000"
},
"self": "https://your-domain.atlassian.net/rest/api/3/project/EX",
"simplified": false,
"style": "classic"
},
"type": "project"
},
{
"id": 10010,
"project": {
"avatarUrls": {
"16x16": "https://your-domain.atlassian.net/secure/projectavatar?size=xsmall&pid=10002",
"24x24": "https://your-domain.atlassian.net/secure/projectavatar?size=small&pid=10002",
"32x32": "https://your-domain.atlassian.net/secure/projectavatar?size=medium&pid=10002",
"48x48": "https://your-domain.atlassian.net/secure/projectavatar?size=large&pid=10002"
},
"deleted": true,
"deletedBy": {
"accountId": "5b10a2844c20165700ede21g",
"accountType": "atlassian",
"active": false,
"avatarUrls": {
"16x16": "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=16&s=16",
"24x24": "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=24&s=24",
"32x32": "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=32&s=32",
"48x48": "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=48&s=48"
},
"displayName": "Mia Krystof",
"key": "",
"name": "",
"self": "https://your-domain.atlassian.net/rest/api/3/user?accountId=5b10a2844c20165700ede21g"
},
"deletedDate": "2022-11-11T13:35:29.000+0000",
"id": "10002",
"insight": {
"lastIssueUpdateTime": "2021-04-22T05:37:05.000+0000",
"totalIssueCount": 100
},
"key": "MKY",
"name": "Example",
"projectCategory": {
"description": "First Project Category",
"id": "10000",
"name": "FIRST",
"self": "https://your-domain.atlassian.net/rest/api/3/projectCategory/10000"
},
"retentionTillDate": "2023-01-10T13:35:29.000+0000",
"self": "https://your-domain.atlassian.net/rest/api/3/project/MKY",
"simplified": false,
"style": "classic"
},
"role": {
"self": "https://your-domain.atlassian.net/rest/api/3/project/MKY/role/10360",
"name": "Developers",
"id": 10360,
"description": "A project role that represents developers in a project",
"actors": [
{
"actorGroup": {
"name": "jira-developers",
"displayName": "jira-developers",
"groupId": "952d12c3-5b5b-4d04-bb32-44d383afc4b2"
},
"displayName": "jira-developers",
"id": 10240,
"name": "jira-developers",
"type": "atlassian-group-role-actor"
},
{
"actorUser": {
"accountId": "5b10a2844c20165700ede21g"
},
"displayName": "Mia Krystof",
"id": 10241,
"type": "atlassian-user-role-actor"
}
],
"scope": {
"project": {
"id": "10000",
"key": "KEY",
"name": "Next Gen Project"
},
"type": "PROJECT"
}
},
"type": "project"
},
{
"group": {
"groupId": "276f955c-63d7-42c8-9520-92d01dca0625",
"name": "jira-administrators",
"self": "https://your-domain.atlassian.net/rest/api/3/group?groupId=276f955c-63d7-42c8-9520-92d01dca0625"
},
"id": 10010,
"type": "group"
}
]
Add a share permissions to a filter. If you add a global share permission (one for all logged-in users or the public) it will overwrite all share permissions for the filter.
Be aware that this operation uses different objects for updating share permissions compared to Update filter.
Permissions required: Share dashboards and filters global permission and the user must own the filter.
write:jira-work
write:filter:jira
, read:filter:jira
, read:group:jira
, read:project:jira
, read:user:jira
...(Show more)Connect app scope required: WRITE
integer
Requiredstring
string
string
string
string
integer
string
RequiredReturned if the request is successful.
array<SharePermission>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// This sample uses Atlassian Forge
// https://developer.atlassian.com/platform/forge/
import api, { route } from "@forge/api";
var bodyData = `{
"groupname": "jira-administrators",
"rights": 1,
"type": "group"
}`;
const response = await api.asUser().requestJira(route`/rest/api/3/filter/{id}/permission`, {
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
[
{
"id": 10000,
"type": "global"
},
{
"id": 10010,
"project": {
"avatarUrls": {
"16x16": "https://your-domain.atlassian.net/secure/projectavatar?size=xsmall&pid=10000",
"24x24": "https://your-domain.atlassian.net/secure/projectavatar?size=small&pid=10000",
"32x32": "https://your-domain.atlassian.net/secure/projectavatar?size=medium&pid=10000",
"48x48": "https://your-domain.atlassian.net/secure/projectavatar?size=large&pid=10000"
},
"id": "10000",
"insight": {
"lastIssueUpdateTime": "2021-04-22T05:37:05.000+0000",
"totalIssueCount": 100
},
"key": "EX",
"name": "Example",
"projectCategory": {
"description": "First Project Category",
"id": "10000",
"name": "FIRST",
"self": "https://your-domain.atlassian.net/rest/api/3/projectCategory/10000"
},
"self": "https://your-domain.atlassian.net/rest/api/3/project/EX",
"simplified": false,
"style": "classic"
},
"type": "project"
},
{
"id": 10010,
"project": {
"avatarUrls": {
"16x16": "https://your-domain.atlassian.net/secure/projectavatar?size=xsmall&pid=10002",
"24x24": "https://your-domain.atlassian.net/secure/projectavatar?size=small&pid=10002",
"32x32": "https://your-domain.atlassian.net/secure/projectavatar?size=medium&pid=10002",
"48x48": "https://your-domain.atlassian.net/secure/projectavatar?size=large&pid=10002"
},
"deleted": true,
"deletedBy": {
"accountId": "5b10a2844c20165700ede21g",
"accountType": "atlassian",
"active": false,
"avatarUrls": {
"16x16": "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=16&s=16",
"24x24": "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=24&s=24",
"32x32": "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=32&s=32",
"48x48": "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=48&s=48"
},
"displayName": "Mia Krystof",
"key": "",
"name": "",
"self": "https://your-domain.atlassian.net/rest/api/3/user?accountId=5b10a2844c20165700ede21g"
},
"deletedDate": "2022-11-11T13:35:29.000+0000",
"id": "10002",
"insight": {
"lastIssueUpdateTime": "2021-04-22T05:37:05.000+0000",
"totalIssueCount": 100
},
"key": "MKY",
"name": "Example",
"projectCategory": {
"description": "First Project Category",
"id": "10000",
"name": "FIRST",
"self": "https://your-domain.atlassian.net/rest/api/3/projectCategory/10000"
},
"retentionTillDate": "2023-01-10T13:35:29.000+0000",
"self": "https://your-domain.atlassian.net/rest/api/3/project/MKY",
"simplified": false,
"style": "classic"
},
"role": {
"self": "https://your-domain.atlassian.net/rest/api/3/project/MKY/role/10360",
"name": "Developers",
"id": 10360,
"description": "A project role that represents developers in a project",
"actors": [
{
"actorGroup": {
"name": "jira-developers",
"displayName": "jira-developers",
"groupId": "952d12c3-5b5b-4d04-bb32-44d383afc4b2"
},
"displayName": "jira-developers",
"id": 10240,
"name": "jira-developers",
"type": "atlassian-group-role-actor"
},
{
"actorUser": {
"accountId": "5b10a2844c20165700ede21g"
},
"displayName": "Mia Krystof",
"id": 10241,
"type": "atlassian-user-role-actor"
}
],
"scope": {
"project": {
"id": "10000",
"key": "KEY",
"name": "Next Gen Project"
},
"type": "PROJECT"
}
},
"type": "project"
},
{
"group": {
"groupId": "276f955c-63d7-42c8-9520-92d01dca0625",
"name": "jira-administrators",
"self": "https://your-domain.atlassian.net/rest/api/3/group?groupId=276f955c-63d7-42c8-9520-92d01dca0625"
},
"id": 10010,
"type": "group"
}
]
Returns a share permission for a filter. A filter can be shared with groups, projects, all logged-in users, or the public. Sharing with all logged-in users or the public is known as a global share permission.
This operation can be accessed anonymously.
Permissions required: None, however, a share permission is only returned for:
read:jira-work
read:filter:jira
, read:group:jira
, read:project:jira
, read:project-role:jira
, read:user:jira
...(Show more)Connect app scope required: READ
integer
Requiredinteger
RequiredReturned if the request is successful.
Details of a share permission for the filter.
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/filter/{id}/permission/{permissionId}`, {
headers: {
'Accept': 'application/json'
}
});
console.log(`Response: ${response.status} ${response.statusText}`);
console.log(await response.json());
1
2
3
4
{
"id": 10000,
"type": "global"
}
Deletes a share permission from a filter.
Permissions required: Permission to access Jira and the user must own the filter.
write:jira-work
write:filter:jira
Connect app scope required: DELETE
integer
Requiredinteger
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/filter/{id}/permission/{permissionId}`, {
method: 'DELETE'
});
console.log(`Response: ${response.status} ${response.statusText}`);
console.log(await response.text());
Rate this page: