Rate this page:
GET /wiki/rest/api/space/{spaceKey}/property
Returns all properties for the given space. Space properties are a key-value storage associated with a space.
Permissions required: ‘View’ permission for the space.
Connect app scope required: READ
read:content-details:confluence
string
The key of the space to be queried for its properties.
Array<string>
A multi-value parameter indicating which properties of the space
property to expand. By default, the version
object is expanded.
version
returns information about the version of the content.space
returns the space that the properties are in.form
Valid values: version
, space
integer
The starting index of the returned objects.
0
, Minimum: 0
, Format: int32
integer
The maximum number of properties to return per page. Note, this may be restricted by fixed system limits.
10
, Minimum: 0
, Format: int32
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.asApp().requestConfluence(route`/wiki/rest/api/space/{spaceKey}/property`, {
headers: {
'Accept': 'application/json'
}
});
console.log(`Response: ${response.status} ${response.statusText}`);
console.log(await response.json());
Returned if the requested space properties are returned.
Content type | Value |
---|---|
application/json |
POST /wiki/rest/api/space/{spaceKey}/property
Creates a new space property.
Permissions required: ‘Admin’ permission for the space.
Connect app scope required: WRITE
read:space.property:confluence
, write:space.property:confluence
string
The key of the space that the property will be created in.
string
The key of the new property.
oneOf [Array<string>, boolean, object, string]
The value of the property. This can be empty or a complex object. 64KB Size Limit For example,
1 2"value": { "example1": "value", "example2": true, "example3": 123, "example4": ["value1", "value2"], }
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 = `{
"key": "<string>",
"value": [
"<string>"
],
"space": {
"key": "<string>"
}
}`;
const response = await api.asApp().requestConfluence(route`/wiki/rest/api/space/{spaceKey}/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());
Returned if the space property is created.
Content type | Value |
---|---|
application/json |
GET /wiki/rest/api/space/{spaceKey}/property/{key}
Returns a space property.
Permissions required: ‘View’ permission for the space.
Connect app scope required: READ
read:content-details:confluence
string
The key of the space that the property is in.
string
The key of the space property.
Array<string>
A multi-value parameter indicating which properties of the space
property to expand. By default, the version
object is expanded.
version
returns information about the version of the content.space
returns the space that the properties are in.form
Valid values: version
, space
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.asApp().requestConfluence(route`/wiki/rest/api/space/{spaceKey}/property/{key}`, {
headers: {
'Accept': 'application/json'
}
});
console.log(`Response: ${response.status} ${response.statusText}`);
console.log(await response.json());
Returned if the requested space property is returned.
Content type | Value |
---|---|
application/json |
PUT /wiki/rest/api/space/{spaceKey}/property/{key}
Updates a space property. Note, you cannot update the key of a space property, only the value.
Permissions required: ‘Admin’ permission for the space.
Connect app scope required: WRITE
read:space.property:confluence
, write:space.property:confluence
string
The key of the space that the property is in.
string
The key of the property to be updated.
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 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213
// This sample uses Atlassian Forge
// https://developer.atlassian.com/platform/forge/
import api, { route } from "@forge/api";
var bodyData = `{
"key": "<string>",
"value": [
"<string>"
],
"version": {
"by": {
"type": "known",
"username": "<string>",
"userKey": "<string>",
"accountId": "<string>",
"accountType": "atlassian",
"email": "<string>",
"publicName": "<string>",
"profilePicture": {
"path": "<string>",
"width": 2154,
"height": 2154,
"isDefault": true
},
"displayName": "<string>",
"timeZone": "<string>",
"isExternalCollaborator": true,
"externalCollaborator": true,
"operations": [
{
"operation": "administer",
"targetType": "<string>"
}
],
"details": {},
"personalSpace": {
"key": "<string>",
"name": "<string>",
"type": "<string>",
"status": "<string>",
"_expandable": {},
"_links": {}
},
"_expandable": {
"operations": "<string>",
"details": "<string>",
"personalSpace": "<string>"
},
"_links": {}
},
"when": "<string>",
"friendlyWhen": "<string>",
"message": "<string>",
"number": 57,
"minorEdit": true,
"content": {
"id": "<string>",
"type": "<string>",
"status": "<string>",
"title": "<string>",
"space": {
"key": "<string>",
"name": "<string>",
"type": "<string>",
"status": "<string>",
"_expandable": {},
"_links": {}
},
"history": {
"latest": true
},
"ancestors": [],
"operations": [
{
"operation": "administer",
"targetType": "<string>"
}
],
"children": {},
"childTypes": {},
"descendants": {},
"container": {},
"body": {
"view": {
"value": "<string>",
"representation": "view"
},
"export_view": {
"value": "<string>",
"representation": "view"
},
"styled_view": {
"value": "<string>",
"representation": "view"
},
"storage": {
"value": "<string>",
"representation": "view"
},
"wiki": {
"value": "<string>",
"representation": "view"
},
"editor": {
"value": "<string>",
"representation": "view"
},
"editor2": {
"value": "<string>",
"representation": "view"
},
"anonymous_export_view": {
"value": "<string>",
"representation": "view"
},
"atlas_doc_format": {
"value": "<string>",
"representation": "view"
},
"dynamic": {
"value": "<string>",
"representation": "view"
},
"_expandable": {
"editor": "<string>",
"view": "<string>",
"export_view": "<string>",
"styled_view": "<string>",
"storage": "<string>",
"editor2": "<string>",
"anonymous_export_view": "<string>",
"atlas_doc_format": "<string>",
"wiki": "<string>",
"dynamic": "<string>",
"raw": "<string>"
}
},
"restrictions": {
"read": {
"operation": "administer",
"_expandable": {},
"_links": {}
},
"update": {
"operation": "administer",
"_expandable": {},
"_links": {}
},
"_expandable": {
"read": "<string>",
"update": "<string>"
},
"_links": {}
},
"metadata": {},
"macroRenderedOutput": {},
"extensions": {},
"_expandable": {
"childTypes": "<string>",
"container": "<string>",
"metadata": "<string>",
"operations": "<string>",
"children": "<string>",
"restrictions": "<string>",
"history": "<string>",
"ancestors": "<string>",
"body": "<string>",
"version": "<string>",
"descendants": "<string>",
"space": "<string>",
"extensions": "<string>",
"schedulePublishDate": "<string>",
"macroRenderedOutput": "<string>"
},
"_links": {}
},
"collaborators": {
"users": [
{
"type": "known"
}
],
"userKeys": [
"<string>"
],
"_links": {}
},
"_expandable": {
"content": "<string>",
"collaborators": "<string>"
},
"_links": {},
"contentTypeModified": true,
"confRev": "<string>",
"syncRev": "<string>",
"syncRevSource": "<string>"
},
"space": {
"key": "<string>"
}
}`;
const response = await api.asApp().requestConfluence(route`/wiki/rest/api/space/{spaceKey}/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());
Returned if the space property is updated.
Content type | Value |
---|---|
application/json |
POST /wiki/rest/api/space/{spaceKey}/property/{key}
Creates a new space property. This is the same as POST /wiki/rest/api/space/{spaceKey}/property
but the key for the property is passed as a
path parameter, rather than in the request body.
Permissions required: ‘Admin’ permission for the space.
Connect app scope required: WRITE
read:space.property:confluence
, write:space.property:confluence
string
The key of the space that the property will be created in.
string
The key of the property to be created.
oneOf [Array<string>, boolean, object, string]
The value of the property. This can be empty or a complex object. 64KB Size Limit For example,
1 2"value": { "example1": "value", "example2": true, "example3": 123, "example4": ["value1", "value2"], }
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.asApp().requestConfluence(route`/wiki/rest/api/space/{spaceKey}/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());
Returned if the space property is created.
Content type | Value |
---|---|
application/json |
DELETE /wiki/rest/api/space/{spaceKey}/property/{key}
Deletes a space property.
Permissions required: ‘Admin’ permission for the space.
Connect app scope required: WRITE
write:space.property:confluence
string
The key of the space that the property is in.
string
The key of the property to be 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.asApp().requestConfluence(route`/wiki/rest/api/space/{spaceKey}/property/{key}`, {
method: 'DELETE'
});
console.log(`Response: ${response.status} ${response.statusText}`);
console.log(await response.text());
Returned if the space property is deleted.
A schema has not been defined for this response code.
Rate this page: