Skip to content
atlassian-dc-mcp
Esc
↑↓navigate↵open⌘Jpreview

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

POST/rest/api/user/watch/space/{spaceKey}
Path parameters
spaceKeystringrequired
Query parameters
contentTypestring

the optional content type to delete the watcher for.

keystring

userKey of the user to create the new watcher for.

usernamestring

userName of the user to create the new watcher for.

Responses
200

Returned if the watcher was successfully created

watcherUser
Show properties
profilePictureIcon
Show properties
pathstring
widthinteger<int32>
heightinteger<int32>
isDefaultboolean
displayNamestring
usernamestring
userKeystring
spaceSpace
Show properties
idinteger<int64>
keystring
namestring
statusstring
iconReferenceIcon
Show properties
expandedboolean
idPropertiesobject
descriptionobject
homepageReferenceContent
Show properties
expandedboolean
idPropertiesobject
linksobject
typestring
metadataobject
retentionPolicyReferenceSpaceRetentionPolicy
Show properties
expandedboolean
idPropertiesobject
contentTypesstring[]
404

Returned if no content exists for the specified space key or the calling user does not have permission to perform the operation

statusCodeinteger<int32>
dataValidationResult
Show properties
authorizedboolean
validboolean
errorsobject
successfulboolean
allowedInReadOnlyModeboolean
messagestring
reasonstring
Try it
Server
Parameters
Request
curl -X POST 'http://example.com:7990/confluence/rest/api/user/watch/space/string' \
  -H 'Accept: application/json'
Response
{
  "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"
  ]
}

Was this page helpful?