This resource represents an announcement banner. Use it to retrieve and update banner configuration.
Returns the current announcement banner configuration.
Permissions required: Administer Jira global permission.
manage:jira-configuration
Connect app scope required: ADMIN
This request has no parameters.
Returned if the request is successful.
Announcement banner configuration.
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/announcementBanner`, {
headers: {
'Accept': 'application/json'
}
});
console.log(`Response: ${response.status} ${response.statusText}`);
console.log(await response.json());
1
2
3
4
5
6
7
{
"hashId": "9HN2FJK9DM8BHRWERVW3RRTGDJ4G4D5C",
"isDismissible": false,
"isEnabled": true,
"message": "This is a public, enabled, non-dismissible banner, set using the API",
"visibility": "public"
}
Updates the announcement banner configuration.
Permissions required: Administer Jira global permission.
manage:jira-configuration
Connect app scope required: ADMIN
boolean
boolean
string
string
Returned if the request is successful.
any
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// This sample uses Atlassian Forge
// https://developer.atlassian.com/platform/forge/
import api, { route } from "@forge/api";
var bodyData = `{
"isDismissible": false,
"isEnabled": true,
"message": "This is a public, enabled, non-dismissible banner, set using the API",
"visibility": "public"
}`;
const response = await api.asUser().requestJira(route`/rest/api/3/announcementBanner`, {
method: 'PUT',
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json'
},
body: bodyData
});
console.log(`Response: ${response.status} ${response.statusText}`);
console.log(await response.json());
Rate this page: