This resource represents user properties and provides for storing custom data against a user. Use it to get, create, and delete user properties as well as get a list of property keys for a user. This resourse is designed for integrations and apps to store per-user data and settings. This enables data used to customized the user experience to be kept in the Jira Cloud instance's database. User properties are a type of entity property.
This resource does not access the user properties created and maintained in Jira.
Returns the keys of all properties for a user.
Note: This operation does not access the user properties created and maintained in Jira.
Permissions required:
read:jira-user
read:user.property:jira
Connect app scope required: READ
string
string
string
Returned if the request is successful.
List of property keys.
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().requestJira(route`/rest/api/3/user/properties?accountId=5b10ac8d82e05b22cc7d4ef5`, {
headers: {
'Accept': 'application/json'
}
});
console.log(`Response: ${response.status} ${response.statusText}`);
console.log(await response.json());
1
2
3
4
5
6
7
8
{
"keys": [
{
"key": "issue.support",
"self": "https://your-domain.atlassian.net/rest/api/3/issue/EX-2/properties/issue.support"
}
]
}
Returns the value of a user's property. If no property key is provided Get user property keys is called.
Note: This operation does not access the user properties created and maintained in Jira.
Permissions required:
read:jira-user
read:user.property:jira
Connect app scope required: READ
string
Requiredstring
string
string
Returned if the request is successful.
An entity property, for more information see Entity properties.
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().requestJira(route`/rest/api/3/user/properties/{propertyKey}?accountId=5b10ac8d82e05b22cc7d4ef5`, {
headers: {
'Accept': 'application/json'
}
});
console.log(`Response: ${response.status} ${response.statusText}`);
console.log(await response.json());
1
2
3
4
5
6
7
{
"key": "issue.support",
"value": {
"system.conversation.id": "b1bf38be-5e94-4b40-a3b8-9278735ee1e6",
"system.support.time": "1m"
}
}
Sets the value of a user's property. Use this resource to store custom data against a user.
Note: This operation does not access the user properties created and maintained in Jira.
Permissions required:
write:jira-work
write:user.property:jira
Connect app scope required: WRITE
string
Requiredstring
string
string
The value of the property. The value has to be a valid, non-empty JSON value. The maximum length of the property value is 32768 bytes.
any
Returned if the user property is updated.
any
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// This sample uses Atlassian Forge
// https://developer.atlassian.com/platform/forge/
import api, { route } from "@forge/api";
var bodyData = `{}`;
const response = await api.asUser().requestJira(route`/rest/api/3/user/properties/{propertyKey}?accountId=5b10ac8d82e05b22cc7d4ef5`, {
method: 'PUT',
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json'
},
body: bodyData
});
console.log(`Response: ${response.status} ${response.statusText}`);
console.log(await response.json());
Deletes a property from a user.
Note: This operation does not access the user properties created and maintained in Jira.
Permissions required:
write:jira-work
delete:user.property:jira
Connect app scope required: DELETE
string
Requiredstring
string
string
Returned 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().requestJira(route`/rest/api/3/user/properties/{propertyKey}?accountId=5b10ac8d82e05b22cc7d4ef5`, {
method: 'DELETE'
});
console.log(`Response: ${response.status} ${response.statusText}`);
console.log(await response.text());
Rate this page: