This resource represents app properties. Use it to store arbitrary data for your Connect app.
Gets all the properties of an app.
Permissions required: Only a Connect app whose key matches addonKey
can make this request.
Additionally, Forge apps can access Connect app properties (stored against the same app.connect.key
).
Connect app scope required: NONE
string
RequiredReturned 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/atlassian-connect/1/addons/{addonKey}/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
{
"keys": [
{
"self": "https://your-domain.atlassian.net/jira/rest/atlassian-connect/1/addon/example.app.key/properties/propertyKey",
"key": "propertyKey"
}
]
}
Returns the key and value of an app's property.
Permissions required: Only a Connect app whose key matches addonKey
can make this request.
Additionally, Forge apps can access Connect app properties (stored against the same app.connect.key
).
Connect app scope required: NONE
string
Requiredstring
RequiredReturned 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/atlassian-connect/1/addons/{addonKey}/properties/{propertyKey}`, {
headers: {
'Accept': 'application/json'
}
});
console.log(`Response: ${response.status} ${response.statusText}`);
console.log(await response.json());
1
2
3
4
5
{
"self": "https://your-domain.atlassian.net/jira/rest/atlassian-connect/1/addon/example.app.key/properties/propertyKey",
"key": "propertyKey",
"value": "propertyValue"
}
Sets the value of an app's property. Use this resource to store custom data for your app.
The value of the request body must be a valid, non-empty JSON blob. The maximum length is 32768 characters.
Permissions required: Only a Connect app whose key matches addonKey
can make this request.
Additionally, Forge apps can access Connect app properties (stored against the same app.connect.key
).
Connect app scope required: NONE
string
Requiredstring
Requiredany
Returned if the property is updated.
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/atlassian-connect/1/addons/{addonKey}/properties/{propertyKey}`, {
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
{
"message": "Property updated.",
"statusCode": 200
}
Deletes an app's property.
Permissions required: Only a Connect app whose key matches addonKey
can make this request.
Additionally, Forge apps can access Connect app properties (stored against the same app.connect.key
).
Connect app scope required: NONE
string
Requiredstring
RequiredReturned if the request is successful.
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/atlassian-connect/1/addons/{addonKey}/properties/{propertyKey}`, {
method: 'DELETE'
});
console.log(`Response: ${response.status} ${response.statusText}`);
console.log(await response.text());
Sets the value of a Forge app's property.
These values can be retrieved in Jira expressions
through the app
context variable.
For other use cases, use the Storage API.
The value of the request body must be a valid, non-empty JSON blob. The maximum length is 32768 characters.
Permissions required: Only Forge apps can make this request.
The new write:app-data:jira
OAuth scope is 100% optional now, and not using it won't break your app. However, we recommend adding it to your app's scope list because we will eventually make it mandatory.
write:app-data:jira
Connect apps cannot access this REST resource.
string
Requiredany
Returned if the property is updated.
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/forge/1/app/properties/{propertyKey}`, {
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
{
"message": "Property updated.",
"statusCode": 200
}
Deletes a Forge app's property.
Permissions required: Only Forge apps can make this request.
The new write:app-data:jira
OAuth scope is 100% optional now, and not using it won't break your app. However, we recommend adding it to your app's scope list because we will eventually make it mandatory.
write:app-data:jira
Connect apps cannot access this REST resource.
string
RequiredReturned if the request is successful.
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/forge/1/app/properties/{propertyKey}`, {
method: 'DELETE'
});
console.log(`Response: ${response.status} ${response.statusText}`);
console.log(await response.text());
Rate this page: