Returns the watches for a page. A user that watches a page will receive receive notifications when the page is updated.
If you want to manage watches for a page, use the following user
methods:
Permissions required: Permission to access the Confluence site ('Can use' global permission).
read:confluence-content.summary
read:watcher:confluence
, read:user:confluence
Connect app scope required: READ
string
Requiredinteger
integer
Returned if the requested watches are returned.
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().requestConfluence(route`/wiki/rest/api/content/{id}/notification/child-created`, {
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
{
"results": [
{
"type": "<string>",
"watcher": {
"type": "<string>",
"username": "<string>",
"userKey": "<string>",
"accountId": "<string>",
"profilePicture": {
"path": "<string>",
"width": 2154,
"height": 2154,
"isDefault": true
},
"displayName": "<string>",
"timeZone": "<string>",
"operations": [
{
"operation": "administer",
"targetType": "<string>"
}
],
"externalCollaborator": true,
"isGuest": true,
"isExternalCollaborator": true,
"details": {},
"accountType": "<string>",
"email": "<string>",
"publicName": "<string>",
"personalSpace": {}
},
"contentId": 2154
}
],
"start": 2154,
"limit": 2154,
"size": 2154,
"_links": {}
}
Returns all space watches for the space that the content is in. A user that watches a space will receive receive notifications when any content in the space is updated.
If you want to manage watches for a space, use the following user
methods:
Permissions required: Permission to access the Confluence site ('Can use' global permission).
read:confluence-content.summary
read:watcher:confluence
, read:user:confluence
Connect app scope required: READ
string
Requiredinteger
integer
Returned if the requested watches are returned.
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().requestConfluence(route`/wiki/rest/api/content/{id}/notification/created`, {
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
{
"results": [
{
"type": "<string>",
"watcher": {
"type": "<string>",
"username": "<string>",
"userKey": "<string>",
"accountId": "<string>",
"profilePicture": {
"path": "<string>",
"width": 2154,
"height": 2154,
"isDefault": true
},
"displayName": "<string>",
"timeZone": "<string>",
"operations": [
{
"operation": "administer",
"targetType": "<string>"
}
],
"externalCollaborator": true,
"isGuest": true,
"isExternalCollaborator": true,
"details": {},
"accountType": "<string>",
"email": "<string>",
"publicName": "<string>",
"personalSpace": {}
},
"spaceKey": "<string>",
"labelName": "<string>",
"prefix": "<string>"
}
],
"start": 2154,
"limit": 2154,
"size": 2154,
"_links": {}
}
Returns a list of watchers of a space
read:watcher:confluence
, read:user:confluence
Connect app scope required: READ
string
Requiredstring
string
Returned if watchers list is returned.
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().requestConfluence(route`/wiki/rest/api/space/{spaceKey}/watch`, {
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
{
"results": [
{
"type": "<string>",
"watcher": {
"type": "<string>",
"username": "<string>",
"userKey": "<string>",
"accountId": "<string>",
"profilePicture": {
"path": "<string>",
"width": 2154,
"height": 2154,
"isDefault": true
},
"displayName": "<string>",
"timeZone": "<string>",
"operations": [
{
"operation": "administer",
"targetType": "<string>"
}
],
"externalCollaborator": true,
"isGuest": true,
"isExternalCollaborator": true,
"details": {},
"accountType": "<string>",
"email": "<string>",
"publicName": "<string>",
"personalSpace": {}
},
"spaceKey": "<string>",
"labelName": "<string>",
"prefix": "<string>"
}
],
"start": 2154,
"limit": 2154,
"size": 2154,
"_links": {}
}
Returns whether a user is watching a piece of content. Choose the user by doing one of the following:
accountId
to identify the user.Permissions required: 'Confluence Administrator' global permission if specifying a user, otherwise permission to access the Confluence site ('Can use' global permission).
read:confluence-content.summary
read:watcher:confluence
Connect app scope required: READ
string
Requiredstring
string
string
Returned if the requested watch status is returned.
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().requestConfluence(route`/wiki/rest/api/user/watch/content/{contentId}`, {
headers: {
'Accept': 'application/json'
}
});
console.log(`Response: ${response.status} ${response.statusText}`);
console.log(await response.json());
1
2
3
{
"watching": true
}
Adds a user as a watcher to a piece of content. Choose the user by doing one of the following:
accountId
to identify the user.Note, you must add the X-Atlassian-Token: no-check
header when making a
request, as this operation has XSRF protection.
Permissions required: 'Confluence Administrator' global permission if specifying a user, otherwise permission to access the Confluence site ('Can use' global permission).
write:confluence-content
write:watcher:confluence
Connect app scope required: WRITE
string
Requiredstring
string
string
Returned if the watcher was successfully created. No response body is returned.
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().requestConfluence(route`/wiki/rest/api/user/watch/content/{contentId}`, {
method: 'POST'
});
console.log(`Response: ${response.status} ${response.statusText}`);
console.log(await response.text());
Removes a user as a watcher from a piece of content. Choose the user by doing one of the following:
accountId
to identify the user.Permissions required: 'Confluence Administrator' global permission if specifying a user, otherwise permission to access the Confluence site ('Can use' global permission).
write:confluence-content
write:watcher:confluence
Connect app scope required: WRITE
string
Requiredstring
string
string
string
RequiredReturned if the watcher was successfully deleted. No response body is returned.
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().requestConfluence(route`/wiki/rest/api/user/watch/content/{contentId}`, {
method: 'DELETE'
});
console.log(`Response: ${response.status} ${response.statusText}`);
console.log(await response.text());
Returns whether a user is watching a label. Choose the user by doing one of the following:
accountId
to identify the user.Permissions required: 'Confluence Administrator' global permission if specifying a user, otherwise permission to access the Confluence site ('Can use' global permission).
read:confluence-content.summary
read:watcher:confluence
Connect app scope required: READ
string
Requiredstring
string
string
Returned if the requested watch status is returned.
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().requestConfluence(route`/wiki/rest/api/user/watch/label/{labelName}`, {
headers: {
'Accept': 'application/json'
}
});
console.log(`Response: ${response.status} ${response.statusText}`);
console.log(await response.json());
1
2
3
{
"watching": true
}
Adds a user as a watcher to a label. Choose the user by doing one of the following:
accountId
to identify the user.Note, you must add the X-Atlassian-Token: no-check
header when making a
request, as this operation has XSRF protection.
Permissions required: 'Confluence Administrator' global permission if specifying a user, otherwise permission to access the Confluence site ('Can use' global permission).
write:confluence-content
write:watcher:confluence
Connect app scope required: WRITE
string
Requiredstring
string
string
string
RequiredReturned if the watcher was successfully created. No response body is returned.
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().requestConfluence(route`/wiki/rest/api/user/watch/label/{labelName}`, {
method: 'POST'
});
console.log(`Response: ${response.status} ${response.statusText}`);
console.log(await response.text());
Removes a user as a watcher from a label. Choose the user by doing one of the following:
accountId
to identify the user.Permissions required: 'Confluence Administrator' global permission if specifying a user, otherwise permission to access the Confluence site ('Can use' global permission).
write:confluence-content
write:watcher:confluence
Connect app scope required: WRITE
string
Requiredstring
string
string
Returned if the watcher was successfully deleted. No response body is returned.
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().requestConfluence(route`/wiki/rest/api/user/watch/label/{labelName}`, {
method: 'DELETE'
});
console.log(`Response: ${response.status} ${response.statusText}`);
console.log(await response.text());
Returns whether a user is watching a space. Choose the user by doing one of the following:
accountId
to identify the user.Permissions required: 'Confluence Administrator' global permission if specifying a user, otherwise permission to access the Confluence site ('Can use' global permission).
read:confluence-content.summary
read:watcher:confluence
Connect app scope required: READ
string
Requiredstring
string
string
Returned if the requested watch status is returned.
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().requestConfluence(route`/wiki/rest/api/user/watch/space/{spaceKey}`, {
headers: {
'Accept': 'application/json'
}
});
console.log(`Response: ${response.status} ${response.statusText}`);
console.log(await response.json());
1
2
3
{
"watching": true
}
Adds a user as a watcher to a space. Choose the user by doing one of the following:
accountId
to identify the user.Note, you must add the X-Atlassian-Token: no-check
header when making a
request, as this operation has XSRF protection.
Permissions required: 'Confluence Administrator' global permission if specifying a user, otherwise permission to access the Confluence site ('Can use' global permission).
write:confluence-content
write:watcher:confluence
Connect app scope required: WRITE
string
Requiredstring
string
string
string
RequiredReturned if the watcher was successfully created. No response body is returned.
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().requestConfluence(route`/wiki/rest/api/user/watch/space/{spaceKey}`, {
method: 'POST'
});
console.log(`Response: ${response.status} ${response.statusText}`);
console.log(await response.text());
Removes a user as a watcher from a space. Choose the user by doing one of the following:
accountId
to identify the user.Permissions required: 'Confluence Administrator' global permission if specifying a user, otherwise permission to access the Confluence site ('Can use' global permission).
write:confluence-content
write:watcher:confluence
Connect app scope required: WRITE
string
Requiredstring
string
string
Returned if the watcher was successfully deleted. No response body is returned.
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().requestConfluence(route`/wiki/rest/api/user/watch/space/{spaceKey}`, {
method: 'DELETE'
});
console.log(`Response: ${response.status} ${response.statusText}`);
console.log(await response.text());
Rate this page: