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

Update content property

Updates a content property. The body contains the representation of the content property. Must include the property id, and the new version number. Attempts to create a new content property if the given version number is 1

PUT/rest/api/content/{id}/property/{key}
Path parameters
idstringrequired

the id of the content

keystringrequired

the key of the content property. Required.

Query parameters
expandstring

a comma separated list of properties to expand on the content properties. Default value: <code>version</code>.

Request body
application/json

the content property being updated

keystring
valueJsonString
Show properties
valuestring
versionVersion
Show properties
byPerson
Show properties
profilePictureIcon
Show properties
pathstring
widthinteger<int32>
heightinteger<int32>
isDefaultboolean
displayNamestring
typestring
whenstring<date-time>
messagestring
numberinteger<int32>
minorEditboolean
hiddenboolean
syncRevstring
contentReferenceContent
Show properties
expandedboolean
idPropertiesobject
contentRefReferenceContent
Show properties
expandedboolean
idPropertiesobject
idstring
contentContent
Show properties
idstring
typestring
statusstring
titlestring
linksobject
spaceSpace
Show properties
idinteger<int64>
keystring
namestring
statusstring
iconReferenceIcon
Show properties
expandedboolean
idPropertiesobject
descriptionobject
homepageReferenceContent
linksobject
typestring
metadataobject
retentionPolicyReferenceSpaceRetentionPolicy
Show properties
expandedboolean
idPropertiesobject
historyHistory
Show properties
previousVersionReferenceVersion
nextVersionReferenceVersion
lastUpdatedReferenceVersion
latestboolean
createdByPerson
createdDatestring<date-time>
contributorsReferenceContributors
Show properties
expandedboolean
idPropertiesobject
lastUpdatedRefReferenceVersion
nextVersionRefReferenceVersion
previousVersionRefReferenceVersion
contentParentRefReferenceContent
versionVersion
Show properties
byPerson
whenstring<date-time>
messagestring
numberinteger<int32>
minorEditboolean
hiddenboolean
syncRevstring
contentReferenceContent
contentRefReferenceContent
ancestorsContent[]
Show properties
Array of Content
Circular reference to Content.
positioninteger<int32>
operationsOperationCheckResult[]
Show properties
Array of OperationCheckResult
operationstring
targetTypestring
childrenobject
descendantsobject
containerContainer
bodyobject
metadataobject
extensionsobject
restrictionsobject
historyRefReferenceHistory
Show properties
expandedboolean
idPropertiesobject
spaceRefReferenceSpace
Show properties
expandedboolean
idPropertiesobject
containerRefReferenceContainer
Show properties
expandedboolean
idPropertiesobject
versionRefReferenceVersion
Show properties
expandedboolean
idPropertiesobject
contentRefReferenceContent
Show properties
expandedboolean
idPropertiesobject
Responses
200

returns a JSON representation of the content property, or a 404 NOT FOUND if there is no content with the given id, or no property with the given key, or if the user is not permitted.

keystring
valueJsonString
Show properties
valuestring
versionVersion
Show properties
byPerson
Show properties
profilePictureIcon
Show properties
pathstring
widthinteger<int32>
heightinteger<int32>
isDefaultboolean
displayNamestring
typestring
whenstring<date-time>
messagestring
numberinteger<int32>
minorEditboolean
hiddenboolean
syncRevstring
contentReferenceContent
Show properties
expandedboolean
idPropertiesobject
contentRefReferenceContent
Show properties
expandedboolean
idPropertiesobject
idstring
contentContent
Show properties
idstring
typestring
statusstring
titlestring
linksobject
spaceSpace
Show properties
idinteger<int64>
keystring
namestring
statusstring
iconReferenceIcon
Show properties
expandedboolean
idPropertiesobject
descriptionobject
homepageReferenceContent
linksobject
typestring
metadataobject
retentionPolicyReferenceSpaceRetentionPolicy
Show properties
expandedboolean
idPropertiesobject
historyHistory
Show properties
previousVersionReferenceVersion
nextVersionReferenceVersion
lastUpdatedReferenceVersion
latestboolean
createdByPerson
createdDatestring<date-time>
contributorsReferenceContributors
Show properties
expandedboolean
idPropertiesobject
lastUpdatedRefReferenceVersion
nextVersionRefReferenceVersion
previousVersionRefReferenceVersion
contentParentRefReferenceContent
versionVersion
Show properties
byPerson
whenstring<date-time>
messagestring
numberinteger<int32>
minorEditboolean
hiddenboolean
syncRevstring
contentReferenceContent
contentRefReferenceContent
ancestorsContent[]
Show properties
Array of Content
Circular reference to Content.
positioninteger<int32>
operationsOperationCheckResult[]
Show properties
Array of OperationCheckResult
operationstring
targetTypestring
childrenobject
descendantsobject
containerContainer
bodyobject
metadataobject
extensionsobject
restrictionsobject
historyRefReferenceHistory
Show properties
expandedboolean
idPropertiesobject
spaceRefReferenceSpace
Show properties
expandedboolean
idPropertiesobject
containerRefReferenceContainer
Show properties
expandedboolean
idPropertiesobject
versionRefReferenceVersion
Show properties
expandedboolean
idPropertiesobject
contentRefReferenceContent
Show properties
expandedboolean
idPropertiesobject
400

Returned if the given property has a different ContentId to the one in the path, or if the property has a different key to the one in the path, or the value is missing, or the value is too long.

statusCodeinteger<int32>
dataValidationResult
Show properties
authorizedboolean
validboolean
errorsobject
successfulboolean
allowedInReadOnlyModeboolean
messagestring
reasonstring
403

Returned if the user does not have permission to edit the content with the given ContentId.

statusCodeinteger<int32>
dataValidationResult
Show properties
authorizedboolean
validboolean
errorsobject
successfulboolean
allowedInReadOnlyModeboolean
messagestring
reasonstring
404

eturned if there is no content with the given id, or no property with the given key, or if the calling user does not have permission to view the content.

statusCodeinteger<int32>
dataValidationResult
Show properties
authorizedboolean
validboolean
errorsobject
successfulboolean
allowedInReadOnlyModeboolean
messagestring
reasonstring
409

Returned if the given version is does not match the expected target version of the updated property.

statusCodeinteger<int32>
dataValidationResult
Show properties
authorizedboolean
validboolean
errorsobject
successfulboolean
allowedInReadOnlyModeboolean
messagestring
reasonstring
413

Returned if the value is too long.

statusCodeinteger<int32>
dataValidationResult
Show properties
authorizedboolean
validboolean
errorsobject
successfulboolean
allowedInReadOnlyModeboolean
messagestring
reasonstring
Try it
Server
Parameters
Bodyapplication/json
Request
curl -X PUT 'http://example.com:7990/confluence/rest/api/content/string/property/string' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "key": "string",
  "value": {
    "value": "string"
  },
  "version": {
    "by": {
      "profilePicture": {
        "path": "http://www.example.com/path/to/image.png",
        "width": 16,
        "height": 16,
        "isDefault": true
      },
      "displayName": "Joe Smith",
      "type": "string"
    },
    "when": "2020-01-01T00:00:00Z",
    "message": "A message",
    "number": 1,
    "minorEdit": true,
    "hidden": true,
    "syncRev": "123456",
    "content": {
      "expanded": true,
      "idProperties": {}
    },
    "contentRef": {
      "expanded": true,
      "idProperties": {}
    }
  },
  "id": "string",
  "content": {
    "id": "123456",
    "type": "page",
    "status": "current",
    "title": "My Page",
    "links": {},
    "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": {}
      }
    },
    "history": {
      "previousVersion": {
        "expanded": true,
        "idProperties": {}
      },
      "nextVersion": {
        "expanded": true,
        "idProperties": {}
      },
      "lastUpdated": {
        "expanded": true,
        "idProperties": {}
      },
      "latest": true,
      "createdBy": {
        "profilePicture": {
          "path": "http://www.example.com/path/to/image.png",
          "width": 16,
          "height": 16,
          "isDefault": true
        },
        "displayName": "Joe Smith",
        "type": "string"
      },
      "createdDate": "2020-01-01T00:00:00Z",
      "contributors": {
        "expanded": true,
        "idProperties": {}
      },
      "lastUpdatedRef": {
        "expanded": true,
        "idProperties": {}
      },
      "nextVersionRef": {
        "expanded": true,
        "idProperties": {}
      },
      "previousVersionRef": {
        "expanded": true,
        "idProperties": {}
      },
      "contentParentRef": {
        "expanded": true,
        "idProperties": {}
      }
    },
    "version": {
      "by": {
        "profilePicture": {
          "path": "http://www.example.com/path/to/image.png",
          "width": 16,
          "height": 16,
          "isDefault": true
        },
        "displayName": "Joe Smith",
        "type": "string"
      },
      "when": "2020-01-01T00:00:00Z",
      "message": "A message",
      "number": 1,
      "minorEdit": true,
      "hidden": true,
      "syncRev": "123456",
      "content": {
        "expanded": true,
        "idProperties": {}
      },
      "contentRef": {
        "expanded": true,
        "idProperties": {}
      }
    },
    "ancestors": [
      {}
    ],
    "position": 1,
    "operations": [
      {
        "operation": "read",
        "targetType": "page"
      }
    ],
    "children": {},
    "descendants": {},
    "container": null,
    "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": {}
    }
  },
  "contentRef": {
    "expanded": true,
    "idProperties": {}
  }
}'
Response
{
  "key": "string",
  "value": {
    "value": "string"
  },
  "version": {
    "by": {
      "profilePicture": {
        "path": "http://www.example.com/path/to/image.png",
        "width": 16,
        "height": 16,
        "isDefault": true
      },
      "displayName": "Joe Smith",
      "type": "string"
    },
    "when": "2020-01-01T00:00:00Z",
    "message": "A message",
    "number": 1,
    "minorEdit": true,
    "hidden": true,
    "syncRev": "123456",
    "content": {
      "expanded": true,
      "idProperties": {}
    },
    "contentRef": {
      "expanded": true,
      "idProperties": {}
    }
  },
  "id": "string",
  "content": {
    "id": "123456",
    "type": "page",
    "status": "current",
    "title": "My Page",
    "links": {},
    "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": {}
      }
    },
    "history": {
      "previousVersion": {
        "expanded": true,
        "idProperties": {}
      },
      "nextVersion": {
        "expanded": true,
        "idProperties": {}
      },
      "lastUpdated": {
        "expanded": true,
        "idProperties": {}
      },
      "latest": true,
      "createdBy": {
        "profilePicture": {
          "path": "http://www.example.com/path/to/image.png",
          "width": 16,
          "height": 16,
          "isDefault": true
        },
        "displayName": "Joe Smith",
        "type": "string"
      },
      "createdDate": "2020-01-01T00:00:00Z",
      "contributors": {
        "expanded": true,
        "idProperties": {}
      },
      "lastUpdatedRef": {
        "expanded": true,
        "idProperties": {}
      },
      "nextVersionRef": {
        "expanded": true,
        "idProperties": {}
      },
      "previousVersionRef": {
        "expanded": true,
        "idProperties": {}
      },
      "contentParentRef": {
        "expanded": true,
        "idProperties": {}
      }
    },
    "version": {
      "by": {
        "profilePicture": {
          "path": "http://www.example.com/path/to/image.png",
          "width": 16,
          "height": 16,
          "isDefault": true
        },
        "displayName": "Joe Smith",
        "type": "string"
      },
      "when": "2020-01-01T00:00:00Z",
      "message": "A message",
      "number": 1,
      "minorEdit": true,
      "hidden": true,
      "syncRev": "123456",
      "content": {
        "expanded": true,
        "idProperties": {}
      },
      "contentRef": {
        "expanded": true,
        "idProperties": {}
      }
    },
    "ancestors": [
      {}
    ],
    "position": 1,
    "operations": [
      {
        "operation": "read",
        "targetType": "page"
      }
    ],
    "children": {},
    "descendants": {},
    "container": null,
    "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": {}
    }
  },
  "contentRef": {
    "expanded": true,
    "idProperties": {}
  }
}

Was this page helpful?