Confluence Cloud Developer

Confluence Cloud Developer

Rate this page:

Content properties

Get content properties

GET /wiki/rest/api/content/{id}/property

Returns the properties for a piece of content. For more information about content properties, see Confluence entity properties.

Permissions required: 'View' permission for the space, and permission to view the content if it is a page.

App scope requiredREAD

OAuth scopes required
read:confluence-props

Request

Path parameters
id Required

string

The ID of the content to be queried for its properties.

Query parameters
expand

Array<string>

A multi-value parameter indicating which properties of the content to expand. By default, the version object is expanded.

  • content returns the content that the property is stored against.
  • version returns information about the version of the property, such as the version number, when it was created, etc.
Style: form

Valid values: content, version

start

integer

The starting index of the returned properties.

Default: 0, Minimum: 0, Format: int32
limit

integer

The maximum number of properties to return per page. Note, this may be restricted by fixed system limits.

Default: 10, Minimum: 0, Format: int32

Example

1
2
3
curl --request GET \
  --url 'https://your-domain.atlassian.net/wiki/rest/api/content/{id}/property' \
  --header 'Accept: application/json'

Responses

Returned if the requested properties are returned.

Content typeValue
application/json

ContentPropertyArray

Create content property

POST /wiki/rest/api/content/{id}/property

Creates a property for an existing piece of content. For more information about content properties, see Confluence entity properties.

This is the same as Create content property for key except that the key is specified in the request body instead of as a path parameter.

Content properties can also be added when creating a new piece of content by including them in the metadata.properties of the request.

Permissions required: Permission to update the content.

App scope requiredWRITE

OAuth scopes required
write:confluence-props

Request

Path parameters
id Required

string

The ID of the content to add the property to.

Body parameters
key Required

string

The key of the new property.

Max length: 255
value Required

PropertyValue

The value of the property. This can be empty or a complex object. For example,

1
2
3
4
5
"value": {
  "example1": "value",
  "example2": true,
  "example3": 123
}

Example

1
2
3
4
5
6
7
8
curl --request POST \
  --url 'https://your-domain.atlassian.net/wiki/rest/api/content/{id}/property' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data '{
  "key": "<string>",
  "value": {}
}'

Responses

Returned if the content property is created.

Content typeValue
application/json

ContentProperty

Get content property

GET /wiki/rest/api/content/{id}/property/{key}

Returns a content property for a piece of content. For more information, see Confluence entity properties.

Permissions required: 'View' permission for the space, and permission to view the content if it is a page.

App scope requiredREAD

OAuth scopes required
read:confluence-props

Request

Path parameters
id Required

string

The ID of the content to be queried for the property.

key Required

string

The key of the content property.

Query parameters
expand

Array<string>

A multi-value parameter indicating which properties of the content to expand. By default, the version object is expanded.

  • content returns the content that the property is stored against.
  • version returns information about the version of the property, such as the version number, when it was created, etc.
Style: form

Valid values: content, version

Example

1
2
3
curl --request GET \
  --url 'https://your-domain.atlassian.net/wiki/rest/api/content/{id}/property/{key}' \
  --header 'Accept: application/json'

Responses

Returned if the content property is returned.

Content typeValue
application/json

ContentProperty

Update content property

PUT /wiki/rest/api/content/{id}/property/{key}

Updates an existing content property. This method will also create a new property for a piece of content, if the property key does not exist and the property version is 1. For more information about content properties, see Confluence entity properties.

Permissions required: Permission to update the content.

App scope requiredWRITE

OAuth scopes required
write:confluence-props

Request

Path parameters
id Required

string

The ID of the content that the property belongs to.

key Required

string

The key of the property.

Body parameters
value Required

object

The value of the content property. This can be empty or a complex object.

version Required

object

The version number of the property.

Example

1
2
3
4
5
6
7
8
9
10
11
curl --request PUT \
  --url 'https://your-domain.atlassian.net/wiki/rest/api/content/{id}/property/{key}' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data '{
  "value": {},
  "version": {
    "number": 201,
    "minorEdit": true
  }
}'

Responses

Returned if the content property is created.

Content typeValue
application/json

ContentProperty

Create content property for key

POST /wiki/rest/api/content/{id}/property/{key}

Creates a property for an existing piece of content. For more information about content properties, see Confluence entity properties.

This is the same as Create content property except that the key is specified as a path parameter instead of in the request body.

Content properties can also be added when creating a new piece of content by including them in the metadata.properties of the request.

Permissions required: Permission to update the content.

App scope requiredWRITE

OAuth scopes required
write:confluence-props

Request

Path parameters
id Required

string

The ID of the content to add the property to.

key Required

string

The key of the content property. Required.

Body parameters
value Required

PropertyValue

The value of the property. This can be empty or a complex object. For example,

1
2
3
4
5
"value": {
  "example1": "value",
  "example2": true,
  "example3": 123
}

Example

1
2
3
4
5
6
7
curl --request POST \
  --url 'https://your-domain.atlassian.net/wiki/rest/api/content/{id}/property/{key}' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data '{
  "value": {}
}'

Responses

Returned if the content property is created.

Content typeValue
application/json

ContentProperty

Delete content property

DELETE /wiki/rest/api/content/{id}/property/{key}

Deletes a content property. For more information about content properties, see Confluence entity properties.

Permissions required: Permission to update the content.

App scope requiredDELETE

OAuth scopes required
write:confluence-props

Request

Path parameters
id Required

string

The ID of the content that the property belongs to.

key Required

string

The key of the property.

Example

1
2
curl --request DELETE \
  --url 'https://your-domain.atlassian.net/wiki/rest/api/content/{id}/property/{key}'

Responses

Returned if the content property is deleted.

Rate this page: