Returns the properties for a user as list of property keys. For more information
about user properties, see Confluence entity properties.
Note
, these properties stored against a user are on a Confluence site level and not space/content level.
Permissions required: Permission to access the Confluence site ('Can use' global permission).
read:user.property:confluence
Connect app scope required: READ
string
Requiredinteger
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/user/{userId}/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
{
"results": [
{
"key": "<string>"
}
],
"start": 2154,
"limit": 2154,
"size": 2154,
"_links": {}
}
Returns the property corresponding to key
for a user. For more information
about user properties, see Confluence entity properties.
Note
, these properties stored against a user are on a Confluence site level and not space/content level.
Permissions required: Permission to access the Confluence site ('Can use' global permission).
read:user.property:confluence
Connect app scope required: READ
string
Requiredstring
RequiredReturned 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/user/{userId}/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
{
"key": "<string>",
"value": {},
"id": "<string>",
"lastModifiedDate": "<string>",
"createdDate": "<string>",
"_links": {}
}
Updates a property for the given user. Note, you cannot update the key of a user property, only the value.
For more information about user properties, see
Confluence entity properties.
Note
, these properties stored against a user are on a Confluence site level and not space/content level.
Permissions required: Permission to access the Confluence site ('Can use' global permission).
write:user.property:confluence
Connect app scope required: WRITE
string
Requiredstring
RequiredThe user property to be updated.
object
RequiredReturned if the user property is updated.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// This sample uses Atlassian Forge
// https://developer.atlassian.com/platform/forge/
import api, { route } from "@forge/api";
var bodyData = `{
"value": {}
}`;
const response = await api.asUser().requestConfluence(route`/wiki/rest/api/user/{userId}/property/{key}`, {
method: 'PUT',
headers: {
'Content-Type': 'application/json'
},
body: bodyData
});
console.log(`Response: ${response.status} ${response.statusText}`);
console.log(await response.text());
Creates a property for a user. For more information about user properties, see [Confluence entity properties]
(https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/).
Note
, these properties stored against a user are on a Confluence site level and not space/content level.
Note:
the number of properties which could be created per app in a tenant for each user might be
restricted by fixed system limits.
Permissions required:
Permission to access the Confluence site ('Can use' global permission).
write:user.property:confluence
Connect app scope required: WRITE
string
Requiredstring
RequiredThe user property to be created.
object
RequiredReturned if the user property is created.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// This sample uses Atlassian Forge
// https://developer.atlassian.com/platform/forge/
import api, { route } from "@forge/api";
var bodyData = `{
"value": {}
}`;
const response = await api.asUser().requestConfluence(route`/wiki/rest/api/user/{userId}/property/{key}`, {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: bodyData
});
console.log(`Response: ${response.status} ${response.statusText}`);
console.log(await response.text());
Deletes a property for the given user.
For more information about user properties, see
Confluence entity properties.
Note
, these properties stored against a user are on a Confluence site level and not space/content level.
Permissions required: Permission to access the Confluence site ('Can use' global permission).
write:user.property:confluence
Connect app scope required: WRITE
string
Requiredstring
RequiredReturned if the user 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/user/{userId}/property/{key}`, {
method: 'DELETE'
});
console.log(`Response: ${response.status} ${response.statusText}`);
console.log(await response.text());
Rate this page: