• Access Mode
  • Admin Group
  • Admin User
  • Attachments
  • Backup and Restore
  • Child Content
  • Content Blueprint
  • Content Body
  • Content Descendant
  • Content Labels
  • Content Property
  • Content Resource
  • Content Restrictions
  • Content Version
  • Content Watchers
  • Group
  • Long Task
  • Space
  • Space Label
  • Space Property
  • Space Watchers
  • User
  • User Group
  • User Watch
  • Webhooks
  • Other operations
Server
Confluence Data Center / / REST API

User Watch

Postman Collection
OpenAPI
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

Forge and OAuth2 apps cannot access this REST resource.

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

Forge and OAuth2 apps cannot access this REST resource.

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 100 101 102 103 { "watcher": { "profilePicture": { "path": "http://www.example.com/path/to/image.png", "width": 16, "height": 16, "isDefault": true }, "displayName": "Joe Smith", "username": "user1", "userKey": "userkey[admin]" }, "content": { "id": "123456", "type": "page", "status": "current", "title": "My Page", "links": { "webui": "https://www.example.com/display/SPACEKEY/My+Page" }, "space": { "id": 123456, "key": "TEST", "name": "Test Space", "status": "current", "icon": {}, "description": {}, "homepage": {}, "links": {}, "type": "global", "metadata": { "labels": [ "label1", "label2" ] }, "retentionPolicy": {} }, "history": { "previousVersion": {}, "nextVersion": {}, "lastUpdated": {}, "latest": true, "createdBy": {}, "createdDate": "2020-01-01T00:00:00Z", "contributors": {}, "lastUpdatedRef": {}, "nextVersionRef": {}, "previousVersionRef": {}, "contentParentRef": {} }, "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": [] } }, "historyRef": { "expanded": true, "idProperties": {} }, "spaceRef": { "expanded": true, "idProperties": {} }, "containerRef": { "expanded": true, "idProperties": {} }, "versionRef": { "expanded": true, "idProperties": {} } } }
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

Forge and OAuth2 apps cannot access this REST resource.

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

Forge and OAuth2 apps cannot access this REST resource.

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

Forge and OAuth2 apps cannot access this REST resource.

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 { "watcher": { "profilePicture": { "path": "http://www.example.com/path/to/image.png", "width": 16, "height": 16, "isDefault": true }, "displayName": "Joe Smith", "username": "user1", "userKey": "userkey[admin]" }, "space": { "id": 123456, "key": "TEST", "name": "Test Space", "status": "current", "icon": { "expanded": true, "idProperties": {} }, "description": {}, "homepage": { "expanded": true, "idProperties": {} }, "links": {}, "type": "global", "metadata": { "labels": [ "label1", "label2" ] }, "retentionPolicy": { "expanded": true, "idProperties": {} } }, "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

Forge and OAuth2 apps cannot access this REST resource.

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: