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.
read:confluence-props
read:content-details:confluence
Connect app scope required: READ
string
Requiredarray<string>
array<string>
integer
integer
Returned if the requested properties are returned.
1
2
3
4
5
6
7
8
9
10
11
12
// This sample uses Atlassian Forge
// https://developer.atlassian.com/platform/forge/
import api, { route } from "@forge/api";
const response = await api.asUser().requestConfluence(route`/wiki/rest/api/content/{id}/property`, {
headers: {
'Accept': 'application/json'
}
});
console.log(`Response: ${response.status} ${response.statusText}`);
console.log(await response.json());
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
{
"results": [
{
"id": "<string>",
"key": "<string>",
"value": [
"<string>"
],
"version": {
"when": "<string>",
"message": "<string>",
"number": 2154,
"minorEdit": true,
"contentTypeModified": true
},
"_links": {},
"_expandable": {
"content": "<string>",
"additionalProperties": "<string>"
}
}
],
"start": 2154,
"limit": 2154,
"size": 2154,
"_links": {}
}
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.
write:confluence-props
read:content.property:confluence
, write:content.property:confluence
Connect app scope required: WRITE
string
RequiredThe content property to be created.
string
RequiredoneOf [array<string>, boolean, object, string]
Requiredany
Returned if the content property is created.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// This sample uses Atlassian Forge
// https://developer.atlassian.com/platform/forge/
import api, { route } from "@forge/api";
var bodyData = `{
"key": "<string>",
"value": [
"<string>"
]
}`;
const response = await api.asUser().requestConfluence(route`/wiki/rest/api/content/{id}/property`, {
method: 'POST',
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json'
},
body: bodyData
});
console.log(`Response: ${response.status} ${response.statusText}`);
console.log(await response.json());
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
{
"id": "<string>",
"key": "<string>",
"value": [
"<string>"
],
"version": {
"when": "<string>",
"message": "<string>",
"number": 2154,
"minorEdit": true,
"contentTypeModified": true
},
"_links": {},
"_expandable": {
"content": "<string>",
"additionalProperties": "<string>"
}
}
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.
read:confluence-props
read:content-details:confluence
Connect app scope required: READ
string
Requiredstring
Requiredarray<string>
array<string>
Returned if the content property is returned.
1
2
3
4
5
6
7
8
9
10
11
12
// This sample uses Atlassian Forge
// https://developer.atlassian.com/platform/forge/
import api, { route } from "@forge/api";
const response = await api.asUser().requestConfluence(route`/wiki/rest/api/content/{id}/property/{key}`, {
headers: {
'Accept': 'application/json'
}
});
console.log(`Response: ${response.status} ${response.statusText}`);
console.log(await response.json());
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
{
"id": "<string>",
"key": "<string>",
"value": [
"<string>"
],
"version": {
"when": "<string>",
"message": "<string>",
"number": 2154,
"minorEdit": true,
"contentTypeModified": true
},
"_links": {},
"_expandable": {
"content": "<string>",
"additionalProperties": "<string>"
}
}
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.
write:confluence-props
read:content.property:confluence
, write:content.property:confluence
Connect app scope required: WRITE
string
Requiredstring
RequiredThe content property being updated.
oneOf [array<string>, boolean, object, string]
Requiredobject
Requiredany
Returned if the content property is created.
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
// This sample uses Atlassian Forge
// https://developer.atlassian.com/platform/forge/
import api, { route } from "@forge/api";
var bodyData = `{
"value": [
"<string>"
],
"version": {
"number": 2154,
"minorEdit": true
}
}`;
const response = await api.asUser().requestConfluence(route`/wiki/rest/api/content/{id}/property/{key}`, {
method: 'PUT',
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json'
},
body: bodyData
});
console.log(`Response: ${response.status} ${response.statusText}`);
console.log(await response.json());
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
{
"id": "<string>",
"key": "<string>",
"value": [
"<string>"
],
"version": {
"when": "<string>",
"message": "<string>",
"number": 2154,
"minorEdit": true,
"contentTypeModified": true
},
"_links": {},
"_expandable": {
"content": "<string>",
"additionalProperties": "<string>"
}
}
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.
write:confluence-props
read:content.property:confluence
, write:content.property:confluence
Connect app scope required: WRITE
string
Requiredstring
RequiredThe content property to be created.
oneOf [array<string>, boolean, object, string]
Requiredany
Returned if the content property is created.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// This sample uses Atlassian Forge
// https://developer.atlassian.com/platform/forge/
import api, { route } from "@forge/api";
var bodyData = `{
"value": [
"<string>"
]
}`;
const response = await api.asUser().requestConfluence(route`/wiki/rest/api/content/{id}/property/{key}`, {
method: 'POST',
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json'
},
body: bodyData
});
console.log(`Response: ${response.status} ${response.statusText}`);
console.log(await response.json());
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
{
"id": "<string>",
"key": "<string>",
"value": [
"<string>"
],
"version": {
"when": "<string>",
"message": "<string>",
"number": 2154,
"minorEdit": true,
"contentTypeModified": true
},
"_links": {},
"_expandable": {
"content": "<string>",
"additionalProperties": "<string>"
}
}
Deletes a content property. For more information about content properties, see Confluence entity properties.
Permissions required: Permission to update the content.
write:confluence-props
write:content.property:confluence
Connect app scope required: WRITE
string
Requiredstring
RequiredReturned if the content property is deleted.
1
2
3
4
5
6
7
8
9
10
// This sample uses Atlassian Forge
// https://developer.atlassian.com/platform/forge/
import api, { route } from "@forge/api";
const response = await api.asUser().requestConfluence(route`/wiki/rest/api/content/{id}/property/{key}`, {
method: 'DELETE'
});
console.log(`Response: ${response.status} ${response.statusText}`);
console.log(await response.text());
Rate this page: