GET

Get information about content watcher

Get information about whether a user is watching a specified content. User is optional. If not specified, currently logged-in user will be used. Otherwise, it can be specified by either user key or username. When a user is specified and is different from the logged-in user, the logged-in user needs to be a Confluence administrator.

Example request URI(s):

http://example.com/confluence/rest/api/user/watch/content/131213 http://example.com/confluence/rest/api/user/watch/content/131213?username=jblogs http://example.com/confluence/rest/api/user/watch/content/131213?key=ff8080815a58e24c015a58e263710000

Request

Path parameters

contentId

string

Required

Query parameters

key

string

username

string

Responses

Returns a JSON representation containing the watching state.

application/json

any

GET/rest/api/user/watch/content/{contentId}
1 2 3 curl --request GET \ --url 'http://{baseurl}/confluence/rest/api/user/watch/content/{contentId}' \ --header 'Accept: application/json'
200Response
1 true
POST

Add content watcher

Create a new watcher for the given user and content id. User is optional. If not specified, currently logged-in user will be used. Otherwise, it can be specified by either user key or username. When a user is specified and is different from the logged-in user, the logged-in user needs to be a Confluence administrator.

Example request URI(s):

http://example.com/confluence/rest/api/user/watch/content/131213 http://example.com/confluence/rest/api/user/watch/content/131213?username=jblogs http://example.com/confluence/rest/api/user/watch/content/131213?key=ff8080815a58e24c015a58e263710000

Request

Path parameters

contentId

string

Required

Query parameters

key

string

username

string

Responses

Returned if the watcher was successfully created.

application/json

ContentWatch
POST/rest/api/user/watch/content/{contentId}
1 2 3 curl --request POST \ --url 'http://{baseurl}/confluence/rest/api/user/watch/content/{contentId}' \ --header 'Accept: application/json'
200Response
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 { "content": { "id": "123456", "type": "page", "status": "current", "title": "My Page", "links": {}, "space": { "id": 123456, "key": "TEST", "name": "Test Space", "status": "current", "icon": {}, "description": {}, "homepage": {}, "links": {}, "type": "global", "creator": {}, "creationDate": "2024-01-01T00:00:00Z", "lastModifier": {}, "lastModificationDate": "2024-01-01T00:00:00Z", "metadata": { "labels": [ "label1", "label2" ] }, "retentionPolicy": {}, "permissions": {} }, "history": { "previousVersion": {}, "nextVersion": {}, "lastUpdated": {}, "latest": true, "createdBy": {}, "createdDate": "2020-01-01T00:00:00Z", "contributors": {}, "contentParentRef": {}, "lastUpdatedRef": {}, "nextVersionRef": {}, "previousVersionRef": {} }, "version": { "by": {}, "when": "2020-01-01T00:00:00Z", "message": "A message", "number": 1, "minorEdit": true, "hidden": true, "syncRev": "123456", "content": {}, "contentRef": {} }, "ancestors": [], "position": 1, "operations": [ { "operation": "read", "targetType": "page" } ], "children": {}, "descendants": {}, "body": {}, "metadata": { "key": "value" }, "extensions": { "key": "value" }, "restrictions": { "use": { "operation": "use", "restrictions": [] } }, "relevantViewRestrictions": { "idProperties": {}, "expanded": true }, "versionRef": { "idProperties": {}, "expanded": true }, "containerRef": { "idProperties": {}, "expanded": true }, "historyRef": { "idProperties": {}, "expanded": true }, "spaceRef": { "idProperties": {}, "expanded": true } } }
DEL

Remove content watcher

Delete an existing watcher for the given user and content id. User is optional. If not specified, currently logged-in user will be used. Otherwise, it can be specified by either user key or username. When a user is specified and is different from the logged-in user, the logged-in user needs to be a Confluence administrator.

Example request URI(s):

http://example.com/confluence/rest/api/user/watch/content/131213 http://example.com/confluence/rest/api/user/watch/content/131213?username=jblogs http://example.com/confluence/rest/api/user/watch/content/131213?key=ff8080815a58e24c015a58e263710000

Request

Path parameters

contentId

string

Required

Query parameters

key

string

username

string

Responses

Returned if the watcher was successfully deleted

DEL/rest/api/user/watch/content/{contentId}
1 2 curl --request DELETE \ --url 'http://{baseurl}/confluence/rest/api/user/watch/content/{contentId}'
GET

Get information about space watcher

Get information about whether a user is watching a specified space. User is optional. If not specified, currently logged-in user will be used. Otherwise, it can be specified by either user key or username. When a user is specified and is different from the logged-in user, the logged-in user needs to be a Confluence administrator.

Example request URI(s):

http://example.com/confluence/rest/api/user/watch/space/SPACEKEY http://example.com/confluence/rest/api/user/watch/space/SPACEKEY?username=jblogs http://example.com/confluence/rest/api/user/watch/space/SPACEKEY?key=ff8080815a58e24c015a58e263710000 http://example.com/confluence/rest/api/user/watch/space/SPACEKEY?contentType=blostpost

Request

Path parameters

spaceKey

string

Required

Query parameters

contentType

string

key

string

username

string

Responses

Returns a JSON representation containing the watching state.

application/json

any

GET/rest/api/user/watch/space/{spaceKey}
1 2 3 curl --request GET \ --url 'http://{baseurl}/confluence/rest/api/user/watch/space/{spaceKey}' \ --header 'Accept: application/json'
200Response
1 true
POST

Add space watcher

Create a new watcher for the given user and space key. User is optional. If not specified, currently logged-in user will be used. Otherwise, it can be specified by either user key or username. When a user is specified and is different from the logged-in user, the logged-in user needs to be a Confluence administrator.

Example request URI(s):

http://example.com/confluence/rest/api/user/watch/space/SPACEKEY http://example.com/confluence/rest/api/user/watch/space/SPACEKEY?username=jblogs http://example.com/confluence/rest/api/user/watch/space/SPACEKEY?key=ff8080815a58e24c015a58e263710000 http://example.com/confluence/rest/api/user/watch/space/SPACEKEY?contentType=blogpost

Request

Path parameters

spaceKey

string

Required

Query parameters

contentType

string

key

string

username

string

Responses

Returned if the watcher was successfully created

application/json

SpaceWatch
POST/rest/api/user/watch/space/{spaceKey}
1 2 3 curl --request POST \ --url 'http://{baseurl}/confluence/rest/api/user/watch/space/{spaceKey}' \ --header 'Accept: application/json'
200Response
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 { "space": { "id": 123456, "key": "TEST", "name": "Test Space", "status": "current", "icon": { "idProperties": {}, "expanded": true }, "description": {}, "homepage": { "idProperties": {}, "expanded": true }, "links": {}, "type": "global", "creator": { "profilePicture": {}, "displayName": "Joe Smith", "type": "<string>" }, "creationDate": "2024-01-01T00:00:00Z", "lastModifier": { "profilePicture": {}, "displayName": "Joe Smith", "type": "<string>" }, "lastModificationDate": "2024-01-01T00:00:00Z", "metadata": { "labels": [ "label1", "label2" ] }, "retentionPolicy": { "idProperties": {}, "expanded": true }, "permissions": { "idProperties": {}, "expanded": true } }, "contentTypes": [ "<string>" ] }
DEL

Remove space watcher

Delete an existing watcher for the given user and space key. User is optional. If not specified, currently logged-in user will be used. Otherwise, it can be specified by either user key or username. When a user is specified and is different from the logged-in user, the logged-in user needs to be a Confluence administrator.

Example request URI(s):

http://example.com/confluence/rest/api/user/watch/space/SPACEKEY http://example.com/confluence/rest/api/user/watch/space/SPACEKEY?username=jblogs http://example.com/confluence/rest/api/user/watch/space/SPACEKEY?key=ff8080815a58e24c015a58e263710000 http://example.com/confluence/rest/api/user/watch/space/SPACEKEY?contentType=blogpost

Request

Path parameters

spaceKey

string

Required

Query parameters

contentType

string

key

string

username

string

Responses

Returned if the watcher was successfully deleted

DEL/rest/api/user/watch/space/{spaceKey}
1 2 curl --request DELETE \ --url 'http://{baseurl}/confluence/rest/api/user/watch/space/{spaceKey}'

Rate this page: