Returns all properties for the given space. Space properties are a key-value storage associated with a space.
The limit parameter specifies the maximum number of results returned in a single response. Use the link
response header
to paginate through additional results.
Permissions required: Permission to access the Confluence site ('Can use' global permission) and 'View' permission for the space.
read:space:confluence
Connect app scope required: READ
integer
Requiredstring
string
integer
Returned if the requested space properties are returned. results
may be empty if no results were found.
string
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/api/v2/spaces/{space-id}/properties`, {
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
{
"results": [
{
"id": "<string>",
"key": "<string>",
"createdAt": "<string>",
"createdBy": "<string>",
"version": {
"createdAt": "<string>",
"createdBy": "<string>",
"message": "<string>",
"number": 44
}
}
],
"_links": {
"next": "<string>",
"base": "<string>"
}
}
Creates a new space property.
Permissions required: Permission to access the Confluence site ('Can use' global permission) and 'Admin' permission for the space.
read:space:confluence
, write:space:confluence
Connect app scope required: WRITE
integer
RequiredThe space property to be created
string
any
Returned if the space property was created successfully.
string
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// This sample uses Atlassian Forge
// https://developer.atlassian.com/platform/forge/
import api, { route } from "@forge/api";
var bodyData = `{
"key": "<string>"
}`;
const response = await api.asUser().requestConfluence(route`/wiki/api/v2/spaces/{space-id}/properties`, {
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
{
"id": "<string>",
"key": "<string>",
"createdAt": "<string>",
"createdBy": "<string>",
"version": {
"createdAt": "<string>",
"createdBy": "<string>",
"message": "<string>",
"number": 44
}
}
Retrieve a space property by its id.
Permissions required: Permission to access the Confluence site ('Can use' global permission) and 'View' permission for the space.
read:space:confluence
Connect app scope required: READ
integer
Requiredinteger
RequiredReturned if the space property was retrieved.
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/api/v2/spaces/{space-id}/properties/{property-id}`, {
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
{
"id": "<string>",
"key": "<string>",
"createdAt": "<string>",
"createdBy": "<string>",
"version": {
"createdAt": "<string>",
"createdBy": "<string>",
"message": "<string>",
"number": 44
}
}
Update a space property by its id.
Permissions required: Permission to access the Confluence site ('Can use' global permission) and 'Admin' permission for the space.
read:space:confluence
, write:space:confluence
Connect app scope required: WRITE
integer
Requiredinteger
RequiredThe space property to be updated.
string
any
object
Returned if the space property was updated successfully.
string
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// This sample uses Atlassian Forge
// https://developer.atlassian.com/platform/forge/
import api, { route } from "@forge/api";
var bodyData = `{
"key": "<string>",
"version": {
"number": 84,
"message": "<string>"
}
}`;
const response = await api.asUser().requestConfluence(route`/wiki/api/v2/spaces/{space-id}/properties/{property-id}`, {
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
{
"id": "<string>",
"key": "<string>",
"createdAt": "<string>",
"createdBy": "<string>",
"version": {
"createdAt": "<string>",
"createdBy": "<string>",
"message": "<string>",
"number": 44
}
}
Deletes a space property by its id.
Permissions required: Permission to access the Confluence site ('Can use' global permission) and 'Admin' permission for the space.
read:space:confluence
, write:space:confluence
Connect app scope required: WRITE
integer
Requiredinteger
RequiredReturned if the space property was deleted successfully.
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/api/v2/spaces/{space-id}/properties/{property-id}`, {
method: 'DELETE'
});
console.log(`Response: ${response.status} ${response.statusText}`);
console.log(await response.text());
Rate this page: